TypedUnit 0.2.10__tar.gz → 0.2.13__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 (60) hide show
  1. typedunit-0.2.10/.github/workflows/deploy_anaconda.yml → typedunit-0.2.13/.github/workflows/deploy_release.yml +12 -3
  2. {typedunit-0.2.10 → typedunit-0.2.13}/PKG-INFO +1 -1
  3. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit/_version.py +3 -3
  4. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit.egg-info/PKG-INFO +1 -1
  5. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit.egg-info/SOURCES.txt +1 -2
  6. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit.egg-info/scm_file_list.json +1 -2
  7. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit.egg-info/scm_version.json +2 -2
  8. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/conf.py +1 -0
  9. typedunit-0.2.13/docs/source/index.rst +93 -0
  10. typedunit-0.2.10/.github/workflows/deploy_PyPi.yml +0 -18
  11. typedunit-0.2.10/docs/source/index.rst +0 -39
  12. {typedunit-0.2.10 → typedunit-0.2.13}/.coveragerc +0 -0
  13. {typedunit-0.2.10 → typedunit-0.2.13}/.flake8 +0 -0
  14. {typedunit-0.2.10 → typedunit-0.2.13}/.github/dependabot.yml +0 -0
  15. {typedunit-0.2.10 → typedunit-0.2.13}/.github/workflows/deploy_coverage.yml +0 -0
  16. {typedunit-0.2.10 → typedunit-0.2.13}/.github/workflows/deploy_documentation.yml +0 -0
  17. {typedunit-0.2.10 → typedunit-0.2.13}/.github/workflows/quality.yml +0 -0
  18. {typedunit-0.2.10 → typedunit-0.2.13}/.github/workflows/tests.yml +0 -0
  19. {typedunit-0.2.10 → typedunit-0.2.13}/.gitignore +0 -0
  20. {typedunit-0.2.10 → typedunit-0.2.13}/.pre-commit-config.yaml +0 -0
  21. {typedunit-0.2.10 → typedunit-0.2.13}/CONTRIBUTING.md +0 -0
  22. {typedunit-0.2.10 → typedunit-0.2.13}/LICENSE +0 -0
  23. {typedunit-0.2.10 → typedunit-0.2.13}/Makefile +0 -0
  24. {typedunit-0.2.10 → typedunit-0.2.13}/README.rst +0 -0
  25. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit/__init__.py +0 -0
  26. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit/directories.py +0 -0
  27. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit/helper.py +0 -0
  28. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit/units.py +0 -0
  29. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit/utils.py +0 -0
  30. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit.egg-info/dependency_links.txt +0 -0
  31. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit.egg-info/requires.txt +0 -0
  32. {typedunit-0.2.10 → typedunit-0.2.13}/TypedUnit.egg-info/top_level.txt +0 -0
  33. {typedunit-0.2.10 → typedunit-0.2.13}/conda.recipe/meta.yaml +0 -0
  34. {typedunit-0.2.10 → typedunit-0.2.13}/docs/Makefile +0 -0
  35. {typedunit-0.2.10 → typedunit-0.2.13}/docs/examples/README.rst +0 -0
  36. {typedunit-0.2.10 → typedunit-0.2.13}/docs/examples/example_0.py +0 -0
  37. {typedunit-0.2.10 → typedunit-0.2.13}/docs/examples/example_1.py +0 -0
  38. {typedunit-0.2.10 → typedunit-0.2.13}/docs/images/logo.png +0 -0
  39. {typedunit-0.2.10 → typedunit-0.2.13}/docs/make.bat +0 -0
  40. {typedunit-0.2.10 → typedunit-0.2.13}/docs/redirect.html +0 -0
  41. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/_static/default.css +0 -0
  42. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/_static/layout.css +0 -0
  43. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/_static/thumbnail.png +0 -0
  44. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/code.rst +0 -0
  45. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/guide/concepts.rst +0 -0
  46. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/guide/installation.rst +0 -0
  47. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/guide/pint.rst +0 -0
  48. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/guide/quickstart.rst +0 -0
  49. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/guide/validation.rst +0 -0
  50. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/references.rst +0 -0
  51. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/sg_execution_times.rst +0 -0
  52. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/theory.rst +0 -0
  53. {typedunit-0.2.10 → typedunit-0.2.13}/docs/source/units.rst +0 -0
  54. {typedunit-0.2.10 → typedunit-0.2.13}/pyproject.toml +0 -0
  55. {typedunit-0.2.10 → typedunit-0.2.13}/pytest.ini +0 -0
  56. {typedunit-0.2.10 → typedunit-0.2.13}/setup.cfg +0 -0
  57. {typedunit-0.2.10 → typedunit-0.2.13}/tests/__init__.py +0 -0
  58. {typedunit-0.2.10 → typedunit-0.2.13}/tests/test_0.py +0 -0
  59. {typedunit-0.2.10 → typedunit-0.2.13}/tools/next_release_version.py +0 -0
  60. {typedunit-0.2.10 → typedunit-0.2.13}/tools/release_tag.py +0 -0
@@ -1,4 +1,4 @@
1
- name: Publish Conda package
1
+ name: Publish release
2
2
 
3
3
  on:
4
4
  push:
@@ -8,10 +8,19 @@ permissions:
8
8
  contents: read
9
9
 
10
10
  jobs:
11
- publish:
11
+ pypi:
12
+ name: Publish to PyPI
13
+ uses: MartinPdeS/MPSActions/.github/workflows/publish_pure_package_to_PyPi.yml@a01969bc5af90666281f9d37acffdf6a4629763a
14
+ with:
15
+ python-version: "3.11"
16
+ test-command: python -c 'import TypedUnit; print(TypedUnit.__version__)'
17
+ secrets:
18
+ PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
19
+
20
+ conda:
21
+ name: Publish Conda package
12
22
  uses: MartinPdeS/MPSActions/.github/workflows/publish_compiled_package_to_anaconda.yml@a01969bc5af90666281f9d37acffdf6a4629763a
13
23
  with:
14
- # One noarch archive supports all declared Python versions; test it on 3.14.
15
24
  python_versions: '["3.14"]'
16
25
  os_list: '["ubuntu-latest"]'
17
26
  package_name: typedunit
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TypedUnit
3
- Version: 0.2.10
3
+ Version: 0.2.13
4
4
  Summary: A package wrapping pint for handling typed units in Python.
5
5
  Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
6
  License: MIT License
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.2.10'
22
- __version_tuple__ = version_tuple = (0, 2, 10)
21
+ __version__ = version = '0.2.13'
22
+ __version_tuple__ = version_tuple = (0, 2, 13)
23
23
 
24
- __commit_id__ = commit_id = 'g156c1ff07'
24
+ __commit_id__ = commit_id = 'g62984b710'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TypedUnit
3
- Version: 0.2.10
3
+ Version: 0.2.13
4
4
  Summary: A package wrapping pint for handling typed units in Python.
5
5
  Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
6
  License: MIT License
@@ -9,10 +9,9 @@ README.rst
9
9
  pyproject.toml
10
10
  pytest.ini
11
11
  .github/dependabot.yml
12
- .github/workflows/deploy_PyPi.yml
13
- .github/workflows/deploy_anaconda.yml
14
12
  .github/workflows/deploy_coverage.yml
15
13
  .github/workflows/deploy_documentation.yml
14
+ .github/workflows/deploy_release.yml
16
15
  .github/workflows/quality.yml
17
16
  .github/workflows/tests.yml
18
17
  TypedUnit/__init__.py
@@ -3,10 +3,9 @@
3
3
  ".coveragerc",
4
4
  ".flake8",
5
5
  ".github/dependabot.yml",
6
- ".github/workflows/deploy_PyPi.yml",
7
- ".github/workflows/deploy_anaconda.yml",
8
6
  ".github/workflows/deploy_coverage.yml",
9
7
  ".github/workflows/deploy_documentation.yml",
8
+ ".github/workflows/deploy_release.yml",
10
9
  ".github/workflows/quality.yml",
11
10
  ".github/workflows/tests.yml",
12
11
  ".gitignore",
@@ -1,7 +1,7 @@
1
1
  {
2
- "tag": "0.2.10",
2
+ "tag": "0.2.13",
3
3
  "distance": 0,
4
- "node": "g156c1ff077ca68e8002b447cedd677d7dfa3c429",
4
+ "node": "g62984b7107a5152593ca6d295cea17ff1a3a6ecc",
5
5
  "dirty": true,
6
6
  "branch": "HEAD",
7
7
  "node_date": "2026-10-20"
@@ -22,6 +22,7 @@ globals().update(
22
22
  version=version,
23
23
  logo=logo,
24
24
  favicon=logo,
25
+ html_theme_options={"show_nav_level": 1},
25
26
  sphinx_gallery_conf={
26
27
  "default_thumb_file": thumbnail,
27
28
  "within_subsection_order": FileNameSortKey,
@@ -0,0 +1,93 @@
1
+ **Date**: |today|, **Version**: |version|
2
+
3
+ TypedUnit documentation
4
+ =======================
5
+
6
+ TypedUnit adds readable, runtime-checkable physical quantity types to Pint.
7
+ It keeps Pint's quantity objects and operations while giving APIs a vocabulary
8
+ for physical meaning such as ``Length``, ``Energy``, and ``Frequency``.
9
+
10
+ Start here
11
+ ----------
12
+
13
+ A typical TypedUnit workflow has three small steps:
14
+
15
+ #. Create values with the shared :data:`TypedUnit.ureg` registry.
16
+ #. Annotate boundaries with the dimensional type that the value represents.
17
+ #. Add :func:`TypedUnit.validate_units` where runtime validation is useful.
18
+
19
+ This keeps unit conversion and arithmetic in Pint while making interfaces
20
+ self-documenting and checking dimensional mistakes close to their source.
21
+
22
+ .. code-block:: python
23
+
24
+ from TypedUnit import Energy, ureg, validate_units
25
+
26
+ @validate_units
27
+ def efficiency(input_energy: Energy, output_energy: Energy) -> float:
28
+ return (output_energy / input_energy).to_base_units().magnitude
29
+
30
+ input_energy = 2 * ureg.kilojoule
31
+ output_energy = 500 * ureg.joule
32
+ print(efficiency(input_energy, output_energy))
33
+
34
+ Choose a path
35
+ -------------
36
+
37
+ * New to TypedUnit? Read :doc:`guide/installation` and :doc:`guide/quickstart`.
38
+ * Designing an API? See :doc:`guide/concepts` and :doc:`guide/validation`.
39
+ * Integrating with Pint or NumPy? Read :doc:`guide/pint`.
40
+ * Looking for a type or helper? Open :doc:`units` and :doc:`code`.
41
+ * Want runnable examples? Browse :doc:`gallery/index`.
42
+
43
+ What TypedUnit provides
44
+ -----------------------
45
+
46
+ TypedUnit supplies a shared registry, dimensional marker classes, and an
47
+ optional validation decorator. Marker classes describe what a value means;
48
+ they do not replace Pint quantities or introduce a second unit system.
49
+
50
+ The package is intentionally small at integration boundaries. Existing Pint
51
+ quantities can be passed through TypedUnit annotations, converted normally,
52
+ and used with NumPy. Applications can adopt the annotations incrementally,
53
+ starting with public functions and configuration models.
54
+
55
+ Compatibility notes
56
+ -------------------
57
+
58
+ Use :data:`TypedUnit.ureg` throughout an application. Quantities created by a
59
+ second Pint registry may have compatible dimensions but are different runtime
60
+ objects, which can make validation and comparisons surprising. Convert values
61
+ at library boundaries and keep registry ownership explicit.
62
+
63
+ .. toctree::
64
+ :maxdepth: 2
65
+ :caption: Learn
66
+
67
+ guide/installation
68
+ guide/quickstart
69
+ guide/concepts
70
+ guide/validation
71
+ guide/pint
72
+ theory
73
+
74
+ .. toctree::
75
+ :maxdepth: 2
76
+ :caption: API reference
77
+
78
+ units
79
+ code
80
+ references
81
+
82
+ .. toctree::
83
+ :maxdepth: 2
84
+ :caption: Examples
85
+
86
+ gallery/index
87
+
88
+ Indices and tables
89
+ ==================
90
+
91
+ * :ref:`genindex`
92
+ * :ref:`modindex`
93
+ * :ref:`search`
@@ -1,18 +0,0 @@
1
- name: Publish to PyPI
2
-
3
- on:
4
- push:
5
- tags: ["v*"]
6
-
7
- permissions:
8
- contents: read
9
-
10
- jobs:
11
- publish:
12
- uses: MartinPdeS/MPSActions/.github/workflows/publish_pure_package_to_PyPi.yml@a01969bc5af90666281f9d37acffdf6a4629763a
13
- with:
14
- python-version: "3.11"
15
- # The reusable workflow wraps this command in double quotes.
16
- test-command: python -c 'import TypedUnit; print(TypedUnit.__version__)'
17
- secrets:
18
- PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
@@ -1,39 +0,0 @@
1
- **Date**: |today|, **Version**: |version|
2
-
3
-
4
- .. include:: ../../README.rst
5
- :start-line: 0
6
-
7
- TypedUnit documentation
8
- =======================
9
-
10
- TypedUnit adds readable, runtime-checkable physical quantity types to Pint.
11
- Keep constructing and converting quantities with Pint, then use types such as
12
- ``Energy`` in annotations, ``isinstance`` checks, and validated boundaries.
13
-
14
- .. toctree::
15
- :maxdepth: 2
16
- :caption: User guide
17
-
18
- guide/installation
19
- guide/quickstart
20
- guide/concepts
21
- guide/validation
22
- guide/pint
23
- theory
24
-
25
- .. toctree::
26
- :maxdepth: 2
27
- :caption: Reference
28
-
29
- units
30
- code
31
- references
32
- gallery/index
33
-
34
- Indices and tables
35
- ==================
36
-
37
- * :ref:`genindex`
38
- * :ref:`modindex`
39
- * :ref:`search`
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
File without changes
File without changes
File without changes
File without changes