COSEMpdu 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.
- cosempdu-0.2.0/.github/workflows/publish.yml +41 -0
- cosempdu-0.2.0/.gitignore +5 -0
- cosempdu-0.2.0/.vscode/launch.json +201 -0
- cosempdu-0.2.0/PKG-INFO +24 -0
- cosempdu-0.2.0/README.md +5 -0
- cosempdu-0.2.0/py.typed +0 -0
- cosempdu-0.2.0/pyproject.toml +75 -0
- cosempdu-0.2.0/setup.cfg +4 -0
- cosempdu-0.2.0/src/COSEMpdu/__init__.py +0 -0
- cosempdu-0.2.0/src/COSEMpdu/acse.py +631 -0
- cosempdu-0.2.0/src/COSEMpdu/apdu.py +1440 -0
- cosempdu-0.2.0/src/COSEMpdu/axdr.py +897 -0
- cosempdu-0.2.0/src/COSEMpdu/ber.py +944 -0
- cosempdu-0.2.0/src/COSEMpdu/byte_buffer.py +196 -0
- cosempdu-0.2.0/src/COSEMpdu/data.py +784 -0
- cosempdu-0.2.0/src/COSEMpdu/key_info.py +132 -0
- cosempdu-0.2.0/src/COSEMpdu/service_error.py +510 -0
- cosempdu-0.2.0/src/COSEMpdu/types_used.py +736 -0
- cosempdu-0.2.0/src/COSEMpdu/useful_types.py +73 -0
- cosempdu-0.2.0/src/COSEMpdu/user_information.py +133 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/__init__.py +55 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/bit_string.py +416 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/boolean_type.py +26 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/choice_type.py +71 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/constrained_type.py +155 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/enumerated_type.py +131 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/generalized_time.py +458 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/integer_type.py +133 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/null_type.py +41 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/object_identifier_type.py +253 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/octet_string_type.py +49 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/restricted_character_string_type.py +17 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/sequence_of_type.py +81 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/sequence_type.py +136 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/tag.py +105 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/tagged_type.py +54 -0
- cosempdu-0.2.0/src/COSEMpdu/x680/type.py +226 -0
- cosempdu-0.2.0/src/COSEMpdu/x690.py +159 -0
- cosempdu-0.2.0/src/COSEMpdu.egg-info/PKG-INFO +24 -0
- cosempdu-0.2.0/src/COSEMpdu.egg-info/SOURCES.txt +54 -0
- cosempdu-0.2.0/src/COSEMpdu.egg-info/dependency_links.txt +1 -0
- cosempdu-0.2.0/src/COSEMpdu.egg-info/requires.txt +7 -0
- cosempdu-0.2.0/src/COSEMpdu.egg-info/top_level.txt +1 -0
- cosempdu-0.2.0/test/__init__.py +0 -0
- cosempdu-0.2.0/test/test_acse_pdu.py +582 -0
- cosempdu-0.2.0/test/test_apdu.py +412 -0
- cosempdu-0.2.0/test/test_axdr.py +732 -0
- cosempdu-0.2.0/test/test_ber.py +2506 -0
- cosempdu-0.2.0/test/test_bytebuffer.py +167 -0
- cosempdu-0.2.0/test/test_constraint.py +491 -0
- cosempdu-0.2.0/test/test_data.py +966 -0
- cosempdu-0.2.0/test/test_main.py +329 -0
- cosempdu-0.2.0/test/test_service_error.py +438 -0
- cosempdu-0.2.0/test/test_types_used.py +804 -0
- cosempdu-0.2.0/test/test_x680_bitstring.py +784 -0
- cosempdu-0.2.0/test/test_x690.py +41 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
workflow_dispatch: # manual
|
|
8
|
+
|
|
9
|
+
permissions: # For Trusted Publishing
|
|
10
|
+
id-token: write
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
publish:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
environment: pypi
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout code
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v4
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.12'
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
pip install build twine
|
|
31
|
+
|
|
32
|
+
- name: Build package
|
|
33
|
+
run: python -m build
|
|
34
|
+
|
|
35
|
+
- name: Publish to PyPI
|
|
36
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
37
|
+
with:
|
|
38
|
+
attestations: true # Включаем аттестации
|
|
39
|
+
verbose: true
|
|
40
|
+
# with: # token version
|
|
41
|
+
# password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Python: test_bytebuffer",
|
|
6
|
+
"type": "debugpy",
|
|
7
|
+
"request": "launch",
|
|
8
|
+
"module": "unittest",
|
|
9
|
+
"args": [
|
|
10
|
+
"-v",
|
|
11
|
+
"test.test_bytebuffer"
|
|
12
|
+
],
|
|
13
|
+
"cwd": "${workspaceFolder}",
|
|
14
|
+
"console": "integratedTerminal",
|
|
15
|
+
"justMyCode": true,
|
|
16
|
+
"env": {
|
|
17
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "Python: test_x680_bitstring",
|
|
23
|
+
"type": "debugpy",
|
|
24
|
+
"request": "launch",
|
|
25
|
+
"module": "unittest",
|
|
26
|
+
"args": [
|
|
27
|
+
"-v",
|
|
28
|
+
"test.test_x680_bitstring"
|
|
29
|
+
],
|
|
30
|
+
"cwd": "${workspaceFolder}",
|
|
31
|
+
"console": "integratedTerminal",
|
|
32
|
+
"justMyCode": true,
|
|
33
|
+
"env": {
|
|
34
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Python: test_BER",
|
|
40
|
+
"type": "debugpy",
|
|
41
|
+
"request": "launch",
|
|
42
|
+
"module": "unittest",
|
|
43
|
+
"args": [
|
|
44
|
+
"-v",
|
|
45
|
+
"test.test_ber"
|
|
46
|
+
],
|
|
47
|
+
"cwd": "${workspaceFolder}",
|
|
48
|
+
"console": "integratedTerminal",
|
|
49
|
+
"justMyCode": true,
|
|
50
|
+
"env": {
|
|
51
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "Python: test_constraint",
|
|
57
|
+
"type": "debugpy",
|
|
58
|
+
"request": "launch",
|
|
59
|
+
"module": "unittest",
|
|
60
|
+
"args": [
|
|
61
|
+
"-v",
|
|
62
|
+
"test.test_constraint"
|
|
63
|
+
],
|
|
64
|
+
"cwd": "${workspaceFolder}",
|
|
65
|
+
"console": "integratedTerminal",
|
|
66
|
+
"justMyCode": true,
|
|
67
|
+
"env": {
|
|
68
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "Python: test_axdr",
|
|
74
|
+
"type": "debugpy",
|
|
75
|
+
"request": "launch",
|
|
76
|
+
"module": "unittest",
|
|
77
|
+
"args": [
|
|
78
|
+
"-v",
|
|
79
|
+
"test.test_axdr"
|
|
80
|
+
],
|
|
81
|
+
"cwd": "${workspaceFolder}",
|
|
82
|
+
"console": "integratedTerminal",
|
|
83
|
+
"justMyCode": true,
|
|
84
|
+
"env": {
|
|
85
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "test ACSE-PDU",
|
|
91
|
+
"type": "debugpy",
|
|
92
|
+
"request": "launch",
|
|
93
|
+
"module": "unittest",
|
|
94
|
+
"args": [
|
|
95
|
+
"-v",
|
|
96
|
+
"test.test_acse_pdu"
|
|
97
|
+
],
|
|
98
|
+
"cwd": "${workspaceFolder}",
|
|
99
|
+
"console": "integratedTerminal",
|
|
100
|
+
"justMyCode": true,
|
|
101
|
+
"env": {
|
|
102
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "test service-error",
|
|
108
|
+
"type": "debugpy",
|
|
109
|
+
"request": "launch",
|
|
110
|
+
"module": "unittest",
|
|
111
|
+
"args": [
|
|
112
|
+
"-v",
|
|
113
|
+
"test.test_service_error"
|
|
114
|
+
],
|
|
115
|
+
"cwd": "${workspaceFolder}",
|
|
116
|
+
"console": "integratedTerminal",
|
|
117
|
+
"justMyCode": true,
|
|
118
|
+
"env": {
|
|
119
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "test Data",
|
|
125
|
+
"type": "debugpy",
|
|
126
|
+
"request": "launch",
|
|
127
|
+
"module": "unittest",
|
|
128
|
+
"args": [
|
|
129
|
+
"-v",
|
|
130
|
+
"test.test_data"
|
|
131
|
+
],
|
|
132
|
+
"cwd": "${workspaceFolder}",
|
|
133
|
+
"console": "integratedTerminal",
|
|
134
|
+
"justMyCode": true,
|
|
135
|
+
"env": {
|
|
136
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "test x690",
|
|
141
|
+
"type": "debugpy",
|
|
142
|
+
"request": "launch",
|
|
143
|
+
"module": "unittest",
|
|
144
|
+
"args": [
|
|
145
|
+
"-v",
|
|
146
|
+
"test.test_x690"
|
|
147
|
+
],
|
|
148
|
+
"cwd": "${workspaceFolder}",
|
|
149
|
+
"console": "integratedTerminal",
|
|
150
|
+
"justMyCode": true,
|
|
151
|
+
"env": {
|
|
152
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "test types used",
|
|
157
|
+
"type": "debugpy",
|
|
158
|
+
"request": "launch",
|
|
159
|
+
"module": "unittest",
|
|
160
|
+
"args": [
|
|
161
|
+
"-v",
|
|
162
|
+
"test.test_types_used"
|
|
163
|
+
],
|
|
164
|
+
"cwd": "${workspaceFolder}",
|
|
165
|
+
"console": "integratedTerminal",
|
|
166
|
+
"justMyCode": true,
|
|
167
|
+
"env": {
|
|
168
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "test apdu",
|
|
173
|
+
"type": "debugpy",
|
|
174
|
+
"request": "launch",
|
|
175
|
+
"module": "unittest",
|
|
176
|
+
"args": [
|
|
177
|
+
"-v",
|
|
178
|
+
"test.test_apdu"
|
|
179
|
+
],
|
|
180
|
+
"cwd": "${workspaceFolder}",
|
|
181
|
+
"console": "integratedTerminal",
|
|
182
|
+
"justMyCode": true,
|
|
183
|
+
"env": {
|
|
184
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "Python: launch.py",
|
|
189
|
+
"type": "debugpy",
|
|
190
|
+
"request": "launch",
|
|
191
|
+
"program": "${workspaceFolder}/launch.py",
|
|
192
|
+
"cwd": "${workspaceFolder}",
|
|
193
|
+
"console": "integratedTerminal",
|
|
194
|
+
"justMyCode": true,
|
|
195
|
+
"env": {
|
|
196
|
+
"PYTHONPATH": "${workspaceFolder}/src"
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
},
|
|
200
|
+
]
|
|
201
|
+
}
|
cosempdu-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: COSEMpdu
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: cosem-pdu
|
|
5
|
+
Author-email: Serj Kotilevski <youserj@outlook.com>
|
|
6
|
+
Project-URL: Source, https://github.com/youserj/SPODESclient_prj
|
|
7
|
+
Keywords: dlms,asn.1,a-xdr,ber,pdu,coder
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Provides-Extra: dev
|
|
14
|
+
Requires-Dist: mypy>=1.5.0; extra == "dev"
|
|
15
|
+
Requires-Dist: ruff>=0.11; extra == "dev"
|
|
16
|
+
Requires-Dist: types-requests; extra == "dev"
|
|
17
|
+
Requires-Dist: build>=1.3; extra == "dev"
|
|
18
|
+
Requires-Dist: twine; extra == "dev"
|
|
19
|
+
|
|
20
|
+
# COSEMpdu_project
|
|
21
|
+
implementation COSEMpdu
|
|
22
|
+
|
|
23
|
+
for AI:
|
|
24
|
+
* use for create project struct: git ls-files > git_tracked_files.txt
|
cosempdu-0.2.0/README.md
ADDED
cosempdu-0.2.0/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools",
|
|
4
|
+
"setuptools-scm"]
|
|
5
|
+
build-backend = "setuptools.build_meta"
|
|
6
|
+
|
|
7
|
+
[tool.setuptools]
|
|
8
|
+
package-dir = {"" = "src"}
|
|
9
|
+
|
|
10
|
+
[project]
|
|
11
|
+
name = "COSEMpdu"
|
|
12
|
+
version = "0.2.0"
|
|
13
|
+
authors = [
|
|
14
|
+
{name="Serj Kotilevski", email="youserj@outlook.com"}
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
]
|
|
18
|
+
description="cosem-pdu"
|
|
19
|
+
readme = "README.md"
|
|
20
|
+
requires-python = ">=3.12"
|
|
21
|
+
keywords=['dlms', 'asn.1', 'a-xdr', 'ber', 'pdu', 'coder']
|
|
22
|
+
classifiers = [
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"License :: OSI Approved :: MIT License",
|
|
25
|
+
"Operating System :: OS Independent",
|
|
26
|
+
]
|
|
27
|
+
[project.urls]
|
|
28
|
+
Source = "https://github.com/youserj/SPODESclient_prj"
|
|
29
|
+
|
|
30
|
+
[project.optional-dependencies]
|
|
31
|
+
dev = [
|
|
32
|
+
"mypy>=1.5.0",
|
|
33
|
+
"ruff>=0.11",
|
|
34
|
+
"types-requests",
|
|
35
|
+
"build>=1.3",
|
|
36
|
+
"twine"
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[tool.mypy]
|
|
40
|
+
exclude = [
|
|
41
|
+
"build/*",
|
|
42
|
+
"test/*",
|
|
43
|
+
]
|
|
44
|
+
strict = true
|
|
45
|
+
ignore_missing_imports = true
|
|
46
|
+
disallow_any_generics = true
|
|
47
|
+
explicit_package_bases = true
|
|
48
|
+
|
|
49
|
+
[tool.ruff]
|
|
50
|
+
src = ["src"]
|
|
51
|
+
line-length = 180
|
|
52
|
+
preview = true
|
|
53
|
+
exclude = [
|
|
54
|
+
".git",
|
|
55
|
+
".mypy_cache",
|
|
56
|
+
".tox",
|
|
57
|
+
".venv",
|
|
58
|
+
"__pycache__",
|
|
59
|
+
"build",
|
|
60
|
+
"dist",
|
|
61
|
+
"node_modules",
|
|
62
|
+
"venv",
|
|
63
|
+
]
|
|
64
|
+
include = [
|
|
65
|
+
"src/**/*.py",
|
|
66
|
+
"test/test_*.py"
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[tool.ruff.lint]
|
|
70
|
+
ignore = ["SIM108"] # ternary
|
|
71
|
+
select = [
|
|
72
|
+
"E", "F", "W", "C", "Q", "ANN", "ARG", "DTZ", "FBT", "NPY", "PGH", "PIE", "SIM", "RET", "TYP", "TCH", "YTT",
|
|
73
|
+
# "TRY",
|
|
74
|
+
]
|
|
75
|
+
#extend-select = ["D"]
|
cosempdu-0.2.0/setup.cfg
ADDED
|
File without changes
|