simaticml-decoder 0.1.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.
- simaticml_decoder-0.1.0/.github/workflows/ci.yml +28 -0
- simaticml_decoder-0.1.0/.github/workflows/release.yml +72 -0
- simaticml_decoder-0.1.0/.gitignore +325 -0
- simaticml_decoder-0.1.0/.graphifyignore +320 -0
- simaticml_decoder-0.1.0/AGENTS.md +10 -0
- simaticml_decoder-0.1.0/CLAUDE.md +10 -0
- simaticml_decoder-0.1.0/GEMINI.md +10 -0
- simaticml_decoder-0.1.0/PKG-INFO +118 -0
- simaticml_decoder-0.1.0/README.md +90 -0
- simaticml_decoder-0.1.0/graphify-out/.graphify_labels.json +10 -0
- simaticml_decoder-0.1.0/graphify-out/GRAPH_REPORT.md +130 -0
- simaticml_decoder-0.1.0/graphify-out/graph.json +10216 -0
- simaticml_decoder-0.1.0/pyproject.toml +54 -0
- simaticml_decoder-0.1.0/scripts/check_release_version.py +76 -0
- simaticml_decoder-0.1.0/src/simaticml_decoder/__init__.py +13 -0
- simaticml_decoder-0.1.0/src/simaticml_decoder/cli.py +113 -0
- simaticml_decoder-0.1.0/src/simaticml_decoder/emit.py +365 -0
- simaticml_decoder-0.1.0/src/simaticml_decoder/fold.py +652 -0
- simaticml_decoder-0.1.0/src/simaticml_decoder/instructions.py +105 -0
- simaticml_decoder-0.1.0/src/simaticml_decoder/ir.py +182 -0
- simaticml_decoder-0.1.0/src/simaticml_decoder/model.py +264 -0
- simaticml_decoder-0.1.0/src/simaticml_decoder/operand.py +141 -0
- simaticml_decoder-0.1.0/src/simaticml_decoder/parse.py +596 -0
- simaticml_decoder-0.1.0/src/simaticml_decoder/scl_reconstruct.py +75 -0
- simaticml_decoder-0.1.0/tests/conftest.py +46 -0
- simaticml_decoder-0.1.0/tests/fixtures/InvertBit.xml +144 -0
- simaticml_decoder-0.1.0/tests/fixtures/SimpleDevice.xml +280 -0
- simaticml_decoder-0.1.0/tests/test_cli.py +44 -0
- simaticml_decoder-0.1.0/tests/test_emit.py +149 -0
- simaticml_decoder-0.1.0/tests/test_fixtures_regression.py +69 -0
- simaticml_decoder-0.1.0/tests/test_fold.py +147 -0
- simaticml_decoder-0.1.0/tests/test_operand.py +59 -0
- simaticml_decoder-0.1.0/tests/test_release_version.py +59 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
lint-and-test:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.11", "3.12"]
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python-version }}
|
|
21
|
+
- name: Install (editable, with dev extras)
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
pip install -e ".[dev]"
|
|
25
|
+
- name: Lint (ruff)
|
|
26
|
+
run: ruff check .
|
|
27
|
+
- name: Tests (pytest)
|
|
28
|
+
run: pytest -q --cov=simaticml_decoder --cov-report=term-missing --cov-fail-under=70
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: PyPI Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
checks:
|
|
13
|
+
name: Checks (${{ matrix.python-version }})
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.11", "3.12"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
- name: Install (editable, with dev extras)
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install -e ".[dev]"
|
|
27
|
+
- name: Lint (ruff)
|
|
28
|
+
run: ruff check .
|
|
29
|
+
- name: Tests (pytest)
|
|
30
|
+
run: pytest -q --cov=simaticml_decoder --cov-report=term-missing --cov-fail-under=70
|
|
31
|
+
|
|
32
|
+
build:
|
|
33
|
+
name: Build distribution
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
needs: checks
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
- uses: actions/setup-python@v5
|
|
39
|
+
with:
|
|
40
|
+
python-version: "3.11"
|
|
41
|
+
- name: Install build tools
|
|
42
|
+
run: |
|
|
43
|
+
python -m pip install --upgrade pip
|
|
44
|
+
pip install -e ".[dev]"
|
|
45
|
+
- name: Check release version
|
|
46
|
+
run: python scripts/check_release_version.py "${{ github.ref_name }}"
|
|
47
|
+
- name: Build package
|
|
48
|
+
run: python -m build
|
|
49
|
+
- name: Validate package metadata
|
|
50
|
+
run: python -m twine check dist/*
|
|
51
|
+
- name: Upload distributions
|
|
52
|
+
uses: actions/upload-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
name: python-distributions
|
|
55
|
+
path: dist/
|
|
56
|
+
|
|
57
|
+
publish:
|
|
58
|
+
name: Publish to PyPI
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
needs: build
|
|
61
|
+
environment: pypi
|
|
62
|
+
permissions:
|
|
63
|
+
contents: read
|
|
64
|
+
id-token: write
|
|
65
|
+
steps:
|
|
66
|
+
- name: Download distributions
|
|
67
|
+
uses: actions/download-artifact@v4
|
|
68
|
+
with:
|
|
69
|
+
name: python-distributions
|
|
70
|
+
path: dist/
|
|
71
|
+
- name: Publish package
|
|
72
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
*.pyc
|
|
2
|
+
cache/
|
|
3
|
+
outputs/
|
|
4
|
+
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[codz]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py.cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# pyenv
|
|
90
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
91
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
92
|
+
# .python-version
|
|
93
|
+
|
|
94
|
+
# pipenv
|
|
95
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
96
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
97
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
98
|
+
# install all needed dependencies.
|
|
99
|
+
#Pipfile.lock
|
|
100
|
+
|
|
101
|
+
# UV
|
|
102
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
103
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
104
|
+
# commonly ignored for libraries.
|
|
105
|
+
#uv.lock
|
|
106
|
+
|
|
107
|
+
# poetry
|
|
108
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
109
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
110
|
+
# commonly ignored for libraries.
|
|
111
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
112
|
+
#poetry.lock
|
|
113
|
+
#poetry.toml
|
|
114
|
+
|
|
115
|
+
# pdm
|
|
116
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
117
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
118
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
119
|
+
#pdm.lock
|
|
120
|
+
#pdm.toml
|
|
121
|
+
.pdm-python
|
|
122
|
+
.pdm-build/
|
|
123
|
+
|
|
124
|
+
# pixi
|
|
125
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
126
|
+
#pixi.lock
|
|
127
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
128
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
129
|
+
.pixi
|
|
130
|
+
|
|
131
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
132
|
+
__pypackages__/
|
|
133
|
+
|
|
134
|
+
# Celery stuff
|
|
135
|
+
celerybeat-schedule
|
|
136
|
+
celerybeat.pid
|
|
137
|
+
|
|
138
|
+
# SageMath parsed files
|
|
139
|
+
*.sage.py
|
|
140
|
+
|
|
141
|
+
# Environments
|
|
142
|
+
.env
|
|
143
|
+
.envrc
|
|
144
|
+
.venv
|
|
145
|
+
env/
|
|
146
|
+
venv/
|
|
147
|
+
ENV/
|
|
148
|
+
env.bak/
|
|
149
|
+
venv.bak/
|
|
150
|
+
|
|
151
|
+
# Spyder project settings
|
|
152
|
+
.spyderproject
|
|
153
|
+
.spyproject
|
|
154
|
+
|
|
155
|
+
# Rope project settings
|
|
156
|
+
.ropeproject
|
|
157
|
+
|
|
158
|
+
# mkdocs documentation
|
|
159
|
+
/site
|
|
160
|
+
|
|
161
|
+
# mypy
|
|
162
|
+
.mypy_cache/
|
|
163
|
+
.dmypy.json
|
|
164
|
+
dmypy.json
|
|
165
|
+
|
|
166
|
+
# Pyre type checker
|
|
167
|
+
.pyre/
|
|
168
|
+
|
|
169
|
+
# pytype static type analyzer
|
|
170
|
+
.pytype/
|
|
171
|
+
|
|
172
|
+
# Cython debug symbols
|
|
173
|
+
cython_debug/
|
|
174
|
+
|
|
175
|
+
# PyCharm
|
|
176
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
177
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
178
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
179
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
180
|
+
#.idea/
|
|
181
|
+
# Covers JetBrains IDEs: IntelliJ, GoLand, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
|
182
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
183
|
+
|
|
184
|
+
# User-specific stuff
|
|
185
|
+
.idea/**/workspace.xml
|
|
186
|
+
.idea/**/tasks.xml
|
|
187
|
+
.idea/**/usage.statistics.xml
|
|
188
|
+
.idea/**/dictionaries
|
|
189
|
+
.idea/**/shelf
|
|
190
|
+
|
|
191
|
+
# AWS User-specific
|
|
192
|
+
.idea/**/aws.xml
|
|
193
|
+
|
|
194
|
+
# Generated files
|
|
195
|
+
.idea/**/contentModel.xml
|
|
196
|
+
|
|
197
|
+
# Sensitive or high-churn files
|
|
198
|
+
.idea/**/dataSources/
|
|
199
|
+
.idea/**/dataSources.ids
|
|
200
|
+
.idea/**/dataSources.local.xml
|
|
201
|
+
.idea/**/sqlDataSources.xml
|
|
202
|
+
.idea/**/dynamic.xml
|
|
203
|
+
.idea/**/uiDesigner.xml
|
|
204
|
+
.idea/**/dbnavigator.xml
|
|
205
|
+
|
|
206
|
+
# Gradle
|
|
207
|
+
.idea/**/gradle.xml
|
|
208
|
+
.idea/**/libraries
|
|
209
|
+
|
|
210
|
+
# Gradle and Maven with auto-import
|
|
211
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
|
212
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
|
213
|
+
# auto-import.
|
|
214
|
+
# .idea/artifacts
|
|
215
|
+
# .idea/compiler.xml
|
|
216
|
+
# .idea/jarRepositories.xml
|
|
217
|
+
.idea/modules.xml
|
|
218
|
+
# .idea/*.iml
|
|
219
|
+
# .idea/modules
|
|
220
|
+
# *.iml
|
|
221
|
+
# *.ipr
|
|
222
|
+
|
|
223
|
+
# CMake
|
|
224
|
+
cmake-build-*/
|
|
225
|
+
|
|
226
|
+
# Mongo Explorer plugin
|
|
227
|
+
.idea/**/mongoSettings.xml
|
|
228
|
+
|
|
229
|
+
# File-based project format
|
|
230
|
+
*.iws
|
|
231
|
+
|
|
232
|
+
# IntelliJ
|
|
233
|
+
out/
|
|
234
|
+
|
|
235
|
+
# mpeltonen/sbt-idea plugin
|
|
236
|
+
.idea_modules/
|
|
237
|
+
|
|
238
|
+
# JIRA plugin
|
|
239
|
+
atlassian-ide-plugin.xml
|
|
240
|
+
|
|
241
|
+
# Cursive Clojure plugin
|
|
242
|
+
.idea/replstate.xml
|
|
243
|
+
|
|
244
|
+
# SonarLint plugin
|
|
245
|
+
.idea/sonarlint/
|
|
246
|
+
.idea/sonarlint.xml # see https://community.sonarsource.com/t/is-the-file-idea-idea-idea-sonarlint-xml-intended-to-be-under-source-control/121119
|
|
247
|
+
|
|
248
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
249
|
+
com_crashlytics_export_strings.xml
|
|
250
|
+
crashlytics.properties
|
|
251
|
+
crashlytics-build.properties
|
|
252
|
+
fabric.properties
|
|
253
|
+
|
|
254
|
+
# Editor-based HTTP Client
|
|
255
|
+
.idea/httpRequests
|
|
256
|
+
http-client.private.env.json
|
|
257
|
+
|
|
258
|
+
# Android studio 3.1+ serialized cache file
|
|
259
|
+
.idea/caches/build_file_checksums.ser
|
|
260
|
+
|
|
261
|
+
# Apifox Helper cache
|
|
262
|
+
.idea/.cache/.Apifox_Helper
|
|
263
|
+
.idea/ApifoxUploaderProjectSetting.xml
|
|
264
|
+
|
|
265
|
+
# Github Copilot persisted session migrations, see: https://github.com/microsoft/copilot-intellij-feedback/issues/712#issuecomment-3322062215
|
|
266
|
+
.idea/**/copilot.data.migration.*.xml
|
|
267
|
+
|
|
268
|
+
# Abstra
|
|
269
|
+
# Abstra is an AI-powered process automation framework.
|
|
270
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
271
|
+
# Learn more at https://abstra.io/docs
|
|
272
|
+
.abstra/
|
|
273
|
+
|
|
274
|
+
# Visual Studio Code
|
|
275
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
276
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
277
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
278
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
279
|
+
# .vscode/
|
|
280
|
+
.vscode/*
|
|
281
|
+
!.vscode/settings.json
|
|
282
|
+
!.vscode/tasks.json
|
|
283
|
+
!.vscode/launch.json
|
|
284
|
+
!.vscode/extensions.json
|
|
285
|
+
!.vscode/*.code-snippets
|
|
286
|
+
!*.code-workspace
|
|
287
|
+
|
|
288
|
+
# Built Visual Studio Code Extensions
|
|
289
|
+
*.vsix
|
|
290
|
+
|
|
291
|
+
# Ruff stuff:
|
|
292
|
+
.ruff_cache/
|
|
293
|
+
|
|
294
|
+
# PyPI configuration file
|
|
295
|
+
.pypirc
|
|
296
|
+
|
|
297
|
+
# Cursor
|
|
298
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
299
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
300
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
301
|
+
.cursorignore
|
|
302
|
+
.cursorindexingignore
|
|
303
|
+
|
|
304
|
+
# Marimo
|
|
305
|
+
marimo/_static/
|
|
306
|
+
marimo/_lsp/
|
|
307
|
+
__marimo__/
|
|
308
|
+
|
|
309
|
+
*.csv
|
|
310
|
+
*.xlsx
|
|
311
|
+
/translate/api_key.txt
|
|
312
|
+
/stateCongess_apiKey.txt
|
|
313
|
+
/scripts/api_key.txt
|
|
314
|
+
/playground.ipynb
|
|
315
|
+
data/
|
|
316
|
+
.claude/
|
|
317
|
+
.vscode/
|
|
318
|
+
.tmp_pytest/
|
|
319
|
+
graphify-out/manifest.json
|
|
320
|
+
graphify-out/cost.json
|
|
321
|
+
graphify-out/.graphify_python
|
|
322
|
+
graphify-out/.graphify_root
|
|
323
|
+
graphify-out/cache/
|
|
324
|
+
docs/
|
|
325
|
+
.codex/
|