TypedUnit 0.2.13__tar.gz → 0.2.16__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 (68) hide show
  1. {typedunit-0.2.13 → typedunit-0.2.16}/.github/workflows/deploy_coverage.yml +1 -1
  2. typedunit-0.2.16/.github/workflows/deploy_documentation.yml +20 -0
  3. typedunit-0.2.16/.github/workflows/deploy_release.yml +33 -0
  4. typedunit-0.2.16/.github/workflows/quality.yml +18 -0
  5. typedunit-0.2.16/.github/workflows/tests.yml +19 -0
  6. {typedunit-0.2.13 → typedunit-0.2.16}/PKG-INFO +2 -7
  7. typedunit-0.2.16/TypedUnit/_version.py +17 -0
  8. {typedunit-0.2.13 → typedunit-0.2.16}/TypedUnit.egg-info/PKG-INFO +2 -7
  9. {typedunit-0.2.13 → typedunit-0.2.16}/TypedUnit.egg-info/SOURCES.txt +3 -0
  10. {typedunit-0.2.13 → typedunit-0.2.16}/TypedUnit.egg-info/requires.txt +1 -6
  11. {typedunit-0.2.13 → typedunit-0.2.16}/TypedUnit.egg-info/scm_file_list.json +3 -0
  12. typedunit-0.2.16/TypedUnit.egg-info/scm_version.json +8 -0
  13. typedunit-0.2.16/docs/source/_static/favicon.svg +13 -0
  14. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/conf.py +3 -10
  15. typedunit-0.2.16/docs/source/guide.rst +14 -0
  16. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/index.rst +4 -21
  17. typedunit-0.2.16/docs/source/reference.rst +11 -0
  18. {typedunit-0.2.13 → typedunit-0.2.16}/pyproject.toml +1 -7
  19. typedunit-0.2.16/tools/release_tag.py +78 -0
  20. typedunit-0.2.13/.github/workflows/deploy_documentation.yml +0 -58
  21. typedunit-0.2.13/.github/workflows/deploy_release.yml +0 -30
  22. typedunit-0.2.13/.github/workflows/quality.yml +0 -22
  23. typedunit-0.2.13/.github/workflows/tests.yml +0 -26
  24. typedunit-0.2.13/TypedUnit/_version.py +0 -24
  25. typedunit-0.2.13/TypedUnit.egg-info/scm_version.json +0 -8
  26. typedunit-0.2.13/tools/release_tag.py +0 -46
  27. {typedunit-0.2.13 → typedunit-0.2.16}/.coveragerc +0 -0
  28. {typedunit-0.2.13 → typedunit-0.2.16}/.flake8 +0 -0
  29. {typedunit-0.2.13 → typedunit-0.2.16}/.github/dependabot.yml +0 -0
  30. {typedunit-0.2.13 → typedunit-0.2.16}/.gitignore +0 -0
  31. {typedunit-0.2.13 → typedunit-0.2.16}/.pre-commit-config.yaml +0 -0
  32. {typedunit-0.2.13 → typedunit-0.2.16}/CONTRIBUTING.md +0 -0
  33. {typedunit-0.2.13 → typedunit-0.2.16}/LICENSE +0 -0
  34. {typedunit-0.2.13 → typedunit-0.2.16}/Makefile +0 -0
  35. {typedunit-0.2.13 → typedunit-0.2.16}/README.rst +0 -0
  36. {typedunit-0.2.13 → typedunit-0.2.16}/TypedUnit/__init__.py +0 -0
  37. {typedunit-0.2.13 → typedunit-0.2.16}/TypedUnit/directories.py +0 -0
  38. {typedunit-0.2.13 → typedunit-0.2.16}/TypedUnit/helper.py +0 -0
  39. {typedunit-0.2.13 → typedunit-0.2.16}/TypedUnit/units.py +0 -0
  40. {typedunit-0.2.13 → typedunit-0.2.16}/TypedUnit/utils.py +0 -0
  41. {typedunit-0.2.13 → typedunit-0.2.16}/TypedUnit.egg-info/dependency_links.txt +0 -0
  42. {typedunit-0.2.13 → typedunit-0.2.16}/TypedUnit.egg-info/top_level.txt +0 -0
  43. {typedunit-0.2.13 → typedunit-0.2.16}/conda.recipe/meta.yaml +0 -0
  44. {typedunit-0.2.13 → typedunit-0.2.16}/docs/Makefile +0 -0
  45. {typedunit-0.2.13 → typedunit-0.2.16}/docs/examples/README.rst +0 -0
  46. {typedunit-0.2.13 → typedunit-0.2.16}/docs/examples/example_0.py +0 -0
  47. {typedunit-0.2.13 → typedunit-0.2.16}/docs/examples/example_1.py +0 -0
  48. {typedunit-0.2.13 → typedunit-0.2.16}/docs/images/logo.png +0 -0
  49. {typedunit-0.2.13 → typedunit-0.2.16}/docs/make.bat +0 -0
  50. {typedunit-0.2.13 → typedunit-0.2.16}/docs/redirect.html +0 -0
  51. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/_static/default.css +0 -0
  52. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/_static/layout.css +0 -0
  53. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/_static/thumbnail.png +0 -0
  54. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/code.rst +0 -0
  55. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/guide/concepts.rst +0 -0
  56. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/guide/installation.rst +0 -0
  57. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/guide/pint.rst +0 -0
  58. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/guide/quickstart.rst +0 -0
  59. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/guide/validation.rst +0 -0
  60. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/references.rst +0 -0
  61. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/sg_execution_times.rst +0 -0
  62. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/theory.rst +0 -0
  63. {typedunit-0.2.13 → typedunit-0.2.16}/docs/source/units.rst +0 -0
  64. {typedunit-0.2.13 → typedunit-0.2.16}/pytest.ini +0 -0
  65. {typedunit-0.2.13 → typedunit-0.2.16}/setup.cfg +0 -0
  66. {typedunit-0.2.13 → typedunit-0.2.16}/tests/__init__.py +0 -0
  67. {typedunit-0.2.13 → typedunit-0.2.16}/tests/test_0.py +0 -0
  68. {typedunit-0.2.13 → typedunit-0.2.16}/tools/next_release_version.py +0 -0
@@ -16,7 +16,7 @@ permissions:
16
16
 
17
17
  jobs:
18
18
  coverage:
19
- uses: MartinPdeS/MPSActions/.github/workflows/publish_coverage.yml@a01969bc5af90666281f9d37acffdf6a4629763a
19
+ uses: MartinPdeS/MPSActions/.github/workflows/publish_coverage.yml@v2
20
20
  with:
21
21
  python-version: "3.11"
22
22
  apt-package: xvfb
@@ -0,0 +1,20 @@
1
+ name: Publish documentation
2
+ 'on':
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
7
+ branches:
8
+ - master
9
+ permissions:
10
+ contents: read
11
+ jobs:
12
+ documentation:
13
+ permissions:
14
+ contents: read
15
+ uses: MartinPdeS/MPSActions/.github/workflows/build_documentation.yml@v2
16
+ with:
17
+ python-version: '3.11'
18
+ package-name: TypedUnit
19
+ apt-package: xvfb jq
20
+ debug: true
@@ -0,0 +1,33 @@
1
+ name: Publish release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ release:
12
+ permissions:
13
+ contents: write
14
+ pages: write
15
+ id-token: write
16
+ uses: MartinPdeS/MPSActions/.github/workflows/publish_release.yml@v2
17
+ with:
18
+ documentation: true
19
+ documentation_package_name: TypedUnit
20
+ documentation_python_version: "3.11"
21
+ documentation_apt_package: xvfb jq
22
+ debug: true
23
+ pypi_package_type: pure
24
+ pypi_python_version: "3.11"
25
+ pypi_test_command: 'python -c "import TypedUnit; print(TypedUnit.__version__)"'
26
+ conda_python_versions: '["3.14"]'
27
+ conda_os_list: '["ubuntu-latest"]'
28
+ conda_package_name: typedunit
29
+ conda_recipe_path: conda.recipe
30
+ conda_test_import: TypedUnit
31
+ secrets:
32
+ PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
33
+ ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
@@ -0,0 +1,18 @@
1
+ name: Quality
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ quality:
14
+ uses: MartinPdeS/MPSActions/.github/workflows/run_quality.yml@v2
15
+ with:
16
+ install-command: >-
17
+ python -m pip install --upgrade pip && python -m pip install "ruff>=0.6,<1"
18
+ quality-command: python -m ruff check TypedUnit tests
@@ -0,0 +1,19 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ tests:
14
+ uses: MartinPdeS/MPSActions/.github/workflows/run_tests.yml@v2
15
+ with:
16
+ python-versions: '["3.11", "3.14"]'
17
+ install-command: >-
18
+ python -m pip install --upgrade pip && python -m pip install -e ".[testing]"
19
+ test-command: python -m pytest -q
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TypedUnit
3
- Version: 0.2.13
3
+ Version: 0.2.16
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,12 +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"
57
- Requires-Dist: numpydoc~=1.8; extra == "documentation"
58
- Requires-Dist: sphinx>=6; extra == "documentation"
59
- Requires-Dist: sphinx-gallery~=0.17; extra == "documentation"
60
- Requires-Dist: sphinx-rtd-theme<4,>=2; extra == "documentation"
61
- Requires-Dist: pydata-sphinx-theme~=0.15; extra == "documentation"
56
+ Requires-Dist: MartinPdeS-docs<0.3,>=0.2.5; extra == "documentation"
62
57
  Dynamic: license-file
63
58
 
64
59
  TypedUnit
@@ -0,0 +1,17 @@
1
+ # file generated by setuptools_scm
2
+ # don't change, don't track in version control
3
+ TYPE_CHECKING = False
4
+ if TYPE_CHECKING:
5
+ from typing import Tuple, Union
6
+
7
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
8
+ else:
9
+ VERSION_TUPLE = object
10
+
11
+ version: str
12
+ __version__: str
13
+ __version_tuple__: VERSION_TUPLE
14
+ version_tuple: VERSION_TUPLE
15
+
16
+ __version__ = version = "0.2.16"
17
+ __version_tuple__ = version_tuple = (0, 2, 16)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TypedUnit
3
- Version: 0.2.13
3
+ Version: 0.2.16
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,12 +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"
57
- Requires-Dist: numpydoc~=1.8; extra == "documentation"
58
- Requires-Dist: sphinx>=6; extra == "documentation"
59
- Requires-Dist: sphinx-gallery~=0.17; extra == "documentation"
60
- Requires-Dist: sphinx-rtd-theme<4,>=2; extra == "documentation"
61
- Requires-Dist: pydata-sphinx-theme~=0.15; extra == "documentation"
56
+ Requires-Dist: MartinPdeS-docs<0.3,>=0.2.5; extra == "documentation"
62
57
  Dynamic: license-file
63
58
 
64
59
  TypedUnit
@@ -37,12 +37,15 @@ docs/examples/example_1.py
37
37
  docs/images/logo.png
38
38
  docs/source/code.rst
39
39
  docs/source/conf.py
40
+ docs/source/guide.rst
40
41
  docs/source/index.rst
42
+ docs/source/reference.rst
41
43
  docs/source/references.rst
42
44
  docs/source/sg_execution_times.rst
43
45
  docs/source/theory.rst
44
46
  docs/source/units.rst
45
47
  docs/source/_static/default.css
48
+ docs/source/_static/favicon.svg
46
49
  docs/source/_static/layout.css
47
50
  docs/source/_static/thumbnail.png
48
51
  docs/source/guide/concepts.rst
@@ -4,12 +4,7 @@ matplotlib
4
4
  pint_pandas
5
5
 
6
6
  [documentation]
7
- MartinPdeS-docs<0.2,>=0.1.4
8
- numpydoc~=1.8
9
- sphinx>=6
10
- sphinx-gallery~=0.17
11
- sphinx-rtd-theme<4,>=2
12
- pydata-sphinx-theme~=0.15
7
+ MartinPdeS-docs<0.3,>=0.2.5
13
8
 
14
9
  [testing]
15
10
  pytest<10.0,>=7.4
@@ -29,16 +29,19 @@
29
29
  "docs/make.bat",
30
30
  "docs/redirect.html",
31
31
  "docs/source/_static/default.css",
32
+ "docs/source/_static/favicon.svg",
32
33
  "docs/source/_static/layout.css",
33
34
  "docs/source/_static/thumbnail.png",
34
35
  "docs/source/code.rst",
35
36
  "docs/source/conf.py",
37
+ "docs/source/guide.rst",
36
38
  "docs/source/guide/concepts.rst",
37
39
  "docs/source/guide/installation.rst",
38
40
  "docs/source/guide/pint.rst",
39
41
  "docs/source/guide/quickstart.rst",
40
42
  "docs/source/guide/validation.rst",
41
43
  "docs/source/index.rst",
44
+ "docs/source/reference.rst",
42
45
  "docs/source/references.rst",
43
46
  "docs/source/sg_execution_times.rst",
44
47
  "docs/source/theory.rst",
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.2.16",
3
+ "distance": 0,
4
+ "node": "ga5301f1492b3dd32608f3fef202e0ce7109b61e5",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-10-21"
8
+ }
@@ -0,0 +1,13 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" role="img" aria-labelledby="title">
2
+ <title id="title">TypedUnit icon</title>
3
+ <defs>
4
+ <linearGradient id="unit" x1="0" y1="0" x2="1" y2="1">
5
+ <stop offset="0" stop-color="#5031c8"/>
6
+ <stop offset="1" stop-color="#ff5c72"/>
7
+ </linearGradient>
8
+ </defs>
9
+ <rect width="256" height="256" rx="54" fill="#201747"/>
10
+ <path d="M70 76H186M70 180H186M82 76V180M174 76V180" fill="none" stroke="#fff8fb" stroke-width="12" stroke-linecap="round"/>
11
+ <path d="M104 103V153M152 103V153M104 128H152" fill="none" stroke="url(#unit)" stroke-width="15" stroke-linecap="round"/>
12
+ <circle cx="104" cy="103" r="8" fill="#ffb16b"/>
13
+ </svg>
@@ -1,17 +1,14 @@
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"
11
+ favicon = "_static/favicon.svg"
15
12
  thumbnail = str(Path(__file__).parent.parent / "images" / "logo.png")
16
13
 
17
14
  globals().update(
@@ -19,13 +16,9 @@ globals().update(
19
16
  project="TypedUnits",
20
17
  package=package_name,
21
18
  repository="MartinPdeS/TypedUnit",
22
- version=version,
23
19
  logo=logo,
24
- favicon=logo,
20
+ favicon=favicon,
21
+ gallery_default_thumb=thumbnail,
25
22
  html_theme_options={"show_nav_level": 1},
26
- sphinx_gallery_conf={
27
- "default_thumb_file": thumbnail,
28
- "within_subsection_order": FileNameSortKey,
29
- },
30
23
  )
31
24
  )
@@ -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
@@ -62,28 +62,11 @@ at library boundaries and keep registry ownership explicit.
62
62
 
63
63
  .. toctree::
64
64
  :maxdepth: 2
65
- :caption: Learn
65
+ :hidden:
66
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
67
+ Guide <guide>
68
+ Reference <reference>
69
+ Examples <gallery/index>
87
70
 
88
71
  Indices and tables
89
72
  ==================
@@ -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
@@ -42,7 +42,6 @@ Documentation = "https://martinpdes.github.io/TypedUnit/"
42
42
  Repository = "https://github.com/MartinPdeS/TypedUnit.git"
43
43
 
44
44
  [tool.setuptools_scm]
45
- write_to = "TypedUnit/_version.py"
46
45
  version_scheme = "only-version"
47
46
  local_scheme = "no-local-version"
48
47
 
@@ -56,12 +55,7 @@ testing = [
56
55
  ]
57
56
 
58
57
  documentation = [
59
- "MartinPdeS-docs>=0.1.4,<0.2",
60
- "numpydoc ~=1.8",
61
- "sphinx >=6",
62
- "sphinx-gallery ~=0.17",
63
- "sphinx-rtd-theme >=2,<4",
64
- "pydata-sphinx-theme ~=0.15"
58
+ "MartinPdeS-docs>=0.2.5,<0.3",
65
59
  ]
66
60
 
67
61
  [tool.ruff]
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env python3
2
+ """Create a release commit and annotated semantic-version tag."""
3
+
4
+
5
+ import os
6
+ from pathlib import Path
7
+ import re
8
+ import subprocess
9
+ import sys
10
+
11
+
12
+ ROOT = Path(__file__).resolve().parents[1]
13
+ VERSION_FILE = ROOT / "TypedUnit" / "_version.py"
14
+
15
+
16
+ def run(*args: str, env: dict[str, str] | None = None) -> None:
17
+ subprocess.run(args, cwd=ROOT, check=True, env=env)
18
+
19
+
20
+ def generate_version_file(version: str) -> None:
21
+ """Write the committed source version file for a release only."""
22
+ environment = os.environ.copy()
23
+ environment["SETUPTOOLS_SCM_PRETEND_VERSION"] = version
24
+ run(
25
+ sys.executable,
26
+ "-c",
27
+ (
28
+ "import setuptools_scm; "
29
+ f"setuptools_scm.get_version(root={str(ROOT)!r}, "
30
+ f"write_to={str(VERSION_FILE.relative_to(ROOT))!r}, "
31
+ "version_scheme='only-version', local_scheme='no-local-version')"
32
+ ),
33
+ env=environment,
34
+ )
35
+ if not VERSION_FILE.exists():
36
+ raise RuntimeError("SCM versioning did not generate TypedUnit/_version.py")
37
+
38
+
39
+ def main() -> None:
40
+ if len(sys.argv) != 2 or not re.fullmatch(r"v\d+\.\d+\.\d+", sys.argv[1]):
41
+ raise SystemExit(
42
+ "release aborted: tag must use the form vMAJOR.MINOR.PATCH, for example v0.5.0"
43
+ )
44
+ tag = sys.argv[1]
45
+ if (
46
+ subprocess.run(["git", "diff", "--quiet"], cwd=ROOT).returncode
47
+ or subprocess.run(["git", "diff", "--cached", "--quiet"], cwd=ROOT).returncode
48
+ ):
49
+ raise SystemExit("release aborted: working tree has uncommitted changes")
50
+ if (
51
+ subprocess.run(
52
+ ["git", "rev-parse", "-q", "--verify", f"refs/tags/{tag}"],
53
+ cwd=ROOT,
54
+ stdout=subprocess.DEVNULL,
55
+ ).returncode
56
+ == 0
57
+ ):
58
+ raise SystemExit(f"release aborted: tag {tag} already exists")
59
+ generate_version_file(tag.removeprefix("v"))
60
+ run(
61
+ "git",
62
+ "add",
63
+ "TypedUnit/_version.py",
64
+ )
65
+ run(
66
+ "git",
67
+ "commit",
68
+ "--allow-empty",
69
+ "-m",
70
+ f"Release {tag}",
71
+ "-m",
72
+ "Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>",
73
+ )
74
+ run("git", "tag", "-a", tag, "-m", f"Release {tag}")
75
+
76
+
77
+ if __name__ == "__main__":
78
+ main()
@@ -1,58 +0,0 @@
1
- name: Publish documentation
2
-
3
- on:
4
- push:
5
- branches: [master]
6
- tags: ["v*"]
7
-
8
- permissions:
9
- contents: write
10
- pages: write
11
- id-token: write
12
-
13
- jobs:
14
- documentation:
15
- uses: MartinPdeS/MPSActions/.github/workflows/publish_documentation.yml@a01969bc5af90666281f9d37acffdf6a4629763a
16
- with:
17
- python-version: "3.11"
18
- package-name: TypedUnit
19
- apt-package: xvfb jq
20
-
21
- maintain_documentation:
22
- needs: documentation
23
- if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) }}
24
- runs-on: ubuntu-latest
25
- steps:
26
- - name: Install documentation landing page
27
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
28
- with:
29
- ref: documentation_page
30
- fetch-depth: 0
31
- - run: |
32
- set -Eeuo pipefail
33
- git show "${GITHUB_SHA}:docs/redirect.html" > index.html
34
- test -s docs/latest/index.html
35
- git config user.name "github-actions[bot]"
36
- git config user.email "github-actions[bot]@users.noreply.github.com"
37
- git add index.html
38
- if git diff --cached --quiet; then exit 0; fi
39
- git commit -m "Update documentation landing page [skip ci]"
40
- git push origin HEAD:documentation_page
41
-
42
- publish_pages:
43
- needs: maintain_documentation
44
- if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) }}
45
- runs-on: ubuntu-latest
46
- environment:
47
- name: github-pages
48
- url: ${{ steps.deployment.outputs.page_url }}
49
- steps:
50
- - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
51
- with:
52
- ref: documentation_page
53
- - uses: actions/configure-pages@v5
54
- - uses: actions/upload-pages-artifact@v3
55
- with:
56
- path: .
57
- - id: deployment
58
- uses: actions/deploy-pages@v4
@@ -1,30 +0,0 @@
1
- name: Publish release
2
-
3
- on:
4
- push:
5
- tags: ["v*"]
6
-
7
- permissions:
8
- contents: read
9
-
10
- jobs:
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
22
- uses: MartinPdeS/MPSActions/.github/workflows/publish_compiled_package_to_anaconda.yml@a01969bc5af90666281f9d37acffdf6a4629763a
23
- with:
24
- python_versions: '["3.14"]'
25
- os_list: '["ubuntu-latest"]'
26
- package_name: typedunit
27
- recipe_path: conda.recipe
28
- test_import: TypedUnit
29
- secrets:
30
- ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
@@ -1,22 +0,0 @@
1
- name: Static quality checks
2
-
3
- on:
4
- push:
5
- branches: [master]
6
- pull_request:
7
- branches: [master]
8
-
9
- permissions:
10
- contents: read
11
-
12
- jobs:
13
- quality:
14
- runs-on: ubuntu-latest
15
- steps:
16
- - name: Set up Python and CI dependencies
17
- uses: MartinPdeS/MPSActions/actions/setup-python@a01969bc5af90666281f9d37acffdf6a4629763a
18
- with:
19
- python-version: "3.11"
20
- install-command: >-
21
- python -m pip install --upgrade pip && python -m pip install "ruff>=0.6,<1"
22
- - run: python -m ruff check TypedUnit tests
@@ -1,26 +0,0 @@
1
- name: Tests
2
-
3
- on:
4
- push:
5
- branches: [master]
6
- pull_request:
7
- branches: [master]
8
-
9
- permissions:
10
- contents: read
11
-
12
- jobs:
13
- tests:
14
- runs-on: ubuntu-latest
15
- strategy:
16
- fail-fast: false
17
- matrix:
18
- python-version: ["3.11", "3.14"]
19
- steps:
20
- - name: Set up Python and CI dependencies
21
- uses: MartinPdeS/MPSActions/actions/setup-python@a01969bc5af90666281f9d37acffdf6a4629763a
22
- with:
23
- python-version: "${{ matrix.python-version }}"
24
- install-command: >-
25
- python -m pip install --upgrade pip && python -m pip install -e ".[testing]"
26
- - run: python -m pytest -q
@@ -1,24 +0,0 @@
1
- # file generated by vcs-versioning
2
- # don't change, don't track in version control
3
- from __future__ import annotations
4
-
5
- __all__ = [
6
- "__version__",
7
- "__version_tuple__",
8
- "version",
9
- "version_tuple",
10
- "__commit_id__",
11
- "commit_id",
12
- ]
13
-
14
- version: str
15
- __version__: str
16
- __version_tuple__: tuple[int | str, ...]
17
- version_tuple: tuple[int | str, ...]
18
- commit_id: str | None
19
- __commit_id__: str | None
20
-
21
- __version__ = version = '0.2.13'
22
- __version_tuple__ = version_tuple = (0, 2, 13)
23
-
24
- __commit_id__ = commit_id = 'g62984b710'
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "0.2.13",
3
- "distance": 0,
4
- "node": "g62984b7107a5152593ca6d295cea17ff1a3a6ecc",
5
- "dirty": true,
6
- "branch": "HEAD",
7
- "node_date": "2026-10-20"
8
- }
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Create a release commit and annotated semantic-version tag."""
3
-
4
-
5
- import re
6
- import subprocess
7
- import sys
8
-
9
-
10
- def run(*args: str) -> None:
11
- subprocess.run(args, check=True)
12
-
13
-
14
- def main() -> None:
15
- if len(sys.argv) != 2 or not re.fullmatch(r"v\d+\.\d+\.\d+", sys.argv[1]):
16
- raise SystemExit(
17
- "release aborted: tag must use the form vMAJOR.MINOR.PATCH, for example v0.5.0"
18
- )
19
- tag = sys.argv[1]
20
- if (
21
- subprocess.run(["git", "diff", "--quiet"]).returncode
22
- or subprocess.run(["git", "diff", "--cached", "--quiet"]).returncode
23
- ):
24
- raise SystemExit("release aborted: working tree has uncommitted changes")
25
- if (
26
- subprocess.run(
27
- ["git", "rev-parse", "-q", "--verify", f"refs/tags/{tag}"],
28
- stdout=subprocess.DEVNULL,
29
- ).returncode
30
- == 0
31
- ):
32
- raise SystemExit(f"release aborted: tag {tag} already exists")
33
- run(
34
- "git",
35
- "commit",
36
- "--allow-empty",
37
- "-m",
38
- f"Release {tag}",
39
- "-m",
40
- "Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>",
41
- )
42
- run("git", "tag", "-a", tag, "-m", f"Release {tag}")
43
-
44
-
45
- if __name__ == "__main__":
46
- main()
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