physpyx 2.3.0__tar.gz → 3.0.0__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.
- {physpyx-2.3.0 → physpyx-3.0.0}/PKG-INFO +3 -3
- {physpyx-2.3.0 → physpyx-3.0.0}/pyproject.toml +12 -12
- {physpyx-2.3.0 → physpyx-3.0.0}/pyproject.toml.orig +25 -25
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/qty.py +1 -1
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/quantity.py +2 -1
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/registry.py +16 -14
- {physpyx-2.3.0 → physpyx-3.0.0}/README.md +0 -0
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/__init__.py +0 -0
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/astronomy.py +0 -0
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/constants.py +0 -0
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/context.py +0 -0
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/data/all-nuclides.csv +0 -0
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/helper.py +0 -0
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/manager.py +0 -0
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/nuclide.py +0 -0
- {physpyx-2.3.0 → physpyx-3.0.0}/src/physpyx/physpyx.py +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: physpyx
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: Provides a way to use python code in LaTeX
|
|
5
5
|
Author: Jérôme Dufour
|
|
6
6
|
Author-email: Jérôme Dufour <jerome.dufour@eduvaud.ch>
|
|
7
7
|
License-Expression: GPL-3.0-or-later
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
8
|
Classifier: Operating System :: Unix
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Classifier: Topic :: Education
|
|
11
11
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
12
12
|
Requires-Dist: numpy>=2.3.4
|
|
13
13
|
Requires-Dist: pint>=0.25.1
|
|
14
14
|
Requires-Dist: scipy>=1.17.0
|
|
15
15
|
Requires-Python: >=3.13
|
|
16
|
-
Project-URL: Repository, https://bitbucket.org/jdufour/physpyx/src/master/
|
|
17
16
|
Project-URL: Changelog, https://bitbucket.org/jdufour/physpyx/src/master/CHANGELOG.md
|
|
18
17
|
Project-URL: Documentation, https://physpyx.readthedocs.io/fr/latest/
|
|
18
|
+
Project-URL: Repository, https://bitbucket.org/jdufour/physpyx/src/master/
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
|
|
21
21
|
# PhysPyX
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "physpyx"
|
|
3
|
-
version = "
|
|
3
|
+
version = "3.0.0"
|
|
4
4
|
description = "Provides a way to use python code in LaTeX"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
license = "GPL-3.0-or-later"
|
|
5
8
|
classifiers = [
|
|
6
|
-
"Programming Language :: Python :: 3",
|
|
7
9
|
"Operating System :: Unix",
|
|
10
|
+
"Programming Language :: Python :: 3",
|
|
8
11
|
"Topic :: Education",
|
|
9
12
|
"Topic :: Scientific/Engineering :: Physics",
|
|
10
13
|
]
|
|
11
|
-
license = "GPL-3.0-or-later"
|
|
12
|
-
readme = "README.md"
|
|
13
|
-
requires-python = ">=3.13"
|
|
14
14
|
dependencies = [
|
|
15
15
|
"numpy>=2.3.4",
|
|
16
16
|
"pint>=0.25.1",
|
|
@@ -22,27 +22,27 @@ name = "Jérôme Dufour"
|
|
|
22
22
|
email = "jerome.dufour@eduvaud.ch"
|
|
23
23
|
|
|
24
24
|
[project.urls]
|
|
25
|
-
Repository = "https://bitbucket.org/jdufour/physpyx/src/master/"
|
|
26
25
|
Changelog = "https://bitbucket.org/jdufour/physpyx/src/master/CHANGELOG.md"
|
|
27
26
|
Documentation = "https://physpyx.readthedocs.io/fr/latest/"
|
|
27
|
+
Repository = "https://bitbucket.org/jdufour/physpyx/src/master/"
|
|
28
28
|
|
|
29
29
|
[dependency-groups]
|
|
30
30
|
dev = [
|
|
31
|
-
"mypy>=1.18.1",
|
|
32
31
|
"ipdb>=0.13.13",
|
|
33
|
-
"
|
|
32
|
+
"mypy>=2.3.0",
|
|
34
33
|
"ruff>=0.16.0",
|
|
34
|
+
"scipy-stubs>=1.17.1.5",
|
|
35
35
|
]
|
|
36
36
|
docs = [
|
|
37
|
+
"myst-parser>=4.0.1",
|
|
37
38
|
"sphinx>=7.1.2",
|
|
38
|
-
"sphinx-rtd-theme>=3.0.2",
|
|
39
39
|
"sphinx-argparse>=0.5.2",
|
|
40
|
-
"myst-parser>=4.0.1",
|
|
41
|
-
"sphinx-autodoc2>=0.5.0",
|
|
42
40
|
"sphinx-autobuild>=2025.8.25",
|
|
41
|
+
"sphinx-autodoc2>=0.5.0",
|
|
43
42
|
"sphinx-design>=0.7.0",
|
|
43
|
+
"sphinx-rtd-theme>=3.0.2",
|
|
44
44
|
]
|
|
45
45
|
|
|
46
46
|
[build-system]
|
|
47
|
-
requires = ["uv_build>=0.
|
|
47
|
+
requires = ["uv_build>=0.12.0,<0.13.0"]
|
|
48
48
|
build-backend = "uv_build"
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "physpyx"
|
|
3
|
-
version = "
|
|
3
|
+
version = "3.0.0"
|
|
4
|
+
description = "Provides a way to use python code in LaTeX"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
license = "GPL-3.0-or-later"
|
|
4
8
|
authors = [
|
|
5
|
-
|
|
9
|
+
{ name = "Jérôme Dufour", email = "jerome.dufour@eduvaud.ch" },
|
|
6
10
|
]
|
|
7
|
-
description = "Provides a way to use python code in LaTeX"
|
|
8
11
|
classifiers = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"Topic :: Scientific/Engineering :: Physics"
|
|
12
|
+
"Operating System :: Unix",
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"Topic :: Education",
|
|
15
|
+
"Topic :: Scientific/Engineering :: Physics",
|
|
13
16
|
]
|
|
14
|
-
license = "GPL-3.0-or-later"
|
|
15
|
-
readme = "README.md"
|
|
16
|
-
requires-python = ">=3.13"
|
|
17
17
|
dependencies = [
|
|
18
18
|
"numpy>=2.3.4",
|
|
19
19
|
"pint>=0.25.1",
|
|
20
20
|
"scipy>=1.17.0",
|
|
21
21
|
]
|
|
22
22
|
|
|
23
|
+
[project.urls]
|
|
24
|
+
Changelog = "https://bitbucket.org/jdufour/physpyx/src/master/CHANGELOG.md"
|
|
25
|
+
Documentation = "https://physpyx.readthedocs.io/fr/latest/"
|
|
26
|
+
Repository = "https://bitbucket.org/jdufour/physpyx/src/master/"
|
|
27
|
+
|
|
23
28
|
[dependency-groups]
|
|
24
29
|
dev = [
|
|
25
|
-
"mypy>=1.18.1",
|
|
26
30
|
"ipdb>=0.13.13",
|
|
27
|
-
"
|
|
31
|
+
"mypy>=2.3.0",
|
|
28
32
|
"ruff>=0.16.0",
|
|
33
|
+
"scipy-stubs>=1.17.1.5",
|
|
29
34
|
]
|
|
30
35
|
docs = [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
"myst-parser>=4.0.1",
|
|
37
|
+
"sphinx>=7.1.2",
|
|
38
|
+
"sphinx-argparse>=0.5.2",
|
|
39
|
+
"sphinx-autobuild>=2025.8.25",
|
|
40
|
+
"sphinx-autodoc2>=0.5.0",
|
|
41
|
+
"sphinx-design>=0.7.0",
|
|
42
|
+
"sphinx-rtd-theme>=3.0.2",
|
|
38
43
|
]
|
|
39
44
|
|
|
40
45
|
[build-system]
|
|
41
|
-
requires = ["uv_build>=0.
|
|
46
|
+
requires = ["uv_build>=0.12.0,<0.13.0"]
|
|
42
47
|
build-backend = "uv_build"
|
|
43
|
-
|
|
44
|
-
[project.urls]
|
|
45
|
-
Repository = "https://bitbucket.org/jdufour/physpyx/src/master/"
|
|
46
|
-
Changelog = "https://bitbucket.org/jdufour/physpyx/src/master/CHANGELOG.md"
|
|
47
|
-
Documentation = "https://physpyx.readthedocs.io/fr/latest/"
|
|
@@ -41,7 +41,7 @@ class Qty(PTManager):
|
|
|
41
41
|
"\\ExplSyntaxOn\n\\prop_gset_from_keyval:Nn \\g_physpyx_pty_prop {\n"
|
|
42
42
|
)
|
|
43
43
|
for variable, qty in sys._getframe(2).f_locals.items():
|
|
44
|
-
if isinstance(qty, SiunitxQuantity):
|
|
44
|
+
if variable != "_" and isinstance(qty, SiunitxQuantity):
|
|
45
45
|
for name, new in qty.export(variable):
|
|
46
46
|
outfile.write(f"\t{{{name}}} = {{{new}}},\n")
|
|
47
47
|
if old := current.pop(name, None):
|
|
@@ -30,12 +30,13 @@ class SiunitxQuantity(Quantity):
|
|
|
30
30
|
"degree_Celsius": "celsius",
|
|
31
31
|
"delta_degree_Celsius": "celsius",
|
|
32
32
|
"electron_volt": "electronvolt",
|
|
33
|
+
"light_year": "lightyear",
|
|
34
|
+
"meter_Hg": "mHg",
|
|
33
35
|
"metric_ton": "tonne",
|
|
34
36
|
"revolutions_per_minute": "rpm",
|
|
35
37
|
"speed_of_light": "celerity",
|
|
36
38
|
"standard_atmosphere": "atm",
|
|
37
39
|
"unified_atomic_mass_unit": "amu",
|
|
38
|
-
"meter_Hg": "mHg",
|
|
39
40
|
"watt_hour": "watthour",
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -2,6 +2,7 @@ from typing import Any, cast
|
|
|
2
2
|
|
|
3
3
|
from pint.facets.context import Context
|
|
4
4
|
from pint.registry import GenericUnitRegistry, Unit
|
|
5
|
+
from pint.util import UnitsContainer
|
|
5
6
|
|
|
6
7
|
from physpyx.context import SiunitxContext
|
|
7
8
|
from physpyx.quantity import SiunitxQuantity
|
|
@@ -23,31 +24,32 @@ class SiunitxUnitRegistry(GenericUnitRegistry):
|
|
|
23
24
|
self.define("an = year")
|
|
24
25
|
self.define("ans = years")
|
|
25
26
|
self.define("celerity = speed_of_light")
|
|
26
|
-
self.define("
|
|
27
|
-
self.define("
|
|
27
|
+
self.define("swissfranc = [currency]")
|
|
28
|
+
self.define("swisscent = swissfranc * 0.01")
|
|
28
29
|
self._preferred_units = {
|
|
29
30
|
Unit(name).dimensionality: name
|
|
30
31
|
for name in [
|
|
31
|
-
"meter",
|
|
32
|
-
"second",
|
|
33
|
-
"kilogram",
|
|
34
32
|
"ampere",
|
|
33
|
+
"coulomb",
|
|
34
|
+
"farad",
|
|
35
|
+
"henry",
|
|
36
|
+
"joule",
|
|
35
37
|
"kelvin",
|
|
36
|
-
"
|
|
37
|
-
"meter per second",
|
|
38
|
+
"kilogram",
|
|
38
39
|
"meter per second squared",
|
|
40
|
+
"meter per second",
|
|
41
|
+
"meter",
|
|
42
|
+
"mole",
|
|
39
43
|
"newton",
|
|
40
|
-
"joule",
|
|
41
|
-
"watt",
|
|
42
|
-
"pascal",
|
|
43
|
-
"volt",
|
|
44
44
|
"ohm",
|
|
45
|
+
"pascal",
|
|
46
|
+
"second",
|
|
45
47
|
"tesla",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"coulomb",
|
|
48
|
+
"volt",
|
|
49
|
+
"watt",
|
|
49
50
|
]
|
|
50
51
|
}
|
|
52
|
+
self._preferred_units[UnitsContainer({"[currency]": 1})] = "swissfranc"
|
|
51
53
|
|
|
52
54
|
def enable_contexts(self, *names_or_contexts: str | Context, **kwargs: Any) -> None:
|
|
53
55
|
for context in names_or_contexts:
|
|
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
|