TypedUnit 0.2.14__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.
- {typedunit-0.2.14 → typedunit-0.2.16}/.github/workflows/deploy_coverage.yml +1 -1
- typedunit-0.2.16/.github/workflows/deploy_documentation.yml +20 -0
- typedunit-0.2.16/.github/workflows/deploy_release.yml +33 -0
- typedunit-0.2.16/.github/workflows/quality.yml +18 -0
- typedunit-0.2.16/.github/workflows/tests.yml +19 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/PKG-INFO +2 -7
- typedunit-0.2.16/TypedUnit/_version.py +17 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/TypedUnit.egg-info/PKG-INFO +2 -7
- {typedunit-0.2.14 → typedunit-0.2.16}/TypedUnit.egg-info/SOURCES.txt +1 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/TypedUnit.egg-info/requires.txt +1 -6
- {typedunit-0.2.14 → typedunit-0.2.16}/TypedUnit.egg-info/scm_file_list.json +1 -0
- typedunit-0.2.16/TypedUnit.egg-info/scm_version.json +8 -0
- typedunit-0.2.16/docs/source/_static/favicon.svg +13 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/conf.py +2 -1
- {typedunit-0.2.14 → typedunit-0.2.16}/pyproject.toml +1 -7
- typedunit-0.2.16/tools/release_tag.py +78 -0
- typedunit-0.2.14/.github/workflows/deploy_documentation.yml +0 -58
- typedunit-0.2.14/.github/workflows/deploy_release.yml +0 -30
- typedunit-0.2.14/.github/workflows/quality.yml +0 -22
- typedunit-0.2.14/.github/workflows/tests.yml +0 -26
- typedunit-0.2.14/TypedUnit/_version.py +0 -24
- typedunit-0.2.14/TypedUnit.egg-info/scm_version.json +0 -8
- typedunit-0.2.14/tools/release_tag.py +0 -46
- {typedunit-0.2.14 → typedunit-0.2.16}/.coveragerc +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/.flake8 +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/.github/dependabot.yml +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/.gitignore +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/.pre-commit-config.yaml +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/CONTRIBUTING.md +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/LICENSE +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/Makefile +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/README.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/TypedUnit/__init__.py +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/TypedUnit/directories.py +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/TypedUnit/helper.py +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/TypedUnit/units.py +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/TypedUnit/utils.py +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/TypedUnit.egg-info/dependency_links.txt +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/TypedUnit.egg-info/top_level.txt +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/conda.recipe/meta.yaml +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/Makefile +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/examples/README.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/examples/example_0.py +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/examples/example_1.py +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/images/logo.png +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/make.bat +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/redirect.html +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/_static/default.css +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/_static/layout.css +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/_static/thumbnail.png +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/code.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/guide/concepts.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/guide/installation.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/guide/pint.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/guide/quickstart.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/guide/validation.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/guide.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/index.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/reference.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/references.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/sg_execution_times.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/theory.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/docs/source/units.rst +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/pytest.ini +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/setup.cfg +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/tests/__init__.py +0 -0
- {typedunit-0.2.14 → typedunit-0.2.16}/tests/test_0.py +0 -0
- {typedunit-0.2.14 → 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@
|
|
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.
|
|
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.3,>=0.2.
|
|
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.
|
|
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.3,>=0.2.
|
|
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,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>
|
|
@@ -8,6 +8,7 @@ from martinpdes_docs import configure
|
|
|
8
8
|
|
|
9
9
|
package_name = "TypedUnit"
|
|
10
10
|
logo = "../images/logo.png"
|
|
11
|
+
favicon = "_static/favicon.svg"
|
|
11
12
|
thumbnail = str(Path(__file__).parent.parent / "images" / "logo.png")
|
|
12
13
|
|
|
13
14
|
globals().update(
|
|
@@ -16,7 +17,7 @@ globals().update(
|
|
|
16
17
|
package=package_name,
|
|
17
18
|
repository="MartinPdeS/TypedUnit",
|
|
18
19
|
logo=logo,
|
|
19
|
-
favicon=
|
|
20
|
+
favicon=favicon,
|
|
20
21
|
gallery_default_thumb=thumbnail,
|
|
21
22
|
html_theme_options={"show_nav_level": 1},
|
|
22
23
|
)
|
|
@@ -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.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.14'
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 2, 14)
|
|
23
|
-
|
|
24
|
-
__commit_id__ = commit_id = 'g71aab5d79'
|
|
@@ -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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|