dependency-cache 0.2.0__tar.gz → 0.2.1__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 (28) hide show
  1. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/PKG-INFO +8 -8
  2. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/README.md +7 -7
  3. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/pyproject.toml +1 -1
  4. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/uv.lock +1 -1
  5. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/.github/workflows/CI.yml +0 -0
  6. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/.github/workflows/Test.yml +0 -0
  7. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/.gitignore +0 -0
  8. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/Cargo.lock +0 -0
  9. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/Cargo.toml +0 -0
  10. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/LICENSE +0 -0
  11. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/dependency_cache/__init__.py +0 -0
  12. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/dependency_cache/dependency_cache.pyi +0 -0
  13. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/dependency_cache/plot_dependency_graph.py +0 -0
  14. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/examples/automagic_dependency_example.py +0 -0
  15. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/examples/example.py +0 -0
  16. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/examples/function_calls_example.py +0 -0
  17. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/examples/inheritance_example.py +0 -0
  18. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/examples/manual_dependency_example.py +0 -0
  19. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/examples/runtime_dependencies_example.py +0 -0
  20. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/examples/use_cache_example.py +0 -0
  21. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/test_python.py +0 -0
  22. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/python/test_python_automagic.py +0 -0
  23. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/src/decorator.rs +0 -0
  24. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/src/decorator_factory.rs +0 -0
  25. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/src/dependency_cache_base.rs +0 -0
  26. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/src/dependency_graph.rs +0 -0
  27. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/src/lib.rs +0 -0
  28. {dependency_cache-0.2.0 → dependency_cache-0.2.1}/src/py_introspection_utils.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dependency_cache
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -20,10 +20,9 @@ Project-URL: Repository, https://github.com/XtdWt/dependency_cache
20
20
  ## 🚧 Work In Progress 🚧
21
21
 
22
22
  ### Description
23
- A library for managing the caching of an object's methods with cache invalidation handled by a dependency graph.
24
- Instead of recomputing expensive, deeply nested calculations on every call, Dependency Cache stores the result and only invalidates (and recalculates) it when one of its dependencies actually changes.
25
- This project is written in rust, with [pyo3](https://github.com/PyO3/pyo3), and compiled using [maturin](https://github.com/PyO3/maturin).
26
-
23
+ Dependency Cache is a caching layer for object methods, with invalidation driven by a dependency graph.
24
+ Rather than re-running expensive, deeply nested calculations on every call, it stores each method's result and only recomputes (and marks downstream methods for recalculation) when one of its declared dependencies actually changes.
25
+ Under the hood, this project is written in Rust using [pyo3](https://github.com/PyO3/pyo3) and built with [maturin](https://github.com/PyO3/maturin).
27
26
  ### Installation
28
27
 
29
28
  Install the latest stable version from [PyPI](https://pypi.org/project/dependency-cache/):
@@ -37,14 +36,15 @@ pip install dependency-cache
37
36
  | Export | What it's for |
38
37
  |---|---|
39
38
  | `DependencyCacheBase` | Base class to inherit from. Gives your instance a cache and a dependency graph. |
40
- | `dependency_cached(use_cache=True, dependencies=[...], track_runtime_dependencies=False)` | A footgun-enabled decorator for a method where you **explicitly declare** all direct dependencies. |
41
- | `automagically_dependency_cached(use_cache=True, dependencies=[...], track_runtime_dependencies=True)` | A decorator which **automagically infers** the direct dependencies. Optionally override the defaults and inference using the `dependencies` parameter. |
39
+ | `dependency_cached(use_cache=True, dependencies=[...], track_runtime_dependencies=False, serialisable=False)` | A footgun-enabled decorator for a method where you **explicitly declare** all direct dependencies. |
40
+ | `automagically_dependency_cached(use_cache=True, dependencies=[...], track_runtime_dependencies=True, serialisable=False)` | A decorator which **automagically infers** the direct dependencies. Optionally override the defaults and inference using the `dependencies` parameter. |
42
41
  | `plot_dependency_graph(obj, **kwargs)` | Visualizes an instance's dependency graph, for inspection/debugging. |
43
42
 
44
43
  ### Setup
45
44
  This project uses (and requires) [uv](https://github.com/astral-sh/uv) as a package manager and maturin to compile.
46
45
 
47
- Steps:
46
+ To set up a local dev environment:
47
+
48
48
  - install python dependencies
49
49
  ```bash
50
50
  uv sync
@@ -2,10 +2,9 @@
2
2
  ## 🚧 Work In Progress 🚧
3
3
 
4
4
  ### Description
5
- A library for managing the caching of an object's methods with cache invalidation handled by a dependency graph.
6
- Instead of recomputing expensive, deeply nested calculations on every call, Dependency Cache stores the result and only invalidates (and recalculates) it when one of its dependencies actually changes.
7
- This project is written in rust, with [pyo3](https://github.com/PyO3/pyo3), and compiled using [maturin](https://github.com/PyO3/maturin).
8
-
5
+ Dependency Cache is a caching layer for object methods, with invalidation driven by a dependency graph.
6
+ Rather than re-running expensive, deeply nested calculations on every call, it stores each method's result and only recomputes (and marks downstream methods for recalculation) when one of its declared dependencies actually changes.
7
+ Under the hood, this project is written in Rust using [pyo3](https://github.com/PyO3/pyo3) and built with [maturin](https://github.com/PyO3/maturin).
9
8
  ### Installation
10
9
 
11
10
  Install the latest stable version from [PyPI](https://pypi.org/project/dependency-cache/):
@@ -19,14 +18,15 @@ pip install dependency-cache
19
18
  | Export | What it's for |
20
19
  |---|---|
21
20
  | `DependencyCacheBase` | Base class to inherit from. Gives your instance a cache and a dependency graph. |
22
- | `dependency_cached(use_cache=True, dependencies=[...], track_runtime_dependencies=False)` | A footgun-enabled decorator for a method where you **explicitly declare** all direct dependencies. |
23
- | `automagically_dependency_cached(use_cache=True, dependencies=[...], track_runtime_dependencies=True)` | A decorator which **automagically infers** the direct dependencies. Optionally override the defaults and inference using the `dependencies` parameter. |
21
+ | `dependency_cached(use_cache=True, dependencies=[...], track_runtime_dependencies=False, serialisable=False)` | A footgun-enabled decorator for a method where you **explicitly declare** all direct dependencies. |
22
+ | `automagically_dependency_cached(use_cache=True, dependencies=[...], track_runtime_dependencies=True, serialisable=False)` | A decorator which **automagically infers** the direct dependencies. Optionally override the defaults and inference using the `dependencies` parameter. |
24
23
  | `plot_dependency_graph(obj, **kwargs)` | Visualizes an instance's dependency graph, for inspection/debugging. |
25
24
 
26
25
  ### Setup
27
26
  This project uses (and requires) [uv](https://github.com/astral-sh/uv) as a package manager and maturin to compile.
28
27
 
29
- Steps:
28
+ To set up a local dev environment:
29
+
30
30
  - install python dependencies
31
31
  ```bash
32
32
  uv sync
@@ -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.0"
14
+ version = "0.2.1"
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.0"
332
+ version = "0.2.1"
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'" },