pyaga8 0.1.7__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.
- pyaga8-0.1.7/.github/workflows/python-package.yml +49 -0
- pyaga8-0.1.7/.github/workflows/release.yml +44 -0
- pyaga8-0.1.7/.gitignore +72 -0
- pyaga8-0.1.7/Cargo.lock +561 -0
- pyaga8-0.1.7/Cargo.toml +13 -0
- pyaga8-0.1.7/LICENSE +21 -0
- pyaga8-0.1.7/PKG-INFO +33 -0
- pyaga8-0.1.7/README.md +17 -0
- pyaga8-0.1.7/pyproject.toml +31 -0
- pyaga8-0.1.7/src/lib.rs +444 -0
- pyaga8-0.1.7/tests/__init__.py +23 -0
- pyaga8-0.1.7/tests/test_aga8.py +211 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
3
|
+
|
|
4
|
+
name: Python package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ "main" ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "main" ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.9", "3.10", "3.11"]
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
24
|
+
uses: actions/setup-python@v3
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python-version }}
|
|
27
|
+
- name: Lint Rust code
|
|
28
|
+
run: |
|
|
29
|
+
cargo clippy
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: |
|
|
32
|
+
python -m venv .venv
|
|
33
|
+
. ./.venv/bin/activate
|
|
34
|
+
python -m pip install --upgrade pip
|
|
35
|
+
python -m pip install flake8 pytest
|
|
36
|
+
python -m pip install maturin
|
|
37
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
38
|
+
maturin develop
|
|
39
|
+
- name: Lint with flake8
|
|
40
|
+
run: |
|
|
41
|
+
. ./.venv/bin/activate
|
|
42
|
+
# stop the build if there are Python syntax errors or undefined names
|
|
43
|
+
flake8 tests/ --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
44
|
+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
45
|
+
flake8 tests/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
46
|
+
- name: Test with pytest
|
|
47
|
+
run: |
|
|
48
|
+
. ./.venv/bin/activate
|
|
49
|
+
pytest -v
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
5
|
+
jobs:
|
|
6
|
+
build-and-publish:
|
|
7
|
+
runs-on: ${{ matrix.os }}
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
11
|
+
python-version: ["3.9", "3.10", "3.11"]
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout repository
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
16
|
+
uses: actions/setup-python@v3
|
|
17
|
+
with:
|
|
18
|
+
python-version: ${{ matrix.python-version }}
|
|
19
|
+
- name: Install Rust
|
|
20
|
+
uses: actions-rs/toolchain@v1
|
|
21
|
+
with:
|
|
22
|
+
toolchain: stable
|
|
23
|
+
override: true
|
|
24
|
+
- name: Install maturin
|
|
25
|
+
run: pip install maturin
|
|
26
|
+
- name: Build the package
|
|
27
|
+
run: maturin build --release
|
|
28
|
+
- name: Create source distribution
|
|
29
|
+
run: maturin sdist
|
|
30
|
+
- name: Upload artifacts
|
|
31
|
+
uses: actions/upload-artifact@v3
|
|
32
|
+
with:
|
|
33
|
+
name: dist
|
|
34
|
+
path: |
|
|
35
|
+
target/wheels/*.whl
|
|
36
|
+
target/wheels/*.tar.gz
|
|
37
|
+
- name: Publish to PyPI
|
|
38
|
+
if: github.event_name == 'release'
|
|
39
|
+
env:
|
|
40
|
+
TWINE_USERNAME: __token__
|
|
41
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
42
|
+
run: |
|
|
43
|
+
pip install twine
|
|
44
|
+
twine upload target/wheels/*.whl target/wheels/*.tar.gz
|
pyaga8-0.1.7/.gitignore
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/target
|
|
2
|
+
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
.venv/
|
|
14
|
+
env/
|
|
15
|
+
bin/
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
include/
|
|
26
|
+
man/
|
|
27
|
+
venv/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
|
|
32
|
+
# Installer logs
|
|
33
|
+
pip-log.txt
|
|
34
|
+
pip-delete-this-directory.txt
|
|
35
|
+
pip-selfcheck.json
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.coverage
|
|
41
|
+
.cache
|
|
42
|
+
nosetests.xml
|
|
43
|
+
coverage.xml
|
|
44
|
+
|
|
45
|
+
# Translations
|
|
46
|
+
*.mo
|
|
47
|
+
|
|
48
|
+
# Mr Developer
|
|
49
|
+
.mr.developer.cfg
|
|
50
|
+
.project
|
|
51
|
+
.pydevproject
|
|
52
|
+
|
|
53
|
+
# Rope
|
|
54
|
+
.ropeproject
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
*.pot
|
|
59
|
+
|
|
60
|
+
.DS_Store
|
|
61
|
+
|
|
62
|
+
# Sphinx documentation
|
|
63
|
+
docs/_build/
|
|
64
|
+
|
|
65
|
+
# PyCharm
|
|
66
|
+
.idea/
|
|
67
|
+
|
|
68
|
+
# VSCode
|
|
69
|
+
.vscode/
|
|
70
|
+
|
|
71
|
+
# Pyenv
|
|
72
|
+
.python-version
|