pysdccc 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.
- pysdccc-0.1.0/.github/pull_request_template.md +14 -0
- pysdccc-0.1.0/.github/workflows/build.yml +137 -0
- pysdccc-0.1.0/.github/workflows/publish.yml +88 -0
- pysdccc-0.1.0/.gitignore +164 -0
- pysdccc-0.1.0/.pre-commit-config.yaml +58 -0
- pysdccc-0.1.0/.python-version +1 -0
- pysdccc-0.1.0/CHANGELOG.md +12 -0
- pysdccc-0.1.0/CONTRIBUTING.md +145 -0
- pysdccc-0.1.0/Contributor_License_Agreement.md +123 -0
- pysdccc-0.1.0/LICENSE +21 -0
- pysdccc-0.1.0/PKG-INFO +245 -0
- pysdccc-0.1.0/README.md +201 -0
- pysdccc-0.1.0/codecov.yml +4 -0
- pysdccc-0.1.0/pyproject.toml +130 -0
- pysdccc-0.1.0/src/pysdccc/__init__.py +25 -0
- pysdccc-0.1.0/src/pysdccc/_cli.py +145 -0
- pysdccc-0.1.0/src/pysdccc/_common.py +57 -0
- pysdccc-0.1.0/src/pysdccc/_download.py +119 -0
- pysdccc-0.1.0/src/pysdccc/_result_parser.py +130 -0
- pysdccc-0.1.0/src/pysdccc/_runner.py +311 -0
- pysdccc-0.1.0/src/pysdccc/py.typed +0 -0
- pysdccc-0.1.0/tests/__init__.py +0 -0
- pysdccc-0.1.0/tests/sdccc_example_results/TEST-SDCcc_direct.xml +296 -0
- pysdccc-0.1.0/tests/sdccc_example_results/TEST-SDCcc_invariant.xml +296 -0
- pysdccc-0.1.0/tests/sdccc_example_results/sdccc_result.xml +296 -0
- pysdccc-0.1.0/tests/test_common.py +95 -0
- pysdccc-0.1.0/tests/test_download.py +70 -0
- pysdccc-0.1.0/tests/test_result_parser.py +105 -0
- pysdccc-0.1.0/tests/test_runner.py +340 -0
- pysdccc-0.1.0/tests/testversion/configuration/config.toml +46 -0
- pysdccc-0.1.0/tests/testversion/configuration/test_configuration.toml +102 -0
- pysdccc-0.1.0/tests/testversion/sdccc.exe +0 -0
- pysdccc-0.1.0/uv.lock +480 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!--- Provide a general summary of your changes in the title above -->
|
|
2
|
+
<!--- Link the corresponding issues after you created the pull request -->
|
|
3
|
+
|
|
4
|
+
## Types of changes
|
|
5
|
+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
|
|
6
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
7
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
8
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
|
|
9
|
+
|
|
10
|
+
## Checklist:
|
|
11
|
+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
|
|
12
|
+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
|
13
|
+
- [ ] I have updated the [changelog](../CHANGELOG.md) accordingly.
|
|
14
|
+
- [ ] I have added tests to cover my changes.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
on:
|
|
2
|
+
workflow_call:
|
|
3
|
+
pull_request:
|
|
4
|
+
types: [ opened, synchronize, reopened, ready_for_review ]
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
name: Lint
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Install uv
|
|
17
|
+
uses: astral-sh/setup-uv@v6
|
|
18
|
+
|
|
19
|
+
- name: Install pre-commit
|
|
20
|
+
run: uv tool install pre-commit --with pre-commit-uv --force-reinstall
|
|
21
|
+
|
|
22
|
+
- name: Run pre-commit
|
|
23
|
+
run: uvx pre-commit run --all-files
|
|
24
|
+
|
|
25
|
+
build:
|
|
26
|
+
needs: lint
|
|
27
|
+
name: Build
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
outputs:
|
|
30
|
+
WHL: ${{ steps.filenames.outputs.WHL }}
|
|
31
|
+
TARGZ: ${{ steps.filenames.outputs.TARGZ }}
|
|
32
|
+
|
|
33
|
+
steps:
|
|
34
|
+
- name: Check out Git repository
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
|
+
|
|
37
|
+
- name: Install uv
|
|
38
|
+
uses: astral-sh/setup-uv@v6
|
|
39
|
+
- run: uv venv
|
|
40
|
+
|
|
41
|
+
- name: Setup hatch
|
|
42
|
+
run: uv pip install hatch
|
|
43
|
+
|
|
44
|
+
- name: Set new version
|
|
45
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
46
|
+
run: |
|
|
47
|
+
uv run hatch version ${GITHUB_REF/refs\/tags\/v/}
|
|
48
|
+
|
|
49
|
+
- name: Build package
|
|
50
|
+
run: uv build
|
|
51
|
+
|
|
52
|
+
- name: Set filenames in output
|
|
53
|
+
id: filenames
|
|
54
|
+
run: |
|
|
55
|
+
echo WHL=$(echo dist/*.whl) >> $GITHUB_OUTPUT
|
|
56
|
+
echo TARGZ=$(echo dist/*.tar.gz) >> $GITHUB_OUTPUT
|
|
57
|
+
|
|
58
|
+
- name: Archive package
|
|
59
|
+
uses: actions/upload-artifact@v4
|
|
60
|
+
with:
|
|
61
|
+
name: distributions
|
|
62
|
+
path: dist
|
|
63
|
+
retention-days: 5
|
|
64
|
+
|
|
65
|
+
tests:
|
|
66
|
+
needs: build
|
|
67
|
+
name: Tests
|
|
68
|
+
|
|
69
|
+
strategy:
|
|
70
|
+
matrix:
|
|
71
|
+
python-version: [ "3.11", "3.12", "3.13" ]
|
|
72
|
+
os: [ ubuntu-latest, windows-latest ]
|
|
73
|
+
distribution: [ "${{ needs.build.outputs.WHL }}",
|
|
74
|
+
"${{ needs.build.outputs.TARGZ }}" ]
|
|
75
|
+
runs-on: ${{ matrix.os }}
|
|
76
|
+
|
|
77
|
+
steps:
|
|
78
|
+
- name: Check out Git repository
|
|
79
|
+
uses: actions/checkout@v4
|
|
80
|
+
|
|
81
|
+
- name: Install uv
|
|
82
|
+
uses: astral-sh/setup-uv@v6
|
|
83
|
+
with:
|
|
84
|
+
python-version: ${{ matrix.python-version }}
|
|
85
|
+
- run: uv venv
|
|
86
|
+
|
|
87
|
+
- name: Download Artifact
|
|
88
|
+
uses: actions/download-artifact@v4
|
|
89
|
+
with:
|
|
90
|
+
name: distributions
|
|
91
|
+
path: dist
|
|
92
|
+
|
|
93
|
+
- name: Install package
|
|
94
|
+
run: uv pip install ${{ matrix.distribution }}
|
|
95
|
+
|
|
96
|
+
- name: Install test dependencies
|
|
97
|
+
run: uv sync --group test --frozen
|
|
98
|
+
|
|
99
|
+
- name: Detect suffix on ubuntu
|
|
100
|
+
if: ${{ matrix.os == 'ubuntu-latest' }}
|
|
101
|
+
run: |
|
|
102
|
+
echo SUFFIX=$(python -c "import pathlib;p=pathlib.Path('${{ matrix.distribution }}');print('whl') if p.suffix=='.whl' else print('tar_gz')") >> $GITHUB_ENV
|
|
103
|
+
|
|
104
|
+
- name: Detect suffix on windows
|
|
105
|
+
if: ${{ matrix.os == 'windows-latest' }}
|
|
106
|
+
# https://github.com/actions/runner-images/issues/5251#issuecomment-1071030822
|
|
107
|
+
run: |
|
|
108
|
+
echo SUFFIX=$(python -c "import pathlib;p=pathlib.Path('${{ matrix.distribution }}');print('whl') if p.suffix=='.whl' else print('tar_gz')") | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
109
|
+
|
|
110
|
+
- name: Run pytest
|
|
111
|
+
run: >-
|
|
112
|
+
uv run pytest
|
|
113
|
+
--html=pytest_reports/unittest_report_${{ matrix.os }}_py${{ matrix.python-version }}_${{ env.SUFFIX }}.html
|
|
114
|
+
--self-contained-html
|
|
115
|
+
--log-file pytest_${{ matrix.os }}_py${{ matrix.python-version }}_${{ env.SUFFIX }}.log
|
|
116
|
+
--cov=src --cov-branch --cov-report=xml
|
|
117
|
+
|
|
118
|
+
- name: Archive test result
|
|
119
|
+
uses: actions/upload-artifact@v4
|
|
120
|
+
if: success() || failure() # upload artifacts also if test stage failed
|
|
121
|
+
with:
|
|
122
|
+
name: unittest_reports-${{ matrix.os }}-py${{ matrix.python-version }}-${{ env.SUFFIX }}
|
|
123
|
+
path: pytest_reports/unittest_report_${{ matrix.os }}_py${{ matrix.python-version }}_${{ env.SUFFIX }}.html
|
|
124
|
+
retention-days: 5
|
|
125
|
+
|
|
126
|
+
- name: Archive test log
|
|
127
|
+
uses: actions/upload-artifact@v4
|
|
128
|
+
if: success() || failure() # upload artifacts also if test stage failed
|
|
129
|
+
with:
|
|
130
|
+
name: pytest_logs-${{ matrix.os }}-py${{ matrix.python-version }}-${{ env.SUFFIX }}
|
|
131
|
+
path: pytest_${{ matrix.os }}_py${{ matrix.python-version }}_${{ env.SUFFIX }}.log
|
|
132
|
+
retention-days: 5
|
|
133
|
+
|
|
134
|
+
- name: Upload coverage reports to Codecov
|
|
135
|
+
uses: codecov/codecov-action@v5
|
|
136
|
+
with:
|
|
137
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
name: Publish package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v[0-9]+.[0-9]+.[0-9]+" # normal release
|
|
7
|
+
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+" # release candidate
|
|
8
|
+
- "v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+" # alpha or beta release
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
uses: ./.github/workflows/build.yml
|
|
13
|
+
|
|
14
|
+
upload:
|
|
15
|
+
name: Upload
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
needs: build
|
|
18
|
+
outputs:
|
|
19
|
+
DO_GITHUB_RELEASE: ${{ steps.detect-release.outputs.DO_GITHUB_RELEASE }}
|
|
20
|
+
environment:
|
|
21
|
+
name: pypi
|
|
22
|
+
url: https://pypi.org/p/pysdccc
|
|
23
|
+
permissions:
|
|
24
|
+
id-token: write
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- name: Download Artifact
|
|
28
|
+
uses: actions/download-artifact@v4
|
|
29
|
+
with:
|
|
30
|
+
name: distributions
|
|
31
|
+
path: dist/
|
|
32
|
+
|
|
33
|
+
- name: Publish package to PyPI
|
|
34
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
35
|
+
|
|
36
|
+
- name: Detect release version
|
|
37
|
+
id: detect-release
|
|
38
|
+
run: |
|
|
39
|
+
do_github_release=$((echo "${GITHUB_REF}" | grep -Eq "^refs\/tags\/v[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?$") && echo 1 || echo 0)
|
|
40
|
+
echo DO_GITHUB_RELEASE=$do_github_release >> $GITHUB_OUTPUT
|
|
41
|
+
echo DO_GITHUB_RELEASE=$do_github_release
|
|
42
|
+
|
|
43
|
+
release:
|
|
44
|
+
name: Release
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
needs: upload
|
|
47
|
+
if: needs.upload.outputs.DO_GITHUB_RELEASE == '1'
|
|
48
|
+
permissions:
|
|
49
|
+
contents: write
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- name: Check out Git repository
|
|
53
|
+
uses: actions/checkout@v4
|
|
54
|
+
|
|
55
|
+
- name: Download Build
|
|
56
|
+
uses: actions/download-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
name: distributions
|
|
59
|
+
path: dist
|
|
60
|
+
|
|
61
|
+
- name: Download unittest reports
|
|
62
|
+
uses: actions/download-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
pattern: unittest_reports-*
|
|
65
|
+
path: pytest_reports/
|
|
66
|
+
|
|
67
|
+
- name: Zip unittest reports
|
|
68
|
+
uses: vimtor/action-zip@v1
|
|
69
|
+
with:
|
|
70
|
+
files: pytest_reports/
|
|
71
|
+
dest: pytest_reports/test_reports.zip
|
|
72
|
+
|
|
73
|
+
- name: Detect prerelease
|
|
74
|
+
id: detect-prerelease
|
|
75
|
+
run: |
|
|
76
|
+
do_prerelease=$((echo "${GITHUB_REF}" | grep -Eq "^refs\/tags\/v[0-9]+\.[0-9]+\.[0-9]+rc[0-9]+$") && echo 1 || echo 0)
|
|
77
|
+
echo DO_PRERELEASE=$do_prerelease >> $GITHUB_ENV
|
|
78
|
+
echo DO_PRERELEASE=$do_prerelease
|
|
79
|
+
|
|
80
|
+
- name: Attach artifacts to github release
|
|
81
|
+
uses: softprops/action-gh-release@v2
|
|
82
|
+
with:
|
|
83
|
+
files: |
|
|
84
|
+
CHANGELOG.md
|
|
85
|
+
dist/*
|
|
86
|
+
pytest_reports/test_reports.zip
|
|
87
|
+
prerelease: ${{ env.DO_PRERELEASE == '1' }}
|
|
88
|
+
body_path: CHANGELOG.md
|
pysdccc-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
### Python template
|
|
2
|
+
# Byte-compiled / optimized / DLL files
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.py[cod]
|
|
5
|
+
*$py.class
|
|
6
|
+
|
|
7
|
+
# C extensions
|
|
8
|
+
*.so
|
|
9
|
+
|
|
10
|
+
# Distribution / packaging
|
|
11
|
+
.Python
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
#Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# poetry
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
103
|
+
#poetry.lock
|
|
104
|
+
|
|
105
|
+
# pdm
|
|
106
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
107
|
+
#pdm.lock
|
|
108
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
109
|
+
# in version control.
|
|
110
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
111
|
+
.pdm.toml
|
|
112
|
+
|
|
113
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
114
|
+
__pypackages__/
|
|
115
|
+
|
|
116
|
+
# Celery stuff
|
|
117
|
+
celerybeat-schedule
|
|
118
|
+
celerybeat.pid
|
|
119
|
+
|
|
120
|
+
# SageMath parsed files
|
|
121
|
+
*.sage.py
|
|
122
|
+
|
|
123
|
+
# Environments
|
|
124
|
+
.env
|
|
125
|
+
.venv
|
|
126
|
+
env/
|
|
127
|
+
venv/
|
|
128
|
+
ENV/
|
|
129
|
+
env.bak/
|
|
130
|
+
venv.bak/
|
|
131
|
+
|
|
132
|
+
# Spyder project settings
|
|
133
|
+
.spyderproject
|
|
134
|
+
.spyproject
|
|
135
|
+
|
|
136
|
+
# Rope project settings
|
|
137
|
+
.ropeproject
|
|
138
|
+
|
|
139
|
+
# mkdocs documentation
|
|
140
|
+
/site
|
|
141
|
+
|
|
142
|
+
# mypy
|
|
143
|
+
.mypy_cache/
|
|
144
|
+
.dmypy.json
|
|
145
|
+
dmypy.json
|
|
146
|
+
|
|
147
|
+
# Pyre type checker
|
|
148
|
+
.pyre/
|
|
149
|
+
|
|
150
|
+
# pytype static type analyzer
|
|
151
|
+
.pytype/
|
|
152
|
+
|
|
153
|
+
# Cython debug symbols
|
|
154
|
+
cython_debug/
|
|
155
|
+
|
|
156
|
+
# PyCharm
|
|
157
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
158
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
159
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
160
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
161
|
+
#.idea/
|
|
162
|
+
|
|
163
|
+
# exclude sdccc binaries downloaded for local development
|
|
164
|
+
src/pysdccc/_sdccc/
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# This is the configuration file for pre-commit (https://pre-commit.com/).
|
|
2
|
+
# To use:
|
|
3
|
+
# * Install pre-commit (https://github.com/tox-dev/pre-commit-uv)
|
|
4
|
+
# * Copy this file as ".pre-commit-config.yaml"
|
|
5
|
+
# * Run "pre-commit install".
|
|
6
|
+
repos:
|
|
7
|
+
- repo: https://github.com/adrienverge/yamllint
|
|
8
|
+
rev: v1.35.1
|
|
9
|
+
hooks:
|
|
10
|
+
- id: yamllint
|
|
11
|
+
args: ['-d {extends: relaxed, rules: {line-length: disable, new-lines: { type: unix }}}', '-s']
|
|
12
|
+
|
|
13
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
14
|
+
rev: v5.0.0
|
|
15
|
+
hooks:
|
|
16
|
+
- id: check-toml
|
|
17
|
+
- id: check-yaml
|
|
18
|
+
- id: debug-statements
|
|
19
|
+
- id: end-of-file-fixer
|
|
20
|
+
- id: mixed-line-ending
|
|
21
|
+
args: [ "--fix=lf" ]
|
|
22
|
+
- id: trailing-whitespace
|
|
23
|
+
- id: check-executables-have-shebangs
|
|
24
|
+
- id: check-illegal-windows-names
|
|
25
|
+
|
|
26
|
+
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
27
|
+
rev: 0.6.3
|
|
28
|
+
hooks:
|
|
29
|
+
# Update the uv lockfile
|
|
30
|
+
- id: uv-lock
|
|
31
|
+
|
|
32
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
33
|
+
rev: v0.9.7
|
|
34
|
+
hooks:
|
|
35
|
+
- id: ruff
|
|
36
|
+
args: [--fix, --show-fixes]
|
|
37
|
+
- id: ruff-format
|
|
38
|
+
|
|
39
|
+
- repo: https://github.com/RobertCraigie/pyright-python
|
|
40
|
+
rev: v1.1.394
|
|
41
|
+
hooks:
|
|
42
|
+
- id: pyright
|
|
43
|
+
additional_dependencies:
|
|
44
|
+
- click >= 8
|
|
45
|
+
- pytest >= 8
|
|
46
|
+
- lxml-stubs >= 0.5.1
|
|
47
|
+
- junitparser >= 3.1.2
|
|
48
|
+
- httpx >= 0.28.0
|
|
49
|
+
|
|
50
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
51
|
+
rev: v1.10.0
|
|
52
|
+
hooks:
|
|
53
|
+
- id: python-check-blanket-noqa
|
|
54
|
+
- id: python-check-blanket-type-ignore
|
|
55
|
+
- id: python-check-mock-methods
|
|
56
|
+
- id: python-no-eval
|
|
57
|
+
- id: python-no-log-warn
|
|
58
|
+
- id: python-use-type-annotations
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the pysdccc module will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2025-05-16
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- initial code
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# How to contribute to Drägerwerk pysdccc
|
|
2
|
+
|
|
3
|
+
Welcome to our project. We are glad you want to improve this open source library. We at Dräger want to create technology
|
|
4
|
+
for life and help to create a better future 🚀.
|
|
5
|
+
|
|
6
|
+
If you provide Markdown documents, issues, pull request or discussions we strongly encourage you
|
|
7
|
+
to [format your text](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)
|
|
8
|
+
as it greatly helps to read and to understand your provided information.
|
|
9
|
+
|
|
10
|
+
For this open source project
|
|
11
|
+
the [Contributor License Agreement](https://github.com/Draegerwerk/sdc11073/blob/master/Contributor_License_Agreement.md)
|
|
12
|
+
governs
|
|
13
|
+
all relevant activities and your contributions. By contributing to the project you agree to be bound by this Agreement
|
|
14
|
+
and to license your work accordingly.
|
|
15
|
+
|
|
16
|
+
## How to set up the project for development
|
|
17
|
+
|
|
18
|
+
- As we restricted pushing directly to one of pysdccc's branches, you have
|
|
19
|
+
to [create a fork](https://github.com/Draegerwerk/pysdccc/fork) where you can push your changes before creating a
|
|
20
|
+
pull request.
|
|
21
|
+
- Install the dependencies, e.g. with `uv sync --dev --all-extras`.
|
|
22
|
+
- Install [tox-uv](https://github.com/tox-dev/tox-uv) if you use [uv](https://docs.astral.sh/uv/) or [tox](https://pypi.org/project/tox/) if you don't
|
|
23
|
+
- Before making any commits, ensure
|
|
24
|
+
you [sign your commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).
|
|
25
|
+
|
|
26
|
+
## Get support
|
|
27
|
+
|
|
28
|
+
By following these guidelines, you help us to address your concerns more efficiently.
|
|
29
|
+
|
|
30
|
+
### Create an issue
|
|
31
|
+
|
|
32
|
+
If you encounter any problems or have suggestions for improvements, we encourage you to create
|
|
33
|
+
an [issue](https://github.com/Draegerwerk/pysdccc/issues/new/).
|
|
34
|
+
|
|
35
|
+
Here's how you can do it effectively:
|
|
36
|
+
|
|
37
|
+
1. **Search Existing Issues**: Before creating a new issue, please search the existing issues to avoid duplicates. If
|
|
38
|
+
you find an issue that addresses your problem or suggestion, feel free to add a comment to it.
|
|
39
|
+
|
|
40
|
+
2. **Provide Detailed Information**: Give a concise and informative title and fill out the rest of the form to your best
|
|
41
|
+
knowledge. The more information you provide the better we can help you.
|
|
42
|
+
|
|
43
|
+
3. **Submit the Issue**: Once you've filled out all the necessary information, submit the issue.
|
|
44
|
+
|
|
45
|
+
## Coding Standards / Style Guide
|
|
46
|
+
|
|
47
|
+
This section outlines the coding standards and style guidelines for our project. Adhering to these guidelines ensures
|
|
48
|
+
code readability, maintainability, and consistency across the project. It's crucial for all contributors to follow these
|
|
49
|
+
practices to facilitate collaboration and code quality.
|
|
50
|
+
|
|
51
|
+
### General Principles
|
|
52
|
+
|
|
53
|
+
- **Readability**: Code should be written to be readable by humans. Clarity is preferred over cleverness.
|
|
54
|
+
- **Consistency**: Follow the established patterns and practices in the project.
|
|
55
|
+
- **Simplicity**: Strive for simplicity in your code. Avoid unnecessary complexity.
|
|
56
|
+
|
|
57
|
+
### Formatting / Static Code Analysis
|
|
58
|
+
|
|
59
|
+
- Use [ruff](https://docs.astral.sh/ruff/) to ensure your code adheres to our coding standards.
|
|
60
|
+
- Use [pyright](https://github.com/microsoft/pyright) for type checking. Ensure your code is typed and passes pyright checks.
|
|
61
|
+
|
|
62
|
+
Checkout our [`pyproject.toml`](https://github.com/Draegerwerk/pysdccc/blob/main/pyproject.toml) for more details.
|
|
63
|
+
|
|
64
|
+
### Naming Conventions
|
|
65
|
+
|
|
66
|
+
- **Modules**: Use short, lowercase names. If necessary, use underscores to improve readability (e.g., `my_module`).
|
|
67
|
+
- **Classes**: Use the CapWords convention (e.g., `MyClass`).
|
|
68
|
+
- **Functions and Variables**: Use lowercase with words separated by underscores (e.g., `my_function`).
|
|
69
|
+
- **Constants**: Use all uppercase with words separated by underscores (e.g., `MY_CONSTANT`).
|
|
70
|
+
|
|
71
|
+
### Comments
|
|
72
|
+
|
|
73
|
+
- Use inline comments sparingly and ensure they are relevant and add value.
|
|
74
|
+
- Write docstrings for all public modules, functions, classes, and methods. Follow
|
|
75
|
+
the [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) format.
|
|
76
|
+
|
|
77
|
+
## Testing / Coverage
|
|
78
|
+
|
|
79
|
+
We take testing seriously to ensure the reliability and stability of our project. Here's how you can contribute to
|
|
80
|
+
testing:
|
|
81
|
+
|
|
82
|
+
### Running Tests
|
|
83
|
+
|
|
84
|
+
- To run the existing test suite, execute `pytest` at the root of the project. This will run all tests and display a
|
|
85
|
+
report.
|
|
86
|
+
- Ensure that all tests pass before submitting a pull request.
|
|
87
|
+
|
|
88
|
+
### Writing Tests
|
|
89
|
+
|
|
90
|
+
- When adding new features or fixing bugs, write tests that cover your changes. We strive for comprehensive test
|
|
91
|
+
coverage to maintain code quality.
|
|
92
|
+
- Follow our project's conventions for test structure and naming. Tests should be placed in the `tests` directory.
|
|
93
|
+
- Use descriptive test function names that clearly state what is being tested.
|
|
94
|
+
|
|
95
|
+
By following these guidelines, you help ensure that our project remains stable, reliable, and easy to maintain. Thank
|
|
96
|
+
you for contributing to our tests!
|
|
97
|
+
|
|
98
|
+
## How to create a pull request
|
|
99
|
+
|
|
100
|
+
Creating a pull request is a critical step in contributing to our project. Here's how to do it effectively:
|
|
101
|
+
|
|
102
|
+
1. **Ensure Your Branch is Up-to-Date**: Before starting, make sure your branch is up-to-date with the branch you're
|
|
103
|
+
planning to merge into.
|
|
104
|
+
|
|
105
|
+
2. **Check Your Changes**:
|
|
106
|
+
- Run `tox` to check your changes. Ensure all tests pass and the code is formatted correctly.
|
|
107
|
+
|
|
108
|
+
3. **Commit Your Changes**: Commit your changes with clear, descriptive commit messages.
|
|
109
|
+
|
|
110
|
+
4. **Push to Your Fork**: Push your changes to your fork of the repository.
|
|
111
|
+
|
|
112
|
+
5. **Create the Pull Request**:
|
|
113
|
+
- Navigate to the original repository you forked from.
|
|
114
|
+
- Click on the "Pull requests" tab and then the "New pull request" button.
|
|
115
|
+
- Choose your fork and the branch with your changes as the "compare" branch and the branch of our repository you
|
|
116
|
+
want to merge into as the "base" branch.
|
|
117
|
+
- Fill in the pull request form with a clear title and a detailed description of your changes.
|
|
118
|
+
- If your pull request is related to an issue or discussion thread, reference it in the description or/and under
|
|
119
|
+
the "Development" section.
|
|
120
|
+
|
|
121
|
+
6. **Review and Adjust**:
|
|
122
|
+
- After submitting, at least one of our maintainers has to review your pull request. Be open to feedback also from
|
|
123
|
+
other contributors and ready to make adjustments as needed.
|
|
124
|
+
- If requested, make further commits to your branch to address feedback.
|
|
125
|
+
|
|
126
|
+
7. **Acceptance and Merge**:
|
|
127
|
+
- Once your pull request is approved by a project maintainer and all CI checks pass, it will be merged.
|
|
128
|
+
- Congratulations! You've successfully contributed to the project.
|
|
129
|
+
|
|
130
|
+
## Acknowledgment
|
|
131
|
+
|
|
132
|
+
We thank the following contributors for their valuable contributions to the project:
|
|
133
|
+
|
|
134
|
+
- 2024 Leon Budnick
|
|
135
|
+
|
|
136
|
+
If you want to be listed as a contributor, add your information in the following format:
|
|
137
|
+
|
|
138
|
+
```markdown
|
|
139
|
+
- <year(s) of contribution(s)> <your name> <optionally your email>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
If you have contributed in multiple years, you can define a range of years like `2020-2024` or single years
|
|
143
|
+
like `2020-2022,2024`. Remember to update them with your first contribution in that year.
|
|
144
|
+
|
|
145
|
+
**Thank you for contributing to our project!**
|