PyPartMC 1.1.1__cp38-cp38-win_amd64.whl → 1.1.2__cp38-cp38-win_amd64.whl

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.

Potentially problematic release.


This version of PyPartMC might be problematic. Click here for more details.

PyPartMC/__init__.py CHANGED
@@ -24,27 +24,51 @@ def __build_extension_env():
24
24
  cookie.close()
25
25
 
26
26
 
27
- # TODO #113: 2 x loop over prefixes and units
28
- si = namedtuple("SI", ("m", "cm", "um", "nm", "kg", "g", "s", "K", "Pa", "hPa", "mol"))(
29
- m=1.0,
30
- cm=0.01,
31
- um=1e-6,
32
- nm=1e-9,
33
- kg=1.0,
34
- g=1e-3,
35
- s=1.0,
36
- K=1.0,
37
- Pa=1.0,
38
- hPa=100.0,
39
- mol=1.0,
40
- )
41
- """ TODO #113 """
27
+ def __generate_si():
28
+ prefixes = {
29
+ "T": 1e12,
30
+ "G": 1e9,
31
+ "M": 1e6,
32
+ "k": 1e3,
33
+ "h": 1e2,
34
+ "da": 1e1,
35
+ "": 1e0,
36
+ "d": 1e-1,
37
+ "c": 1e-2,
38
+ "m": 1e-3,
39
+ "u": 1e-6,
40
+ "n": 1e-9,
41
+ "p": 1e-12,
42
+ }
43
+ units = {
44
+ "m": 1e0,
45
+ "g": 1e-3,
46
+ "s": 1e0,
47
+ "K": 1e0,
48
+ "Pa": 1e0,
49
+ "mol": 1e0,
50
+ "W": 1e0,
51
+ "J": 1e0,
52
+ "N": 1e0,
53
+ }
54
+ return namedtuple("SI", [prefix + unit for prefix in prefixes for unit in units])(
55
+ **{
56
+ prefix_k + unit_k: prefix_v * unit_v
57
+ for prefix_k, prefix_v in prefixes.items()
58
+ for unit_k, unit_v in units.items()
59
+ }
60
+ )
61
+
62
+
63
+ si = __generate_si()
64
+ """ a utility namedtuple aimed at clrifying physics-related code by providing
65
+ SI-prefix-aware unit multipliers, resulting in e.g.: `p = 1000 * si.hPa`
66
+ notation. Note: no dimensional analysis is done! """
42
67
 
43
68
  with __build_extension_env():
44
69
  import _PyPartMC
45
70
  from _PyPartMC import *
46
- from _PyPartMC import ( # pylint: disable=no-name-in-module
47
- __all__,
48
- __version__,
49
- __versions_of_build_time_dependencies__,
50
- )
71
+ from _PyPartMC import __all__ as _PyPartMC_all # pylint: disable=no-name-in-module
72
+ from _PyPartMC import __version__, __versions_of_build_time_dependencies__
73
+
74
+ __all__ = tuple([*_PyPartMC_all, "si"])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyPartMC
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: Python interface to PartMC
5
5
  Author: PyPartMC team (see https://github.com/open-atmos/PyPartMC/graphs/contributors)
6
6
  Author-email: nriemer@illinois.edu
@@ -27,7 +27,7 @@ PyPartMC is a Python interface to [PartMC](https://lagrange.mechse.illinois.edu/
27
27
  PyPartMC is implemented in C++ and it also constitutes a C++ API to the PartMC Fortran internals.
28
28
  The Python API can facilitate using PartMC from other environments - see, e.g., Julia and Matlab examples below.
29
29
 
30
- For an outline of the project, rationale, architecture, and features, refer to: [D'Aquino et al., 2023 (arXiv)](https://doi.org/10.48550/arXiv.2308.02052) (please cite if PyPartMC is used in your research).
30
+ For an outline of the project, rationale, architecture, and features, refer to: [D'Aquino et al., 2024 (SoftwareX)](https://doi.org/10.1016/j.softx.2023.101613) (please cite if PyPartMC is used in your research).
31
31
  For a list of talks and other relevant resources, please see [project Wiki](https://github.com/open-atmos/PyPartMC/wiki/).
32
32
 
33
33
  [![US Funding](https://img.shields.io/static/v1?label=US%20DOE%20Funding%20by&color=267c32&message=ASR&logoWidth=25&logo=image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAQCAMAAAA25D/gAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAASFBMVEVOTXyyIjRDQnNZWINZWITtzdFUU4BVVIFVVYHWiZM9PG/KZnNXVoJaWYT67/FKSXhgX4hgX4lcW4VbWoX03uHQeIN2VXj///9pZChlAAAAAWJLR0QXC9aYjwAAAAd0SU1FB+EICRMGJV+KCCQAAABdSURBVBjThdBJDoAgEETRkkkZBBX0/kd11QTTpH1/STqpAAwWBkobSlkGbt0o5xmEfqxDZJB2Q6XMoBwnVSbTylWp0hi42rmbwTOYPDfR5Kc+07IIUQQvghX9THsBHcES8/SiF0kAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTctMDgtMDlUMTk6MDY6MzcrMDA6MDCX1tBgAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE3LTA4LTA5VDE5OjA2OjM3KzAwOjAw5oto3AAAAABJRU5ErkJggg==)](https://asr.science.energy.gov/)
@@ -0,0 +1,7 @@
1
+ _PyPartMC.cp38-win_amd64.pyd,sha256=EagD6EuDt3HXUtcZJG0UoQXFozjohCHQk028uPQlu-A,5068800
2
+ PyPartMC/__init__.py,sha256=b9MDGMORBD_zX5HO6ZyZZKu75_3kNTtIaZDSATQCWNU,2257
3
+ PyPartMC-1.1.2.dist-info/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
4
+ PyPartMC-1.1.2.dist-info/METADATA,sha256=DyQxueOdkOFokjRUKVCuabQJ_C5deQ5Ia6Ddzct0s2Y,21552
5
+ PyPartMC-1.1.2.dist-info/WHEEL,sha256=3SeyPJ5-Us2Ct5GSftUVKtLSlm-bNefW4m5qd0GLzww,100
6
+ PyPartMC-1.1.2.dist-info/top_level.txt,sha256=PJxy22pTnxcBhqrb6r4AIL32rkxA61gzw7ohlzybgSM,19
7
+ PyPartMC-1.1.2.dist-info/RECORD,,
Binary file
@@ -1,7 +0,0 @@
1
- _PyPartMC.cp38-win_amd64.pyd,sha256=GHhPTFRsWV6EvBeizNCKqM1HeWrotlszSd4he4FMZqc,5068800
2
- PyPartMC/__init__.py,sha256=9V9XyPdk1V71BwkmgBlZFjr7zBvLpxB-pvtBL2mcQ-Y,1496
3
- PyPartMC-1.1.1.dist-info/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
4
- PyPartMC-1.1.1.dist-info/METADATA,sha256=bNF2I8SBAzGnNGWfhgH9CMFwCtpwG8udbC8R-TU74_4,21546
5
- PyPartMC-1.1.1.dist-info/WHEEL,sha256=3SeyPJ5-Us2Ct5GSftUVKtLSlm-bNefW4m5qd0GLzww,100
6
- PyPartMC-1.1.1.dist-info/top_level.txt,sha256=PJxy22pTnxcBhqrb6r4AIL32rkxA61gzw7ohlzybgSM,19
7
- PyPartMC-1.1.1.dist-info/RECORD,,