dependency-cache 0.2.2__tar.gz → 0.2.4__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.
Files changed (31) hide show
  1. dependency_cache-0.2.4/.github/workflows/CI.yml +264 -0
  2. dependency_cache-0.2.4/.github/workflows/Test.yml +61 -0
  3. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/PKG-INFO +1 -1
  4. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/pyproject.toml +1 -1
  5. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/uv.lock +1 -1
  6. dependency_cache-0.2.2/.github/workflows/CI.yml +0 -169
  7. dependency_cache-0.2.2/.github/workflows/Test.yml +0 -44
  8. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/.gitignore +0 -0
  9. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/Cargo.lock +0 -0
  10. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/Cargo.toml +0 -0
  11. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/LICENSE +0 -0
  12. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/README.md +0 -0
  13. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/dependency_cache/__init__.py +0 -0
  14. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/dependency_cache/dependency_cache.pyi +0 -0
  15. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/dependency_cache/plot_dependency_graph.py +0 -0
  16. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/examples/automagic_dependency_example.py +0 -0
  17. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/examples/example.py +0 -0
  18. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/examples/inheritance_example.py +0 -0
  19. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/examples/manual_dependency_example.py +0 -0
  20. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/examples/runtime_dependencies_example.py +0 -0
  21. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/examples/runtime_function_calls_example.py +0 -0
  22. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/examples/static_function_calls_example.py +0 -0
  23. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/examples/use_cache_example.py +0 -0
  24. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/test_python.py +0 -0
  25. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/python/test_python_automagic.py +0 -0
  26. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/src/decorator.rs +0 -0
  27. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/src/decorator_factory.rs +0 -0
  28. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/src/dependency_cache_base.rs +0 -0
  29. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/src/dependency_graph.rs +0 -0
  30. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/src/lib.rs +0 -0
  31. {dependency_cache-0.2.2 → dependency_cache-0.2.4}/src/py_introspection_utils.rs +0 -0
@@ -0,0 +1,264 @@
1
+ # This file is autogenerated by maturin v1.14.1
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github -o .github\workflows\CI.yml
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ workflow_dispatch:
10
+ inputs:
11
+ publish:
12
+ description: "Publish to PyPI"
13
+ required: true
14
+ default: false
15
+ type: boolean
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ concurrency:
21
+ group: ${{ github.workflow }}-${{ github.ref }}
22
+ cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}
23
+
24
+ jobs:
25
+ validate:
26
+ name: Validate
27
+ runs-on: ubuntu-latest
28
+ outputs:
29
+ should_publish: ${{ steps.check.outputs.should_publish }}
30
+ steps:
31
+ - uses: actions/checkout@v6
32
+
33
+ - name: Validate dispatch inputs
34
+ if: github.event_name == 'workflow_dispatch' && inputs.publish
35
+ run: |
36
+ if [[ "${GITHUB_REF}" != refs/tags/v* ]]; then
37
+ echo "::error::publish=true requires running against a v* tag (got ${GITHUB_REF})"
38
+ exit 1
39
+ fi
40
+
41
+ - name: Check tag matches pyproject version
42
+ if: startsWith(github.ref, 'refs/tags/v')
43
+ run: |
44
+ TAG="${GITHUB_REF_NAME#v}"
45
+ VERSION=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
46
+ echo "Tag version: $TAG"
47
+ echo "pyproject version: $VERSION"
48
+ if [ "$TAG" != "$VERSION" ]; then
49
+ echo "::error::Tag version ($TAG) does not match pyproject version ($VERSION)"
50
+ exit 1
51
+ fi
52
+
53
+ - name: Decide whether to publish
54
+ id: check
55
+ run: |
56
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ] \
57
+ && [ "${{ inputs.publish }}" = "true" ] \
58
+ && [[ "${GITHUB_REF}" == refs/tags/v* ]]; then
59
+ echo "should_publish=true" >> "$GITHUB_OUTPUT"
60
+ else
61
+ echo "should_publish=false" >> "$GITHUB_OUTPUT"
62
+ fi
63
+
64
+ linux:
65
+ needs: validate
66
+ runs-on: ${{ matrix.platform.runner }}
67
+ strategy:
68
+ matrix:
69
+ platform:
70
+ - runner: ubuntu-22.04
71
+ target: x86_64
72
+ - runner: ubuntu-22.04
73
+ target: x86
74
+ - runner: ubuntu-22.04
75
+ target: aarch64
76
+ - runner: ubuntu-22.04
77
+ target: armv7
78
+ - runner: ubuntu-22.04
79
+ target: s390x
80
+ - runner: ubuntu-22.04
81
+ target: ppc64le
82
+ steps:
83
+ - uses: actions/checkout@v6
84
+ - uses: actions/setup-python@v6
85
+ with:
86
+ python-version: "3.8"
87
+ - name: Build wheels
88
+ uses: PyO3/maturin-action@v1
89
+ with:
90
+ target: ${{ matrix.platform.target }}
91
+ args: --release --out dist
92
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
93
+ manylinux: auto
94
+ - name: Build free-threaded wheels
95
+ uses: PyO3/maturin-action@v1
96
+ with:
97
+ target: ${{ matrix.platform.target }}
98
+ args: --release --out dist -i python3.14t
99
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
100
+ manylinux: auto
101
+ - name: Upload wheels
102
+ uses: actions/upload-artifact@v6
103
+ with:
104
+ name: wheels-linux-${{ matrix.platform.target }}
105
+ path: dist
106
+
107
+ musllinux:
108
+ needs: validate
109
+ runs-on: ${{ matrix.platform.runner }}
110
+ strategy:
111
+ matrix:
112
+ platform:
113
+ - runner: ubuntu-22.04
114
+ target: x86_64
115
+ - runner: ubuntu-22.04
116
+ target: x86
117
+ - runner: ubuntu-22.04
118
+ target: aarch64
119
+ - runner: ubuntu-22.04
120
+ target: armv7
121
+ steps:
122
+ - uses: actions/checkout@v6
123
+ - uses: actions/setup-python@v6
124
+ with:
125
+ python-version: "3.8"
126
+ - name: Build wheels
127
+ uses: PyO3/maturin-action@v1
128
+ with:
129
+ target: ${{ matrix.platform.target }}
130
+ args: --release --out dist
131
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
132
+ manylinux: musllinux_1_2
133
+ - name: Build free-threaded wheels
134
+ uses: PyO3/maturin-action@v1
135
+ with:
136
+ target: ${{ matrix.platform.target }}
137
+ args: --release --out dist -i python3.14t
138
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
139
+ manylinux: musllinux_1_2
140
+ - name: Upload wheels
141
+ uses: actions/upload-artifact@v6
142
+ with:
143
+ name: wheels-musllinux-${{ matrix.platform.target }}
144
+ path: dist
145
+
146
+ windows:
147
+ needs: validate
148
+ runs-on: ${{ matrix.platform.runner }}
149
+ strategy:
150
+ matrix:
151
+ platform:
152
+ - runner: windows-latest
153
+ target: x64
154
+ python_arch: x64
155
+ - runner: windows-latest
156
+ target: x86
157
+ python_arch: x86
158
+ - runner: windows-11-arm
159
+ target: aarch64
160
+ python_arch: arm64
161
+ steps:
162
+ - uses: actions/checkout@v6
163
+ - uses: actions/setup-python@v6
164
+ with:
165
+ python-version: "3.13"
166
+ architecture: ${{ matrix.platform.python_arch }}
167
+ - name: Build wheels
168
+ uses: PyO3/maturin-action@v1
169
+ with:
170
+ target: ${{ matrix.platform.target }}
171
+ args: --release --out dist
172
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
173
+ - uses: actions/setup-python@v6
174
+ with:
175
+ python-version: "3.14t"
176
+ architecture: ${{ matrix.platform.python_arch }}
177
+ - name: Build free-threaded wheels
178
+ uses: PyO3/maturin-action@v1
179
+ with:
180
+ target: ${{ matrix.platform.target }}
181
+ args: --release --out dist -i python3.14t
182
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
183
+ - name: Upload wheels
184
+ uses: actions/upload-artifact@v6
185
+ with:
186
+ name: wheels-windows-${{ matrix.platform.target }}
187
+ path: dist
188
+
189
+ macos:
190
+ needs: validate
191
+ runs-on: ${{ matrix.platform.runner }}
192
+ strategy:
193
+ matrix:
194
+ platform:
195
+ - runner: macos-15-intel
196
+ target: x86_64
197
+ - runner: macos-latest
198
+ target: aarch64
199
+ steps:
200
+ - uses: actions/checkout@v6
201
+ - uses: actions/setup-python@v6
202
+ with:
203
+ python-version: "3.8"
204
+ - name: Build wheels
205
+ uses: PyO3/maturin-action@v1
206
+ with:
207
+ target: ${{ matrix.platform.target }}
208
+ args: --release --out dist
209
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
210
+ - uses: actions/setup-python@v6
211
+ with:
212
+ python-version: "3.14t"
213
+ - name: Build free-threaded wheels
214
+ uses: PyO3/maturin-action@v1
215
+ with:
216
+ target: ${{ matrix.platform.target }}
217
+ args: --release --out dist -i python3.14t
218
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
219
+ - name: Upload wheels
220
+ uses: actions/upload-artifact@v6
221
+ with:
222
+ name: wheels-macos-${{ matrix.platform.target }}
223
+ path: dist
224
+
225
+ sdist:
226
+ needs: validate
227
+ runs-on: ubuntu-latest
228
+ steps:
229
+ - uses: actions/checkout@v6
230
+ - name: Build sdist
231
+ uses: PyO3/maturin-action@v1
232
+ with:
233
+ command: sdist
234
+ args: --out dist
235
+ - name: Upload sdist
236
+ uses: actions/upload-artifact@v6
237
+ with:
238
+ name: wheels-sdist
239
+ path: dist
240
+
241
+ release:
242
+ name: Release
243
+ runs-on: ubuntu-latest
244
+ if: needs.validate.outputs.should_publish == 'true'
245
+ needs: [validate, linux, musllinux, windows, macos, sdist]
246
+ permissions:
247
+ # Use to sign the release artifacts
248
+ id-token: write
249
+ # Used to upload release artifacts
250
+ contents: write
251
+ # Used to generate artifact attestation
252
+ attestations: write
253
+ steps:
254
+ - uses: actions/checkout@v6
255
+
256
+ - uses: actions/download-artifact@v7
257
+ - name: Generate artifact attestation
258
+ uses: actions/attest@v4
259
+ with:
260
+ subject-path: 'wheels-*/*'
261
+ - name: Install uv
262
+ uses: astral-sh/setup-uv@v7
263
+ - name: Publish to PyPI
264
+ run: uv publish 'wheels-*/*'
@@ -0,0 +1,61 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+ types: [ opened, synchronize, reopened, ready_for_review ]
9
+
10
+ env:
11
+ CARGO_TERM_COLOR: always
12
+
13
+ jobs:
14
+ rust:
15
+ name: Rust tests
16
+ runs-on: ubuntu-latest
17
+ if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
18
+
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+
22
+ - name: Run cargo tests
23
+ run: cargo test --verbose
24
+
25
+ python:
26
+ name: Python tests
27
+ runs-on: ubuntu-latest
28
+ if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
29
+
30
+ steps:
31
+ - uses: actions/checkout@v6
32
+
33
+ - name: Set up Python
34
+ uses: actions/setup-python@v6
35
+ with:
36
+ python-version: "3.12"
37
+
38
+ - name: Install uv
39
+ uses: astral-sh/setup-uv@v7
40
+
41
+ - name: Create virtualenv
42
+ run: uv venv .venv --python 3.12
43
+
44
+ - name: Install test dependencies
45
+ run: uv pip install pytest
46
+
47
+ - name: Build extension
48
+ uses: PyO3/maturin-action@v1
49
+ with:
50
+ command: develop
51
+ args: --release
52
+
53
+ - name: Run pytest
54
+ run: uv run --no-sync pytest -v
55
+
56
+ - name: Run Python examples
57
+ run: |
58
+ for example in python/examples/*.py; do
59
+ echo "Running $example"
60
+ uv run --no-sync "$example"
61
+ done
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dependency_cache
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -11,7 +11,7 @@ classifiers = [
11
11
  "Programming Language :: Python :: Implementation :: PyPy",
12
12
  ]
13
13
  keywords = ["caching", "dependency-graph", "invalidation"]
14
- version = "0.2.2"
14
+ version = "0.2.4"
15
15
  description = "A caching library for Python object methods that utilises a dependency graph to track relationships and control invalidation, enabling efficient recomputation"
16
16
  readme = "README.md"
17
17
  license = { text = "MIT" }
@@ -329,7 +329,7 @@ wheels = [
329
329
 
330
330
  [[package]]
331
331
  name = "dependency-cache"
332
- version = "0.2.2"
332
+ version = "0.2.4"
333
333
  source = { editable = "." }
334
334
  dependencies = [
335
335
  { name = "matplotlib", version = "3.7.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" },
@@ -1,169 +0,0 @@
1
- # This file is autogenerated by maturin v1.9.6
2
- # To update, run
3
- #
4
- # maturin generate-ci github
5
- #
6
- name: CI
7
-
8
- on:
9
- workflow_dispatch:
10
-
11
- permissions:
12
- contents: read
13
-
14
- jobs:
15
- linux:
16
- runs-on: ${{ matrix.platform.runner }}
17
- strategy:
18
- matrix:
19
- platform:
20
- - runner: ubuntu-22.04
21
- target: x86_64
22
- - runner: ubuntu-22.04
23
- target: x86
24
- - runner: ubuntu-22.04
25
- target: aarch64
26
- - runner: ubuntu-22.04
27
- target: armv7
28
- - runner: ubuntu-22.04
29
- target: s390x
30
- - runner: ubuntu-22.04
31
- target: ppc64le
32
- steps:
33
- - uses: actions/checkout@v4
34
- - uses: actions/setup-python@v5
35
- with:
36
- python-version: 3.x
37
- - name: Build wheels
38
- uses: PyO3/maturin-action@v1
39
- with:
40
- target: ${{ matrix.platform.target }}
41
- args: --release --out dist --find-interpreter
42
- sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
43
- manylinux: auto
44
- - name: Upload wheels
45
- uses: actions/upload-artifact@v4
46
- with:
47
- name: wheels-linux-${{ matrix.platform.target }}
48
- path: dist
49
-
50
- musllinux:
51
- runs-on: ${{ matrix.platform.runner }}
52
- strategy:
53
- matrix:
54
- platform:
55
- - runner: ubuntu-22.04
56
- target: x86_64
57
- - runner: ubuntu-22.04
58
- target: x86
59
- - runner: ubuntu-22.04
60
- target: aarch64
61
- - runner: ubuntu-22.04
62
- target: armv7
63
- steps:
64
- - uses: actions/checkout@v4
65
- - uses: actions/setup-python@v5
66
- with:
67
- python-version: 3.x
68
- - name: Build wheels
69
- uses: PyO3/maturin-action@v1
70
- with:
71
- target: ${{ matrix.platform.target }}
72
- args: --release --out dist --find-interpreter
73
- sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
74
- manylinux: musllinux_1_2
75
- - name: Upload wheels
76
- uses: actions/upload-artifact@v4
77
- with:
78
- name: wheels-musllinux-${{ matrix.platform.target }}
79
- path: dist
80
-
81
- windows:
82
- runs-on: ${{ matrix.platform.runner }}
83
- strategy:
84
- matrix:
85
- platform:
86
- - runner: windows-latest
87
- target: x64
88
- - runner: windows-latest
89
- target: x86
90
- steps:
91
- - uses: actions/checkout@v4
92
- - uses: actions/setup-python@v5
93
- with:
94
- python-version: 3.x
95
- architecture: ${{ matrix.platform.target }}
96
- - name: Build wheels
97
- uses: PyO3/maturin-action@v1
98
- with:
99
- target: ${{ matrix.platform.target }}
100
- args: --release --out dist --find-interpreter
101
- sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
102
- - name: Upload wheels
103
- uses: actions/upload-artifact@v4
104
- with:
105
- name: wheels-windows-${{ matrix.platform.target }}
106
- path: dist
107
-
108
- macos:
109
- runs-on: ${{ matrix.platform.runner }}
110
- strategy:
111
- matrix:
112
- platform:
113
- - runner: macos-15-intel
114
- target: x86_64
115
- - runner: macos-14
116
- target: aarch64
117
- steps:
118
- - uses: actions/checkout@v4
119
- - uses: actions/setup-python@v5
120
- with:
121
- python-version: 3.x
122
- - name: Build wheels
123
- uses: PyO3/maturin-action@v1
124
- with:
125
- target: ${{ matrix.platform.target }}
126
- args: --release --out dist --find-interpreter
127
- sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
128
- - name: Upload wheels
129
- uses: actions/upload-artifact@v4
130
- with:
131
- name: wheels-macos-${{ matrix.platform.target }}
132
- path: dist
133
-
134
- sdist:
135
- runs-on: ubuntu-latest
136
- steps:
137
- - uses: actions/checkout@v4
138
- - name: Build sdist
139
- uses: PyO3/maturin-action@v1
140
- with:
141
- command: sdist
142
- args: --out dist
143
- - name: Upload sdist
144
- uses: actions/upload-artifact@v4
145
- with:
146
- name: wheels-sdist
147
- path: dist
148
-
149
- release:
150
- name: Release
151
- runs-on: ubuntu-latest
152
- if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
153
- needs: [linux, musllinux, windows, macos, sdist]
154
- permissions:
155
- id-token: write
156
- contents: write
157
- attestations: write
158
- steps:
159
- - uses: actions/download-artifact@v4
160
- - name: Generate artifact attestation
161
- uses: actions/attest-build-provenance@v2
162
- with:
163
- subject-path: 'wheels-*/*'
164
- - name: Publish to PyPI
165
- uses: PyO3/maturin-action@v1
166
- with:
167
- command: upload
168
- args: --non-interactive --skip-existing wheels-*/*
169
- trust-publishing: true
@@ -1,44 +0,0 @@
1
- name: Test
2
-
3
- on:
4
- push:
5
- branches: [ "master" ]
6
- pull_request:
7
- branches: [ "master" ]
8
- types: [ opened, synchronize, reopened, ready_for_review ]
9
-
10
- env:
11
- CARGO_TERM_COLOR: always
12
-
13
- jobs:
14
- build:
15
- runs-on: ubuntu-latest
16
- if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
17
-
18
- steps:
19
- - uses: actions/checkout@v4
20
-
21
- - name: Set up Python
22
- uses: actions/setup-python@v5
23
- with:
24
- python-version: "3.12"
25
-
26
- - name: Testing Rust
27
- run: cargo test --verbose
28
-
29
- - name: Build and Testing Python
30
- run: |
31
- python -m venv venv
32
- source venv/bin/activate
33
- pip install --upgrade pip maturin
34
- pip install --upgrade pip pytest
35
- maturin develop --release
36
- pytest -v
37
-
38
- - name: Ensure Python examples valid
39
- run: |
40
- source venv/bin/activate
41
- for example in python/examples/*.py; do
42
- echo "Running $example"
43
- python "$example"
44
- done