Immaculate 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.
@@ -0,0 +1,69 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ env:
9
+ # Cargo builds and links the Rust tests against the project's Python, not the system one
10
+ PYO3_PYTHON: ${{ github.workspace }}/.venv/bin/python
11
+ # uv's own Python builds ship the shared libpython that linking the Rust tests needs
12
+ UV_PYTHON_PREFERENCE: only-managed
13
+
14
+ jobs:
15
+ lint:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v5
19
+ - uses: astral-sh/setup-uv@v6
20
+ with:
21
+ enable-cache: true
22
+ # Syncing installs the project, which builds the Rust extension
23
+ - uses: Swatinem/rust-cache@v2
24
+ - run: uv sync --locked
25
+ - run: uv run --locked ruff check .
26
+ - run: uv run --locked ruff format --check .
27
+ - run: uv run --locked ty check
28
+ - run: cargo fmt --check
29
+ - run: cargo clippy --all-targets --locked -- -D warnings
30
+
31
+ test:
32
+ runs-on: ubuntu-latest
33
+ steps:
34
+ - uses: actions/checkout@v5
35
+ - uses: astral-sh/setup-uv@v6
36
+ with:
37
+ enable-cache: true
38
+ - uses: Swatinem/rust-cache@v2
39
+ - run: uv sync --locked
40
+ - run: uv run --locked pytest
41
+ - run: cargo test --locked
42
+
43
+ docs:
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@v5
47
+ - uses: astral-sh/setup-uv@v6
48
+ with:
49
+ enable-cache: true
50
+ # mkdocstrings reads the source statically, so the Rust extension isn't built
51
+ - run: uv run --locked --only-group docs mkdocs build --strict
52
+ - uses: actions/upload-pages-artifact@v4
53
+ if: github.event_name == 'push'
54
+ with:
55
+ path: site
56
+
57
+ deploy-docs:
58
+ if: github.event_name == 'push'
59
+ needs: docs
60
+ runs-on: ubuntu-latest
61
+ permissions:
62
+ pages: write
63
+ id-token: write
64
+ environment:
65
+ name: github-pages
66
+ url: ${{ steps.deployment.outputs.page_url }}
67
+ steps:
68
+ - id: deployment
69
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,112 @@
1
+ name: Release
2
+
3
+ # Builds the sdist and a wheel for each platform ONNX Runtime has wheels for, tests each
4
+ # wheel on its own platform, and on a version tag publishes them to TestPyPI, then PyPI; see
5
+ # DEPLOYMENT.md
6
+ on:
7
+ push:
8
+ tags: ["v*"]
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ wheels:
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ include:
20
+ - os: ubuntu-latest
21
+ - os: ubuntu-24.04-arm
22
+ - os: macos-latest
23
+ # ONNX Runtime's last Intel Mac wheels are 1.23.2, which pip picks there
24
+ - os: macos-15-intel
25
+ - os: windows-latest
26
+ - os: windows-11-arm
27
+ python-arch: arm64
28
+ runs-on: ${{ matrix.os }}
29
+ steps:
30
+ - uses: actions/checkout@v5
31
+ - id: python
32
+ uses: actions/setup-python@v5
33
+ with:
34
+ python-version: "3.12"
35
+ architecture: ${{ matrix.python-arch }}
36
+ - uses: dtolnay/rust-toolchain@stable
37
+ - uses: PyO3/maturin-action@v1
38
+ with:
39
+ maturin-version: v1.15.0
40
+ args: --release --out dist
41
+ # ONNX Runtime's own Linux wheels need glibc 2.28
42
+ manylinux: "2_28"
43
+ - uses: astral-sh/setup-uv@v6
44
+ # Tests the built wheel, not the source tree: the dev group has no project, so syncing
45
+ # it doesn't build Immaculate
46
+ - name: Test the wheel
47
+ shell: bash
48
+ # Only uv sync is given the Python: with UV_PYTHON set, uv pip would install into that
49
+ # interpreter instead of .venv
50
+ env:
51
+ PYTHON: ${{ steps.python.outputs.python-path }}
52
+ run: |
53
+ uv sync --locked --only-group dev --python "$PYTHON"
54
+ uv pip install dist/*.whl
55
+ uv run --no-sync pytest
56
+ - uses: actions/upload-artifact@v4
57
+ with:
58
+ name: wheel-${{ matrix.os }}
59
+ path: dist/*.whl
60
+
61
+ sdist:
62
+ runs-on: ubuntu-latest
63
+ steps:
64
+ - uses: actions/checkout@v5
65
+ - uses: PyO3/maturin-action@v1
66
+ with:
67
+ maturin-version: v1.15.0
68
+ command: sdist
69
+ args: --out dist
70
+ - uses: actions/upload-artifact@v4
71
+ with:
72
+ name: sdist
73
+ path: dist/*.tar.gz
74
+
75
+ # Uploads use trusted publishing, so no tokens are stored; each index trusts this workflow
76
+ # in the environment named below
77
+ publish-testpypi:
78
+ if: startsWith(github.ref, 'refs/tags/v')
79
+ needs: [wheels, sdist]
80
+ runs-on: ubuntu-latest
81
+ environment:
82
+ name: testpypi
83
+ url: https://test.pypi.org/project/immaculate/
84
+ permissions:
85
+ id-token: write
86
+ steps:
87
+ - uses: actions/download-artifact@v4
88
+ with:
89
+ path: dist
90
+ merge-multiple: true
91
+ # PyPI never accepts a version twice, so a tag like v0.1.0-test mustn't upload 0.1.0
92
+ - name: Check the tag matches the version
93
+ run: test -f "dist/immaculate-${GITHUB_REF_NAME#v}.tar.gz"
94
+ - uses: pypa/gh-action-pypi-publish@release/v1
95
+ with:
96
+ repository-url: https://test.pypi.org/legacy/
97
+
98
+ # The pypi environment needs approval, so there's time to check the TestPyPI release first
99
+ publish-pypi:
100
+ needs: publish-testpypi
101
+ runs-on: ubuntu-latest
102
+ environment:
103
+ name: pypi
104
+ url: https://pypi.org/project/immaculate/
105
+ permissions:
106
+ id-token: write
107
+ steps:
108
+ - uses: actions/download-artifact@v4
109
+ with:
110
+ path: dist
111
+ merge-multiple: true
112
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,22 @@
1
+ benchmark/data/
2
+ benchmark/results/raw/
3
+ DEPLOYMENT.md
4
+ MEMORY.md
5
+
6
+ # Rust
7
+ target/
8
+
9
+ # Python
10
+ __pycache__/
11
+ *.py[cod]
12
+ *.so
13
+ .venv/
14
+ dist/
15
+ .pytest_cache/
16
+ .ruff_cache/
17
+
18
+ # Built documentation
19
+ site/
20
+
21
+ # Local development scripts and environments, not pushed
22
+ dev/
@@ -0,0 +1 @@
1
+ 3.12