zte-cfgs 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zte_cfgs-0.2.0/.github/workflows/ci.yml +31 -0
- zte_cfgs-0.2.0/.github/workflows/publish.yml +89 -0
- zte_cfgs-0.2.0/.gitignore +17 -0
- zte_cfgs-0.2.0/LICENSE +22 -0
- zte_cfgs-0.2.0/PKG-INFO +823 -0
- zte_cfgs-0.2.0/README.md +804 -0
- zte_cfgs-0.2.0/docs/development.md +45 -0
- zte_cfgs-0.2.0/docs/format.md +60 -0
- zte_cfgs-0.2.0/docs/keys.md +56 -0
- zte_cfgs-0.2.0/docs/workflow.md +63 -0
- zte_cfgs-0.2.0/local-install.sh +3 -0
- zte_cfgs-0.2.0/pyproject.toml +36 -0
- zte_cfgs-0.2.0/scripts/device_collect.sh +33 -0
- zte_cfgs-0.2.0/scripts/device_print_indivkey.sh +38 -0
- zte_cfgs-0.2.0/src/zte_cfgs/__init__.py +3 -0
- zte_cfgs-0.2.0/src/zte_cfgs/cli.py +247 -0
- zte_cfgs-0.2.0/src/zte_cfgs/device_scripts/__init__.py +1 -0
- zte_cfgs-0.2.0/src/zte_cfgs/device_scripts/device_collect.sh +32 -0
- zte_cfgs-0.2.0/src/zte_cfgs/device_scripts/device_print_indivkey.sh +37 -0
- zte_cfgs-0.2.0/src/zte_cfgs/e8.py +76 -0
- zte_cfgs-0.2.0/src/zte_cfgs/format.py +270 -0
- zte_cfgs-0.2.0/src/zte_cfgs/keys.py +135 -0
- zte_cfgs-0.2.0/tests/test_cli.py +20 -0
- zte_cfgs-0.2.0/tests/test_e8.py +30 -0
- zte_cfgs-0.2.0/tests/test_format.py +21 -0
- zte_cfgs-0.2.0/tests/test_keys.py +25 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: ${{ matrix.python-version }}
|
|
18
|
+
- run: python -m pip install --upgrade pip
|
|
19
|
+
- run: python -m pip install -e '.[test]'
|
|
20
|
+
- run: python -m pytest -q
|
|
21
|
+
|
|
22
|
+
build:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
- run: python -m pip install --upgrade pip build
|
|
30
|
+
- run: python -m build
|
|
31
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
name: Publish package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- release
|
|
7
|
+
- "release/v*"
|
|
8
|
+
tags:
|
|
9
|
+
- "v*"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
target:
|
|
13
|
+
description: "Publish target"
|
|
14
|
+
required: true
|
|
15
|
+
type: choice
|
|
16
|
+
default: testpypi
|
|
17
|
+
options:
|
|
18
|
+
- testpypi
|
|
19
|
+
- pypi
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
build:
|
|
23
|
+
name: Build distributions
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
permissions:
|
|
26
|
+
contents: read
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- uses: actions/setup-python@v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.12"
|
|
32
|
+
- name: Install build tools
|
|
33
|
+
run: python -m pip install --upgrade pip build twine
|
|
34
|
+
- name: Check tag version
|
|
35
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
36
|
+
env:
|
|
37
|
+
TAG_VERSION: ${{ github.ref_name }}
|
|
38
|
+
run: |
|
|
39
|
+
PROJECT_VERSION="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
|
|
40
|
+
test "$PROJECT_VERSION" = "$TAG_VERSION"
|
|
41
|
+
- name: Build distributions
|
|
42
|
+
run: python -m build
|
|
43
|
+
- name: Check distributions
|
|
44
|
+
run: python -m twine check dist/*
|
|
45
|
+
- name: Upload distributions
|
|
46
|
+
uses: actions/upload-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
name: python-distributions
|
|
49
|
+
path: dist/
|
|
50
|
+
|
|
51
|
+
publish-pypi:
|
|
52
|
+
name: Publish to PyPI
|
|
53
|
+
needs: build
|
|
54
|
+
if: (github.event_name == 'push' && (github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/heads/release/v'))) || (github.event_name == 'workflow_dispatch' && inputs.target == 'pypi')
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
environment:
|
|
57
|
+
name: pypi
|
|
58
|
+
url: https://pypi.org/p/zte-cfgs
|
|
59
|
+
permissions:
|
|
60
|
+
id-token: write
|
|
61
|
+
steps:
|
|
62
|
+
- name: Download distributions
|
|
63
|
+
uses: actions/download-artifact@v4
|
|
64
|
+
with:
|
|
65
|
+
name: python-distributions
|
|
66
|
+
path: dist/
|
|
67
|
+
- name: Publish package to PyPI
|
|
68
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
69
|
+
|
|
70
|
+
publish-testpypi:
|
|
71
|
+
name: Publish to TestPyPI
|
|
72
|
+
needs: build
|
|
73
|
+
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && inputs.target == 'testpypi')
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
environment:
|
|
76
|
+
name: testpypi
|
|
77
|
+
url: https://test.pypi.org/p/zte-cfgs
|
|
78
|
+
permissions:
|
|
79
|
+
id-token: write
|
|
80
|
+
steps:
|
|
81
|
+
- name: Download distributions
|
|
82
|
+
uses: actions/download-artifact@v4
|
|
83
|
+
with:
|
|
84
|
+
name: python-distributions
|
|
85
|
+
path: dist/
|
|
86
|
+
- name: Publish package to TestPyPI
|
|
87
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
88
|
+
with:
|
|
89
|
+
repository-url: https://test.pypi.org/legacy/
|
zte_cfgs-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 zte-cfgs contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|