TypedUnit 0.2.10__tar.gz → 0.2.14__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 (63) hide show
  1. typedunit-0.2.10/.github/workflows/deploy_anaconda.yml → typedunit-0.2.14/.github/workflows/deploy_release.yml +12 -3
  2. {typedunit-0.2.10 → typedunit-0.2.14}/PKG-INFO +2 -2
  3. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit/_version.py +3 -3
  4. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit.egg-info/PKG-INFO +2 -2
  5. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit.egg-info/SOURCES.txt +3 -2
  6. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit.egg-info/requires.txt +1 -1
  7. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit.egg-info/scm_file_list.json +3 -2
  8. typedunit-0.2.14/TypedUnit.egg-info/scm_version.json +8 -0
  9. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/conf.py +2 -9
  10. typedunit-0.2.14/docs/source/guide.rst +14 -0
  11. typedunit-0.2.14/docs/source/index.rst +76 -0
  12. typedunit-0.2.14/docs/source/reference.rst +11 -0
  13. {typedunit-0.2.10 → typedunit-0.2.14}/pyproject.toml +1 -1
  14. typedunit-0.2.10/.github/workflows/deploy_PyPi.yml +0 -18
  15. typedunit-0.2.10/TypedUnit.egg-info/scm_version.json +0 -8
  16. typedunit-0.2.10/docs/source/index.rst +0 -39
  17. {typedunit-0.2.10 → typedunit-0.2.14}/.coveragerc +0 -0
  18. {typedunit-0.2.10 → typedunit-0.2.14}/.flake8 +0 -0
  19. {typedunit-0.2.10 → typedunit-0.2.14}/.github/dependabot.yml +0 -0
  20. {typedunit-0.2.10 → typedunit-0.2.14}/.github/workflows/deploy_coverage.yml +0 -0
  21. {typedunit-0.2.10 → typedunit-0.2.14}/.github/workflows/deploy_documentation.yml +0 -0
  22. {typedunit-0.2.10 → typedunit-0.2.14}/.github/workflows/quality.yml +0 -0
  23. {typedunit-0.2.10 → typedunit-0.2.14}/.github/workflows/tests.yml +0 -0
  24. {typedunit-0.2.10 → typedunit-0.2.14}/.gitignore +0 -0
  25. {typedunit-0.2.10 → typedunit-0.2.14}/.pre-commit-config.yaml +0 -0
  26. {typedunit-0.2.10 → typedunit-0.2.14}/CONTRIBUTING.md +0 -0
  27. {typedunit-0.2.10 → typedunit-0.2.14}/LICENSE +0 -0
  28. {typedunit-0.2.10 → typedunit-0.2.14}/Makefile +0 -0
  29. {typedunit-0.2.10 → typedunit-0.2.14}/README.rst +0 -0
  30. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit/__init__.py +0 -0
  31. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit/directories.py +0 -0
  32. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit/helper.py +0 -0
  33. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit/units.py +0 -0
  34. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit/utils.py +0 -0
  35. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit.egg-info/dependency_links.txt +0 -0
  36. {typedunit-0.2.10 → typedunit-0.2.14}/TypedUnit.egg-info/top_level.txt +0 -0
  37. {typedunit-0.2.10 → typedunit-0.2.14}/conda.recipe/meta.yaml +0 -0
  38. {typedunit-0.2.10 → typedunit-0.2.14}/docs/Makefile +0 -0
  39. {typedunit-0.2.10 → typedunit-0.2.14}/docs/examples/README.rst +0 -0
  40. {typedunit-0.2.10 → typedunit-0.2.14}/docs/examples/example_0.py +0 -0
  41. {typedunit-0.2.10 → typedunit-0.2.14}/docs/examples/example_1.py +0 -0
  42. {typedunit-0.2.10 → typedunit-0.2.14}/docs/images/logo.png +0 -0
  43. {typedunit-0.2.10 → typedunit-0.2.14}/docs/make.bat +0 -0
  44. {typedunit-0.2.10 → typedunit-0.2.14}/docs/redirect.html +0 -0
  45. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/_static/default.css +0 -0
  46. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/_static/layout.css +0 -0
  47. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/_static/thumbnail.png +0 -0
  48. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/code.rst +0 -0
  49. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/guide/concepts.rst +0 -0
  50. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/guide/installation.rst +0 -0
  51. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/guide/pint.rst +0 -0
  52. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/guide/quickstart.rst +0 -0
  53. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/guide/validation.rst +0 -0
  54. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/references.rst +0 -0
  55. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/sg_execution_times.rst +0 -0
  56. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/theory.rst +0 -0
  57. {typedunit-0.2.10 → typedunit-0.2.14}/docs/source/units.rst +0 -0
  58. {typedunit-0.2.10 → typedunit-0.2.14}/pytest.ini +0 -0
  59. {typedunit-0.2.10 → typedunit-0.2.14}/setup.cfg +0 -0
  60. {typedunit-0.2.10 → typedunit-0.2.14}/tests/__init__.py +0 -0
  61. {typedunit-0.2.10 → typedunit-0.2.14}/tests/test_0.py +0 -0
  62. {typedunit-0.2.10 → typedunit-0.2.14}/tools/next_release_version.py +0 -0
  63. {typedunit-0.2.10 → typedunit-0.2.14}/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.14
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
@@ -53,7 +53,7 @@ Requires-Dist: pytest-json-report~=1.5; extra == "testing"
53
53
  Requires-Dist: flake8==7.3.0; extra == "testing"
54
54
  Requires-Dist: coverage~=7.6; extra == "testing"
55
55
  Provides-Extra: documentation
56
- Requires-Dist: MartinPdeS-docs<0.2,>=0.1.4; extra == "documentation"
56
+ Requires-Dist: MartinPdeS-docs<0.3,>=0.2.1; extra == "documentation"
57
57
  Requires-Dist: numpydoc~=1.8; extra == "documentation"
58
58
  Requires-Dist: sphinx>=6; extra == "documentation"
59
59
  Requires-Dist: sphinx-gallery~=0.17; extra == "documentation"
@@ -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.14'
22
+ __version_tuple__ = version_tuple = (0, 2, 14)
23
23
 
24
- __commit_id__ = commit_id = 'g156c1ff07'
24
+ __commit_id__ = commit_id = 'g71aab5d79'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TypedUnit
3
- Version: 0.2.10
3
+ Version: 0.2.14
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
@@ -53,7 +53,7 @@ Requires-Dist: pytest-json-report~=1.5; extra == "testing"
53
53
  Requires-Dist: flake8==7.3.0; extra == "testing"
54
54
  Requires-Dist: coverage~=7.6; extra == "testing"
55
55
  Provides-Extra: documentation
56
- Requires-Dist: MartinPdeS-docs<0.2,>=0.1.4; extra == "documentation"
56
+ Requires-Dist: MartinPdeS-docs<0.3,>=0.2.1; extra == "documentation"
57
57
  Requires-Dist: numpydoc~=1.8; extra == "documentation"
58
58
  Requires-Dist: sphinx>=6; extra == "documentation"
59
59
  Requires-Dist: sphinx-gallery~=0.17; extra == "documentation"
@@ -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
@@ -38,7 +37,9 @@ docs/examples/example_1.py
38
37
  docs/images/logo.png
39
38
  docs/source/code.rst
40
39
  docs/source/conf.py
40
+ docs/source/guide.rst
41
41
  docs/source/index.rst
42
+ docs/source/reference.rst
42
43
  docs/source/references.rst
43
44
  docs/source/sg_execution_times.rst
44
45
  docs/source/theory.rst
@@ -4,7 +4,7 @@ matplotlib
4
4
  pint_pandas
5
5
 
6
6
  [documentation]
7
- MartinPdeS-docs<0.2,>=0.1.4
7
+ MartinPdeS-docs<0.3,>=0.2.1
8
8
  numpydoc~=1.8
9
9
  sphinx>=6
10
10
  sphinx-gallery~=0.17
@@ -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",
@@ -34,12 +33,14 @@
34
33
  "docs/source/_static/thumbnail.png",
35
34
  "docs/source/code.rst",
36
35
  "docs/source/conf.py",
36
+ "docs/source/guide.rst",
37
37
  "docs/source/guide/concepts.rst",
38
38
  "docs/source/guide/installation.rst",
39
39
  "docs/source/guide/pint.rst",
40
40
  "docs/source/guide/quickstart.rst",
41
41
  "docs/source/guide/validation.rst",
42
42
  "docs/source/index.rst",
43
+ "docs/source/reference.rst",
43
44
  "docs/source/references.rst",
44
45
  "docs/source/sg_execution_times.rst",
45
46
  "docs/source/theory.rst",
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.2.14",
3
+ "distance": 0,
4
+ "node": "g71aab5d7965e52e0ef97535d7f3a969c3cc79d38",
5
+ "dirty": true,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-10-21"
8
+ }
@@ -1,16 +1,12 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
- import os
5
4
  from pathlib import Path
6
5
 
7
- from sphinx_gallery.sorting import FileNameSortKey
8
-
9
6
  from martinpdes_docs import configure
10
7
 
11
8
 
12
9
  package_name = "TypedUnit"
13
- version = os.getenv("tag", "latest")
14
10
  logo = "../images/logo.png"
15
11
  thumbnail = str(Path(__file__).parent.parent / "images" / "logo.png")
16
12
 
@@ -19,12 +15,9 @@ globals().update(
19
15
  project="TypedUnits",
20
16
  package=package_name,
21
17
  repository="MartinPdeS/TypedUnit",
22
- version=version,
23
18
  logo=logo,
24
19
  favicon=logo,
25
- sphinx_gallery_conf={
26
- "default_thumb_file": thumbnail,
27
- "within_subsection_order": FileNameSortKey,
28
- },
20
+ gallery_default_thumb=thumbnail,
21
+ html_theme_options={"show_nav_level": 1},
29
22
  )
30
23
  )
@@ -0,0 +1,14 @@
1
+ Guide
2
+ =====
3
+
4
+ Learn the TypedUnit vocabulary, validation model, and Pint integration.
5
+
6
+ .. toctree::
7
+ :maxdepth: 2
8
+
9
+ guide/installation
10
+ guide/quickstart
11
+ guide/concepts
12
+ guide/validation
13
+ guide/pint
14
+ theory
@@ -0,0 +1,76 @@
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
+ :hidden:
66
+
67
+ Guide <guide>
68
+ Reference <reference>
69
+ Examples <gallery/index>
70
+
71
+ Indices and tables
72
+ ==================
73
+
74
+ * :ref:`genindex`
75
+ * :ref:`modindex`
76
+ * :ref:`search`
@@ -0,0 +1,11 @@
1
+ Reference
2
+ =========
3
+
4
+ Browse the public unit types, helpers, and generated API documentation.
5
+
6
+ .. toctree::
7
+ :maxdepth: 2
8
+
9
+ units
10
+ code
11
+ references
@@ -56,7 +56,7 @@ testing = [
56
56
  ]
57
57
 
58
58
  documentation = [
59
- "MartinPdeS-docs>=0.1.4,<0.2",
59
+ "MartinPdeS-docs>=0.2.1,<0.3",
60
60
  "numpydoc ~=1.8",
61
61
  "sphinx >=6",
62
62
  "sphinx-gallery ~=0.17",
@@ -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,8 +0,0 @@
1
- {
2
- "tag": "0.2.10",
3
- "distance": 0,
4
- "node": "g156c1ff077ca68e8002b447cedd677d7dfa3c429",
5
- "dirty": true,
6
- "branch": "HEAD",
7
- "node_date": "2026-10-20"
8
- }
@@ -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