TypedUnit 0.2.16__tar.gz → 0.2.17__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.16 → typedunit-0.2.17}/PKG-INFO +4 -2
- typedunit-0.2.17/TypedUnit/_version.py +5 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/TypedUnit.egg-info/PKG-INFO +4 -2
- typedunit-0.2.17/TypedUnit.egg-info/SOURCES.txt +15 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/TypedUnit.egg-info/requires.txt +4 -1
- {typedunit-0.2.16 → typedunit-0.2.17}/pyproject.toml +10 -8
- typedunit-0.2.16/.coveragerc +0 -22
- typedunit-0.2.16/.flake8 +0 -6
- typedunit-0.2.16/.github/dependabot.yml +0 -10
- typedunit-0.2.16/.github/workflows/deploy_coverage.yml +0 -25
- typedunit-0.2.16/.github/workflows/deploy_documentation.yml +0 -20
- typedunit-0.2.16/.github/workflows/deploy_release.yml +0 -33
- typedunit-0.2.16/.github/workflows/quality.yml +0 -18
- typedunit-0.2.16/.github/workflows/tests.yml +0 -19
- typedunit-0.2.16/.gitignore +0 -41
- typedunit-0.2.16/.pre-commit-config.yaml +0 -15
- typedunit-0.2.16/CONTRIBUTING.md +0 -7
- typedunit-0.2.16/Makefile +0 -15
- typedunit-0.2.16/TypedUnit/_version.py +0 -17
- typedunit-0.2.16/TypedUnit.egg-info/SOURCES.txt +0 -59
- typedunit-0.2.16/TypedUnit.egg-info/scm_file_list.json +0 -56
- typedunit-0.2.16/TypedUnit.egg-info/scm_version.json +0 -8
- typedunit-0.2.16/conda.recipe/meta.yaml +0 -61
- typedunit-0.2.16/docs/Makefile +0 -19
- typedunit-0.2.16/docs/examples/README.rst +0 -6
- typedunit-0.2.16/docs/examples/example_0.py +0 -27
- typedunit-0.2.16/docs/examples/example_1.py +0 -27
- typedunit-0.2.16/docs/images/logo.png +0 -0
- typedunit-0.2.16/docs/make.bat +0 -35
- typedunit-0.2.16/docs/redirect.html +0 -12
- typedunit-0.2.16/docs/source/_static/default.css +0 -19
- typedunit-0.2.16/docs/source/_static/favicon.svg +0 -13
- typedunit-0.2.16/docs/source/_static/layout.css +0 -89
- typedunit-0.2.16/docs/source/_static/thumbnail.png +0 -0
- typedunit-0.2.16/docs/source/code.rst +0 -20
- typedunit-0.2.16/docs/source/conf.py +0 -24
- typedunit-0.2.16/docs/source/guide/concepts.rst +0 -37
- typedunit-0.2.16/docs/source/guide/installation.rst +0 -21
- typedunit-0.2.16/docs/source/guide/pint.rst +0 -24
- typedunit-0.2.16/docs/source/guide/quickstart.rst +0 -27
- typedunit-0.2.16/docs/source/guide/validation.rst +0 -40
- typedunit-0.2.16/docs/source/guide.rst +0 -14
- typedunit-0.2.16/docs/source/index.rst +0 -76
- typedunit-0.2.16/docs/source/reference.rst +0 -11
- typedunit-0.2.16/docs/source/references.rst +0 -11
- typedunit-0.2.16/docs/source/sg_execution_times.rst +0 -40
- typedunit-0.2.16/docs/source/theory.rst +0 -12
- typedunit-0.2.16/docs/source/units.rst +0 -35
- typedunit-0.2.16/pytest.ini +0 -21
- typedunit-0.2.16/tests/__init__.py +0 -0
- typedunit-0.2.16/tools/next_release_version.py +0 -33
- typedunit-0.2.16/tools/release_tag.py +0 -78
- {typedunit-0.2.16 → typedunit-0.2.17}/LICENSE +0 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/README.rst +0 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/TypedUnit/__init__.py +0 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/TypedUnit/directories.py +0 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/TypedUnit/helper.py +0 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/TypedUnit/units.py +0 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/TypedUnit/utils.py +0 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/TypedUnit.egg-info/dependency_links.txt +0 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/TypedUnit.egg-info/top_level.txt +0 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/setup.cfg +0 -0
- {typedunit-0.2.16 → typedunit-0.2.17}/tests/test_0.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: TypedUnit
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.17
|
|
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
|
|
@@ -46,6 +46,8 @@ Requires-Dist: pint<0.26,>=0.24
|
|
|
46
46
|
Requires-Dist: numpy
|
|
47
47
|
Requires-Dist: matplotlib
|
|
48
48
|
Requires-Dist: pint_pandas
|
|
49
|
+
Provides-Extra: release
|
|
50
|
+
Requires-Dist: martinpdes-maintenance==0.2.2; extra == "release"
|
|
49
51
|
Provides-Extra: testing
|
|
50
52
|
Requires-Dist: pytest<10.0,>=7.4; extra == "testing"
|
|
51
53
|
Requires-Dist: pytest-cov<7,>=2; extra == "testing"
|
|
@@ -53,7 +55,7 @@ Requires-Dist: pytest-json-report~=1.5; extra == "testing"
|
|
|
53
55
|
Requires-Dist: flake8==7.3.0; extra == "testing"
|
|
54
56
|
Requires-Dist: coverage~=7.6; extra == "testing"
|
|
55
57
|
Provides-Extra: documentation
|
|
56
|
-
Requires-Dist: MartinPdeS-docs<0.
|
|
58
|
+
Requires-Dist: MartinPdeS-docs<0.5,>=0.4.0; extra == "documentation"
|
|
57
59
|
Dynamic: license-file
|
|
58
60
|
|
|
59
61
|
TypedUnit
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: TypedUnit
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.17
|
|
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
|
|
@@ -46,6 +46,8 @@ Requires-Dist: pint<0.26,>=0.24
|
|
|
46
46
|
Requires-Dist: numpy
|
|
47
47
|
Requires-Dist: matplotlib
|
|
48
48
|
Requires-Dist: pint_pandas
|
|
49
|
+
Provides-Extra: release
|
|
50
|
+
Requires-Dist: martinpdes-maintenance==0.2.2; extra == "release"
|
|
49
51
|
Provides-Extra: testing
|
|
50
52
|
Requires-Dist: pytest<10.0,>=7.4; extra == "testing"
|
|
51
53
|
Requires-Dist: pytest-cov<7,>=2; extra == "testing"
|
|
@@ -53,7 +55,7 @@ Requires-Dist: pytest-json-report~=1.5; extra == "testing"
|
|
|
53
55
|
Requires-Dist: flake8==7.3.0; extra == "testing"
|
|
54
56
|
Requires-Dist: coverage~=7.6; extra == "testing"
|
|
55
57
|
Provides-Extra: documentation
|
|
56
|
-
Requires-Dist: MartinPdeS-docs<0.
|
|
58
|
+
Requires-Dist: MartinPdeS-docs<0.5,>=0.4.0; extra == "documentation"
|
|
57
59
|
Dynamic: license-file
|
|
58
60
|
|
|
59
61
|
TypedUnit
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.rst
|
|
3
|
+
pyproject.toml
|
|
4
|
+
TypedUnit/__init__.py
|
|
5
|
+
TypedUnit/_version.py
|
|
6
|
+
TypedUnit/directories.py
|
|
7
|
+
TypedUnit/helper.py
|
|
8
|
+
TypedUnit/units.py
|
|
9
|
+
TypedUnit/utils.py
|
|
10
|
+
TypedUnit.egg-info/PKG-INFO
|
|
11
|
+
TypedUnit.egg-info/SOURCES.txt
|
|
12
|
+
TypedUnit.egg-info/dependency_links.txt
|
|
13
|
+
TypedUnit.egg-info/requires.txt
|
|
14
|
+
TypedUnit.egg-info/top_level.txt
|
|
15
|
+
tests/test_0.py
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools>=40.8.0", "wheel"
|
|
2
|
+
requires = ["setuptools>=40.8.0", "wheel"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "TypedUnit"
|
|
7
|
-
|
|
7
|
+
version = "0.2.17"
|
|
8
8
|
description = "A package wrapping pint for handling typed units in Python."
|
|
9
9
|
license = {file = "LICENSE"}
|
|
10
10
|
readme = "README.rst"
|
|
@@ -41,11 +41,8 @@ Homepage = "https://github.com/MartinPdeS/TypedUnit"
|
|
|
41
41
|
Documentation = "https://martinpdes.github.io/TypedUnit/"
|
|
42
42
|
Repository = "https://github.com/MartinPdeS/TypedUnit.git"
|
|
43
43
|
|
|
44
|
-
[tool.setuptools_scm]
|
|
45
|
-
version_scheme = "only-version"
|
|
46
|
-
local_scheme = "no-local-version"
|
|
47
|
-
|
|
48
44
|
[project.optional-dependencies]
|
|
45
|
+
release = ["martinpdes-maintenance==0.2.2"]
|
|
49
46
|
testing = [
|
|
50
47
|
"pytest >=7.4,<10.0",
|
|
51
48
|
"pytest-cov >=2,<7",
|
|
@@ -55,13 +52,18 @@ testing = [
|
|
|
55
52
|
]
|
|
56
53
|
|
|
57
54
|
documentation = [
|
|
58
|
-
"MartinPdeS-docs>=0.
|
|
55
|
+
"MartinPdeS-docs>=0.4.0,<0.5",
|
|
59
56
|
]
|
|
60
57
|
|
|
61
58
|
[tool.ruff]
|
|
62
59
|
target-version = "py310"
|
|
63
|
-
#
|
|
60
|
+
# The release helper maintains the version file.
|
|
64
61
|
extend-exclude = ["TypedUnit/_version.py"]
|
|
65
62
|
|
|
66
63
|
[tool.ruff.lint]
|
|
67
64
|
select = ["E4", "E7", "E9", "F", "I", "B"]
|
|
65
|
+
|
|
66
|
+
[tool.mps-maintenance]
|
|
67
|
+
version-file = "TypedUnit/_version.py"
|
|
68
|
+
version-method = "literal"
|
|
69
|
+
conda-recipe = "conda.recipe/meta.yaml"
|
typedunit-0.2.16/.coveragerc
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# .coveragerc
|
|
2
|
-
[run]
|
|
3
|
-
source = TypedUnit
|
|
4
|
-
branch = True
|
|
5
|
-
relative_files = True
|
|
6
|
-
parallel = True
|
|
7
|
-
omit =
|
|
8
|
-
**/__init__.py
|
|
9
|
-
TypedUnit/_version.py
|
|
10
|
-
TypedUnit/directories.py
|
|
11
|
-
TypedUnit/**/__main__.py
|
|
12
|
-
|
|
13
|
-
[report]
|
|
14
|
-
skip_covered = True
|
|
15
|
-
show_missing = True
|
|
16
|
-
precision = 2
|
|
17
|
-
|
|
18
|
-
[html]
|
|
19
|
-
directory = htmlcov
|
|
20
|
-
|
|
21
|
-
[xml]
|
|
22
|
-
output = coverage.xml
|
typedunit-0.2.16/.flake8
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
name: Publish coverage
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [master]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [master]
|
|
8
|
-
|
|
9
|
-
concurrency:
|
|
10
|
-
group: typedunit-coverage
|
|
11
|
-
cancel-in-progress: false
|
|
12
|
-
|
|
13
|
-
permissions:
|
|
14
|
-
contents: write
|
|
15
|
-
pull-requests: write
|
|
16
|
-
|
|
17
|
-
jobs:
|
|
18
|
-
coverage:
|
|
19
|
-
uses: MartinPdeS/MPSActions/.github/workflows/publish_coverage.yml@v2
|
|
20
|
-
with:
|
|
21
|
-
python-version: "3.11"
|
|
22
|
-
apt-package: xvfb
|
|
23
|
-
coverage-package: TypedUnit
|
|
24
|
-
secrets:
|
|
25
|
-
_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
|
@@ -1,33 +0,0 @@
|
|
|
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 }}
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
|
@@ -1,19 +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
|
-
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
|
typedunit-0.2.16/.gitignore
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Ignore all
|
|
3
|
-
/*
|
|
4
|
-
|
|
5
|
-
# Except ...
|
|
6
|
-
!.github
|
|
7
|
-
!.gitmodules
|
|
8
|
-
!extern
|
|
9
|
-
!TypedUnit
|
|
10
|
-
!development
|
|
11
|
-
!docs
|
|
12
|
-
!tests
|
|
13
|
-
!.flake8
|
|
14
|
-
!.gitignore
|
|
15
|
-
!.pre-commit-config.yaml
|
|
16
|
-
!LICENSE
|
|
17
|
-
!conda.recipe
|
|
18
|
-
!conda.recipe/meta.yaml
|
|
19
|
-
!pyproject.toml
|
|
20
|
-
!README.rst
|
|
21
|
-
!CONTRIBUTING.md
|
|
22
|
-
!/Makefile
|
|
23
|
-
!tools
|
|
24
|
-
!tools/*.py
|
|
25
|
-
!notebook.ipynb
|
|
26
|
-
!CMakeLists.txt
|
|
27
|
-
!pytest.ini
|
|
28
|
-
!.coveragerc
|
|
29
|
-
|
|
30
|
-
# But ignore docs/build inside docs and code
|
|
31
|
-
docs/build/
|
|
32
|
-
docs/source/gallery/
|
|
33
|
-
|
|
34
|
-
# Compiled files in the project
|
|
35
|
-
*__pycache__*
|
|
36
|
-
*.DS_Store*
|
|
37
|
-
*.so*
|
|
38
|
-
*.a*
|
|
39
|
-
!Makefile
|
|
40
|
-
|
|
41
|
-
# Package specifics
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
repos:
|
|
2
|
-
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
-
rev: v4.6.0
|
|
4
|
-
hooks:
|
|
5
|
-
- id: check-merge-conflict
|
|
6
|
-
- id: end-of-file-fixer
|
|
7
|
-
- id: mixed-line-ending
|
|
8
|
-
- id: detect-private-key
|
|
9
|
-
- id: check-json
|
|
10
|
-
- id: check-case-conflict
|
|
11
|
-
|
|
12
|
-
- repo: https://github.com/psf/black
|
|
13
|
-
rev: 24.4.2
|
|
14
|
-
hooks:
|
|
15
|
-
- id: black
|
typedunit-0.2.16/CONTRIBUTING.md
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Contributing to TypedUnit
|
|
2
|
-
|
|
3
|
-
Use Python 3.10 or newer. Install development dependencies with `python -m pip install -e ".[testing,documentation]"`, then run `python -m pytest`.
|
|
4
|
-
|
|
5
|
-
Releases use semantic version tags. Run `make patch`, `make minor`, or `make major` from a clean `master` checkout; the command creates the release commit, tags it, and pushes both. Publishing workflows run only for `v*` tags.
|
|
6
|
-
|
|
7
|
-
The Conda recipe is at `conda.recipe/meta.yaml`. Do not commit generated documentation, virtual environments, build artefacts, or caches.
|
typedunit-0.2.16/Makefile
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
PYTHON ?= python3
|
|
2
|
-
|
|
3
|
-
.PHONY: release tag patch minor major
|
|
4
|
-
|
|
5
|
-
release:
|
|
6
|
-
@set -eu; release_tag="$$( $(PYTHON) tools/next_release_version.py $(BUMP) )"; \
|
|
7
|
-
$(PYTHON) tools/release_tag.py "$$release_tag"; \
|
|
8
|
-
git push origin HEAD "refs/tags/$$release_tag"
|
|
9
|
-
|
|
10
|
-
tag:
|
|
11
|
-
@set -eu; release_tag="$$( $(PYTHON) tools/next_release_version.py $(BUMP) )"; \
|
|
12
|
-
$(PYTHON) tools/release_tag.py "$$release_tag"
|
|
13
|
-
|
|
14
|
-
patch minor major:
|
|
15
|
-
@$(MAKE) release BUMP=$@
|
|
@@ -1,17 +0,0 @@
|
|
|
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,59 +0,0 @@
|
|
|
1
|
-
.coveragerc
|
|
2
|
-
.flake8
|
|
3
|
-
.gitignore
|
|
4
|
-
.pre-commit-config.yaml
|
|
5
|
-
CONTRIBUTING.md
|
|
6
|
-
LICENSE
|
|
7
|
-
Makefile
|
|
8
|
-
README.rst
|
|
9
|
-
pyproject.toml
|
|
10
|
-
pytest.ini
|
|
11
|
-
.github/dependabot.yml
|
|
12
|
-
.github/workflows/deploy_coverage.yml
|
|
13
|
-
.github/workflows/deploy_documentation.yml
|
|
14
|
-
.github/workflows/deploy_release.yml
|
|
15
|
-
.github/workflows/quality.yml
|
|
16
|
-
.github/workflows/tests.yml
|
|
17
|
-
TypedUnit/__init__.py
|
|
18
|
-
TypedUnit/_version.py
|
|
19
|
-
TypedUnit/directories.py
|
|
20
|
-
TypedUnit/helper.py
|
|
21
|
-
TypedUnit/units.py
|
|
22
|
-
TypedUnit/utils.py
|
|
23
|
-
TypedUnit.egg-info/PKG-INFO
|
|
24
|
-
TypedUnit.egg-info/SOURCES.txt
|
|
25
|
-
TypedUnit.egg-info/dependency_links.txt
|
|
26
|
-
TypedUnit.egg-info/requires.txt
|
|
27
|
-
TypedUnit.egg-info/scm_file_list.json
|
|
28
|
-
TypedUnit.egg-info/scm_version.json
|
|
29
|
-
TypedUnit.egg-info/top_level.txt
|
|
30
|
-
conda.recipe/meta.yaml
|
|
31
|
-
docs/Makefile
|
|
32
|
-
docs/make.bat
|
|
33
|
-
docs/redirect.html
|
|
34
|
-
docs/examples/README.rst
|
|
35
|
-
docs/examples/example_0.py
|
|
36
|
-
docs/examples/example_1.py
|
|
37
|
-
docs/images/logo.png
|
|
38
|
-
docs/source/code.rst
|
|
39
|
-
docs/source/conf.py
|
|
40
|
-
docs/source/guide.rst
|
|
41
|
-
docs/source/index.rst
|
|
42
|
-
docs/source/reference.rst
|
|
43
|
-
docs/source/references.rst
|
|
44
|
-
docs/source/sg_execution_times.rst
|
|
45
|
-
docs/source/theory.rst
|
|
46
|
-
docs/source/units.rst
|
|
47
|
-
docs/source/_static/default.css
|
|
48
|
-
docs/source/_static/favicon.svg
|
|
49
|
-
docs/source/_static/layout.css
|
|
50
|
-
docs/source/_static/thumbnail.png
|
|
51
|
-
docs/source/guide/concepts.rst
|
|
52
|
-
docs/source/guide/installation.rst
|
|
53
|
-
docs/source/guide/pint.rst
|
|
54
|
-
docs/source/guide/quickstart.rst
|
|
55
|
-
docs/source/guide/validation.rst
|
|
56
|
-
tests/__init__.py
|
|
57
|
-
tests/test_0.py
|
|
58
|
-
tools/next_release_version.py
|
|
59
|
-
tools/release_tag.py
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": [
|
|
3
|
-
".coveragerc",
|
|
4
|
-
".flake8",
|
|
5
|
-
".github/dependabot.yml",
|
|
6
|
-
".github/workflows/deploy_coverage.yml",
|
|
7
|
-
".github/workflows/deploy_documentation.yml",
|
|
8
|
-
".github/workflows/deploy_release.yml",
|
|
9
|
-
".github/workflows/quality.yml",
|
|
10
|
-
".github/workflows/tests.yml",
|
|
11
|
-
".gitignore",
|
|
12
|
-
".pre-commit-config.yaml",
|
|
13
|
-
"CONTRIBUTING.md",
|
|
14
|
-
"LICENSE",
|
|
15
|
-
"Makefile",
|
|
16
|
-
"README.rst",
|
|
17
|
-
"TypedUnit/__init__.py",
|
|
18
|
-
"TypedUnit/_version.py",
|
|
19
|
-
"TypedUnit/directories.py",
|
|
20
|
-
"TypedUnit/helper.py",
|
|
21
|
-
"TypedUnit/units.py",
|
|
22
|
-
"TypedUnit/utils.py",
|
|
23
|
-
"conda.recipe/meta.yaml",
|
|
24
|
-
"docs/Makefile",
|
|
25
|
-
"docs/examples/README.rst",
|
|
26
|
-
"docs/examples/example_0.py",
|
|
27
|
-
"docs/examples/example_1.py",
|
|
28
|
-
"docs/images/logo.png",
|
|
29
|
-
"docs/make.bat",
|
|
30
|
-
"docs/redirect.html",
|
|
31
|
-
"docs/source/_static/default.css",
|
|
32
|
-
"docs/source/_static/favicon.svg",
|
|
33
|
-
"docs/source/_static/layout.css",
|
|
34
|
-
"docs/source/_static/thumbnail.png",
|
|
35
|
-
"docs/source/code.rst",
|
|
36
|
-
"docs/source/conf.py",
|
|
37
|
-
"docs/source/guide.rst",
|
|
38
|
-
"docs/source/guide/concepts.rst",
|
|
39
|
-
"docs/source/guide/installation.rst",
|
|
40
|
-
"docs/source/guide/pint.rst",
|
|
41
|
-
"docs/source/guide/quickstart.rst",
|
|
42
|
-
"docs/source/guide/validation.rst",
|
|
43
|
-
"docs/source/index.rst",
|
|
44
|
-
"docs/source/reference.rst",
|
|
45
|
-
"docs/source/references.rst",
|
|
46
|
-
"docs/source/sg_execution_times.rst",
|
|
47
|
-
"docs/source/theory.rst",
|
|
48
|
-
"docs/source/units.rst",
|
|
49
|
-
"pyproject.toml",
|
|
50
|
-
"pytest.ini",
|
|
51
|
-
"tests/__init__.py",
|
|
52
|
-
"tests/test_0.py",
|
|
53
|
-
"tools/next_release_version.py",
|
|
54
|
-
"tools/release_tag.py"
|
|
55
|
-
]
|
|
56
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
package:
|
|
2
|
-
name: typedunit
|
|
3
|
-
version: {{ GIT_DESCRIBE_TAG | replace("v", "") }}
|
|
4
|
-
|
|
5
|
-
source:
|
|
6
|
-
path: ..
|
|
7
|
-
|
|
8
|
-
build:
|
|
9
|
-
noarch: python
|
|
10
|
-
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
|
|
11
|
-
number: 0
|
|
12
|
-
|
|
13
|
-
channels:
|
|
14
|
-
- conda-forge
|
|
15
|
-
- martinpdes
|
|
16
|
-
|
|
17
|
-
requirements:
|
|
18
|
-
host:
|
|
19
|
-
- python {{ PY_VER }}*
|
|
20
|
-
- setuptools >=40.8.0
|
|
21
|
-
- wheel
|
|
22
|
-
- setuptools-scm >=8.0
|
|
23
|
-
- pip
|
|
24
|
-
run:
|
|
25
|
-
- python >=3.10
|
|
26
|
-
- pint >=0.24,<0.26
|
|
27
|
-
- numpy
|
|
28
|
-
- matplotlib
|
|
29
|
-
- pint-pandas
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
about:
|
|
33
|
-
home: https://github.com/MartinPdeS/TypedUnit
|
|
34
|
-
license: MIT
|
|
35
|
-
summary: "A package wrapping pint for handling typed units in Python."
|
|
36
|
-
description: TypedUnit is a library that provides a way to define and manipulate physical quantities with units in a type-safe manner. It builds on top of the Pint library.
|
|
37
|
-
dev_url: https://github.com/MartinPdeS/TypedUnit
|
|
38
|
-
doc_url: https://typedunits.readthedocs.io
|
|
39
|
-
license_file: LICENSE
|
|
40
|
-
keywords:
|
|
41
|
-
- typed units
|
|
42
|
-
- pint
|
|
43
|
-
- physical quantities
|
|
44
|
-
|
|
45
|
-
test:
|
|
46
|
-
imports:
|
|
47
|
-
- TypedUnit
|
|
48
|
-
requires:
|
|
49
|
-
- python {{PY_VER}}*
|
|
50
|
-
- pytest >=0.6
|
|
51
|
-
- pytest-cov >=2.0
|
|
52
|
-
- pytest-json-report ~=1.5.0
|
|
53
|
-
- coverage >=7.10,<8
|
|
54
|
-
commands:
|
|
55
|
-
- python -m pytest
|
|
56
|
-
source_files:
|
|
57
|
-
- tests
|
|
58
|
-
|
|
59
|
-
extra:
|
|
60
|
-
recipe-maintainers:
|
|
61
|
-
- MartinPdeS
|
typedunit-0.2.16/docs/Makefile
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Minimal makefile for Sphinx documentation
|
|
2
|
-
#
|
|
3
|
-
|
|
4
|
-
# You can set these variables from the command line.
|
|
5
|
-
SPHINXOPTS =
|
|
6
|
-
SPHINXBUILD = sphinx-build
|
|
7
|
-
SOURCEDIR = source
|
|
8
|
-
BUILDDIR = build
|
|
9
|
-
|
|
10
|
-
# Put it first so that "make" without argument is like "make help".
|
|
11
|
-
help:
|
|
12
|
-
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
13
|
-
|
|
14
|
-
.PHONY: help Makefile
|
|
15
|
-
|
|
16
|
-
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
17
|
-
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
18
|
-
%: Makefile
|
|
19
|
-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Workflow - 0
|
|
3
|
-
============
|
|
4
|
-
This shows how to use TypedUnits for unit validation in a function.
|
|
5
|
-
"""
|
|
6
|
-
from TypedUnit import Energy, Time, Power, validate_units, ureg
|
|
7
|
-
|
|
8
|
-
# Normal Pint instantiation
|
|
9
|
-
energy = 100 * ureg.joule
|
|
10
|
-
time = 10 * ureg.second
|
|
11
|
-
|
|
12
|
-
# But now isinstance works!
|
|
13
|
-
assert isinstance(energy, Energy) # True
|
|
14
|
-
assert isinstance(time, Time) # True
|
|
15
|
-
|
|
16
|
-
@validate_units
|
|
17
|
-
def calculate_power(energy: Energy, time: Time) -> Power:
|
|
18
|
-
"""Function with automatic unit validation."""
|
|
19
|
-
return (energy / time).to(ureg.watt)
|
|
20
|
-
|
|
21
|
-
# This works
|
|
22
|
-
power = calculate_power(energy, time)
|
|
23
|
-
print(f"Power: {power}")
|
|
24
|
-
|
|
25
|
-
# This fails with clear error message
|
|
26
|
-
length = 5 * ureg.meter
|
|
27
|
-
# calculate_power(length, time) # TypeError: Expected Energy,
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Workflow - 1
|
|
3
|
-
============
|
|
4
|
-
This shows how to use TypedUnits for unit validation in a function.
|
|
5
|
-
"""
|
|
6
|
-
from TypedUnit import Energy, Time, Power, validate_units, ureg
|
|
7
|
-
|
|
8
|
-
# Normal Pint instantiation
|
|
9
|
-
energy = 100 * ureg.joule
|
|
10
|
-
time = 10 * ureg.second
|
|
11
|
-
|
|
12
|
-
# But now isinstance works!
|
|
13
|
-
assert isinstance(energy, Energy) # True
|
|
14
|
-
assert isinstance(time, Time) # True
|
|
15
|
-
|
|
16
|
-
@validate_units
|
|
17
|
-
def calculate_power(energy: Energy, time: Time) -> Power:
|
|
18
|
-
"""Function with automatic unit validation."""
|
|
19
|
-
return (energy / time).to(ureg.watt)
|
|
20
|
-
|
|
21
|
-
# This works
|
|
22
|
-
power = calculate_power(energy, time)
|
|
23
|
-
print(f"Power: {power}")
|
|
24
|
-
|
|
25
|
-
# This fails with clear error message
|
|
26
|
-
length = 5 * ureg.meter
|
|
27
|
-
# calculate_power(length, time) # TypeError: Expected Energy,
|
|
Binary file
|