dependency-cache 0.2.3__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.
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/.github/workflows/CI.yml +58 -2
- dependency_cache-0.2.4/.github/workflows/Test.yml +61 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/PKG-INFO +1 -1
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/pyproject.toml +1 -1
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/uv.lock +1 -1
- dependency_cache-0.2.3/.github/workflows/Test.yml +0 -44
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/.gitignore +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/Cargo.lock +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/Cargo.toml +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/LICENSE +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/README.md +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/dependency_cache/__init__.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/dependency_cache/dependency_cache.pyi +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/dependency_cache/plot_dependency_graph.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/automagic_dependency_example.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/example.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/inheritance_example.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/manual_dependency_example.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/runtime_dependencies_example.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/runtime_function_calls_example.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/static_function_calls_example.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/use_cache_example.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/test_python.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/test_python_automagic.py +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/src/decorator.rs +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/src/decorator_factory.rs +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/src/dependency_cache_base.rs +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/src/dependency_graph.rs +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/src/lib.rs +0 -0
- {dependency_cache-0.2.3 → dependency_cache-0.2.4}/src/py_introspection_utils.rs +0 -0
|
@@ -7,12 +7,62 @@ name: CI
|
|
|
7
7
|
|
|
8
8
|
on:
|
|
9
9
|
workflow_dispatch:
|
|
10
|
+
inputs:
|
|
11
|
+
publish:
|
|
12
|
+
description: "Publish to PyPI"
|
|
13
|
+
required: true
|
|
14
|
+
default: false
|
|
15
|
+
type: boolean
|
|
10
16
|
|
|
11
17
|
permissions:
|
|
12
18
|
contents: read
|
|
13
19
|
|
|
20
|
+
concurrency:
|
|
21
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
22
|
+
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
23
|
+
|
|
14
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
|
+
|
|
15
64
|
linux:
|
|
65
|
+
needs: validate
|
|
16
66
|
runs-on: ${{ matrix.platform.runner }}
|
|
17
67
|
strategy:
|
|
18
68
|
matrix:
|
|
@@ -55,6 +105,7 @@ jobs:
|
|
|
55
105
|
path: dist
|
|
56
106
|
|
|
57
107
|
musllinux:
|
|
108
|
+
needs: validate
|
|
58
109
|
runs-on: ${{ matrix.platform.runner }}
|
|
59
110
|
strategy:
|
|
60
111
|
matrix:
|
|
@@ -93,6 +144,7 @@ jobs:
|
|
|
93
144
|
path: dist
|
|
94
145
|
|
|
95
146
|
windows:
|
|
147
|
+
needs: validate
|
|
96
148
|
runs-on: ${{ matrix.platform.runner }}
|
|
97
149
|
strategy:
|
|
98
150
|
matrix:
|
|
@@ -135,6 +187,7 @@ jobs:
|
|
|
135
187
|
path: dist
|
|
136
188
|
|
|
137
189
|
macos:
|
|
190
|
+
needs: validate
|
|
138
191
|
runs-on: ${{ matrix.platform.runner }}
|
|
139
192
|
strategy:
|
|
140
193
|
matrix:
|
|
@@ -170,6 +223,7 @@ jobs:
|
|
|
170
223
|
path: dist
|
|
171
224
|
|
|
172
225
|
sdist:
|
|
226
|
+
needs: validate
|
|
173
227
|
runs-on: ubuntu-latest
|
|
174
228
|
steps:
|
|
175
229
|
- uses: actions/checkout@v6
|
|
@@ -187,8 +241,8 @@ jobs:
|
|
|
187
241
|
release:
|
|
188
242
|
name: Release
|
|
189
243
|
runs-on: ubuntu-latest
|
|
190
|
-
if:
|
|
191
|
-
needs: [linux, musllinux, windows, macos, sdist]
|
|
244
|
+
if: needs.validate.outputs.should_publish == 'true'
|
|
245
|
+
needs: [validate, linux, musllinux, windows, macos, sdist]
|
|
192
246
|
permissions:
|
|
193
247
|
# Use to sign the release artifacts
|
|
194
248
|
id-token: write
|
|
@@ -197,6 +251,8 @@ jobs:
|
|
|
197
251
|
# Used to generate artifact attestation
|
|
198
252
|
attestations: write
|
|
199
253
|
steps:
|
|
254
|
+
- uses: actions/checkout@v6
|
|
255
|
+
|
|
200
256
|
- uses: actions/download-artifact@v7
|
|
201
257
|
- name: Generate artifact attestation
|
|
202
258
|
uses: actions/attest@v4
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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,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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/dependency_cache/dependency_cache.pyi
RENAMED
|
File without changes
|
{dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/dependency_cache/plot_dependency_graph.py
RENAMED
|
File without changes
|
{dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/automagic_dependency_example.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/manual_dependency_example.py
RENAMED
|
File without changes
|
{dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/runtime_dependencies_example.py
RENAMED
|
File without changes
|
{dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/runtime_function_calls_example.py
RENAMED
|
File without changes
|
{dependency_cache-0.2.3 → dependency_cache-0.2.4}/python/examples/static_function_calls_example.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|