PyPartMC 1.4.2__cp38-cp38-macosx_13_0_x86_64.whl → 2.0.0rc3__cp38-cp38-macosx_13_0_x86_64.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.

Binary file
Binary file
Binary file
PyPartMC/__init__.py CHANGED
@@ -1,13 +1,18 @@
1
1
  """
2
- .. include::../README.md
2
+ .. include::../../README.md
3
3
  """
4
4
 
5
+ # pylint: disable=invalid-name
6
+ import importlib.metadata
7
+
5
8
  # pylint: disable=invalid-name,wrong-import-position
6
9
  import os
7
10
  from collections import namedtuple
8
11
  from contextlib import contextmanager
9
12
  from pathlib import Path
10
13
 
14
+ import nanobind
15
+
11
16
 
12
17
  # https://github.com/diegoferigo/cmake-build-extension/blob/master/src/cmake_build_extension/__init__.py
13
18
  @contextmanager
@@ -69,10 +74,13 @@ si = __generate_si()
69
74
  SI-prefix-aware unit multipliers, resulting in e.g.: `p = 1000 * si.hPa`
70
75
  notation. Note: no dimensional analysis is done! """
71
76
 
72
- with __build_extension_env():
73
- import _PyPartMC
74
- from _PyPartMC import *
75
- from _PyPartMC import __all__ as _PyPartMC_all # pylint: disable=no-name-in-module
76
- from _PyPartMC import __version__, __versions_of_build_time_dependencies__
77
+ from ._PyPartMC import * # pylint: disable=import-error
78
+ from ._PyPartMC import ( # pylint: disable=import-error
79
+ __versions_of_build_time_dependencies__,
80
+ )
81
+
82
+ __version__ = importlib.metadata.version(__package__)
77
83
 
78
- __all__ = tuple([*_PyPartMC_all, "si"])
84
+ # walkaround for MATLAB bindings
85
+ # pylint: disable=undefined-variable
86
+ setattr(nanobind, "nb_type_0", type(_PyPartMC.AeroData))
@@ -1,17 +1,18 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: PyPartMC
3
- Version: 1.4.2
3
+ Version: 2.0.0rc3
4
4
  Summary: Python interface to PartMC
5
- Author: PyPartMC team (see https://github.com/open-atmos/PyPartMC/graphs/contributors)
6
- Author-email: nriemer@illinois.edu
7
- License: GPL-3.0
8
- Project-URL: Tracker, https://github.com/open-atmos/PyPartMC/issues
5
+ Author-Email: "https://github.com/open-atmos/PyPartMC/graphs/contributors" <nriemer@illinois.edu>
6
+ License-Expression: GPL-3.0
9
7
  Project-URL: Documentation, https://open-atmos.github.io/PyPartMC
10
8
  Project-URL: Source, https://github.com/open-atmos/PyPartMC/
11
- Requires-Python: >=3.7
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
9
+ Project-URL: Tracker, https://github.com/open-atmos/PyPartMC/issues
10
+ Requires-Python: >=3.8
14
11
  Requires-Dist: numpy
12
+ Requires-Dist: nanobind
13
+ Provides-Extra: tests
14
+ Requires-Dist: pytest; extra == "tests"
15
+ Requires-Dist: pytest-order; extra == "tests"
15
16
  Provides-Extra: examples
16
17
  Requires-Dist: matplotlib!=3.10.0; extra == "examples"
17
18
  Requires-Dist: ipywidgets; extra == "examples"
@@ -20,12 +21,8 @@ Requires-Dist: open-atmos-jupyter-utils; extra == "examples"
20
21
  Requires-Dist: PySDM; extra == "examples"
21
22
  Requires-Dist: PyMieScatt; extra == "examples"
22
23
  Requires-Dist: SciPy; extra == "examples"
23
- Provides-Extra: tests
24
- Requires-Dist: pytest; extra == "tests"
25
- Requires-Dist: pytest-order; extra == "tests"
26
- Requires-Dist: fastcore!=1.5.8; extra == "tests"
27
- Requires-Dist: ghapi; extra == "tests"
28
- Requires-Dist: scipy; extra == "tests"
24
+ Requires-Dist: dustpy; platform_system != "Windows" and extra == "examples"
25
+ Description-Content-Type: text/markdown
29
26
 
30
27
  ![logo](https://raw.githubusercontent.com/wiki/open-atmos/PyPartMC/logo.svg)
31
28
 
@@ -52,12 +49,13 @@ If interested in contributing to PyPartMC, please have a look a the [notes for d
52
49
 
53
50
  [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
54
51
  [![Copyright](https://img.shields.io/static/v1?label=Copyright&color=249fe2&message=UIUC&)](https://atmos.illinois.edu/)
55
- [![tests+pypi](https://github.com/open-atmos/PyPartMC/actions/workflows/tests+pypi.yml/badge.svg)](https://github.com/open-atmos/PyPartMC/actions/workflows/tests+pypi.yml)
52
+ [![tests+pypi](https://github.com/open-atmos/PyPartMC/actions/workflows/buildwheels.yml/badge.svg)](https://github.com/open-atmos/PyPartMC/actions/workflows/buildwheels.yml)
56
53
  [![API docs](https://shields.mitmproxy.org/badge/docs-pdoc.dev-brightgreen.svg)](https://open-atmos.github.io/PyPartMC/)
57
54
  [![codecov](https://codecov.io/gh/open-atmos/PyPartMC/graph/badge.svg?token=27IK9ZIQXE)](https://codecov.io/gh/open-atmos/PyPartMC)
58
55
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7662635.svg)](https://doi.org/10.5281/zenodo.7662635)
59
56
  [![PyPI version](https://badge.fury.io/py/PyPartMC.svg)](https://pypi.org/p/PyPartMC)
60
57
  [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
58
+ [![pyOpenSci Peer-Reviewed](https://pyopensci.org/badges/peer-reviewed.svg)](https://github.com/pyOpenSci/software-review/issues/179)
61
59
 
62
60
  [![Python 3](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3)](https://www.python.org/)
63
61
  [![Linux OK](https://img.shields.io/static/v1?label=Linux&logo=Linux&color=yellow&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Linux)
@@ -119,7 +117,7 @@ pip install PyPartMC[examples]
119
117
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/open-atmos/PyPartMC/blob/main/examples/cloud_parcel.ipynb)
120
118
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/open-atmos/PyPartMC.git/main?urlpath=lab/tree/examples/cloud_parcel.ipynb)
121
119
  [![ARM JupyterHub](https://img.shields.io/static/v1?label=launch%20in&logo=jupyter&color=lightblue&message=ARM+JupyterHub)](https://jupyterhub.arm.gov/hub/user-redirect/git-pull?repo=https%3A//github.com/open-atmos/PyPartMC&branch=main&urlPath=)
122
- - Coagulation Model Intercomparison with PySDM, Droplets.jl:
120
+ - Coagulation model intercomparison for additive (Golovin) kernel with: PyPartMC, [PySDM](https://open-atmos.github.io/PySDM), [Droplets.jl](https://github.com/emmacware/droplets.jl) and [dustpy](https://stammler.github.io/dustpy/):
123
121
  [![View notebook](https://img.shields.io/static/v1?label=render%20on&logo=github&color=87ce3e&message=GitHub)](https://github.com/open-atmos//PyPartMC/blob/main/examples/additive_coag_comparison.ipynb)
124
122
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/open-atmos/PyPartMC/blob/main/examples/additive_coag_comparison.ipynb)
125
123
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/open-atmos/PyPartMC.git/main?urlpath=lab/tree/examples/additive_coag_comparison.ipynb)
@@ -171,9 +169,7 @@ aero_dist = ppmc.AeroDist(
171
169
  "num_conc": 3200 / si.cm**3,
172
170
  "geom_mean_diam": 8.64 * si.nm,
173
171
  "log10_geom_std_dev": 0.28,
174
- }
175
- },
176
- {
172
+ },
177
173
  "diesel": {
178
174
  "mass_frac": [{"OC": [0.3]}, {"BC": [0.7]}],
179
175
  "diam_type": "geometric",
@@ -215,9 +211,7 @@ aero_dist = ppmc.AeroDist(aero_data, (
215
211
  "num_conc" => 3200 / si.cm^3,
216
212
  "geom_mean_diam" => 8.64 * si.nm,
217
213
  "log10_geom_std_dev" => .28,
218
- )
219
- ),
220
- Dict(
214
+ ),
221
215
  "diesel" => Dict(
222
216
  "mass_frac" => (Dict("OC" => (.3,)), Dict("BC" => (.7,))),
223
217
  "diam_type" => "geometric",
@@ -226,7 +220,7 @@ aero_dist = ppmc.AeroDist(aero_data, (
226
220
  "geom_mean_diam" => 50 * si.nm,
227
221
  "log10_geom_std_dev" => .24,
228
222
  )
229
- )
223
+ ),
230
224
  ))
231
225
 
232
226
  n_part = 100
@@ -240,7 +234,6 @@ print(aero_state.masses()'aero_state.num_concs, "# kg/m3")
240
234
  notes (see the [PyPartMC Matlab CI workflow](https://github.com/open-atmos/PyPartMC/blob/main/.github/workflows/readme_listings.yml) for an example on how to achieve it on Ubuntu 20):
241
235
  - Matlab ships with convenience copies of C, C++ and Fortran runtime libraries which are `dlopened()` by default; one way to make PyPartMC OK with it is to [pip-]install by compiling from source using the very same version of GCC that Matlab borrowed these libraries from (e.g., [GCC 9 for Matlab R2022a, etc](https://www.mathworks.com/support/requirements/supported-compilers-linux.html));
242
236
  - Matlab needs to [use the same Python interpretter/venv](https://www.mathworks.com/support/requirements/python-compatibility.html) as the pip invocation used to install PyPartMC;
243
- - a single-line `pybind11_builtins.py` file with just `pybind11_type=type` inside needs to be placed within Matlab's `PYTHONPATH` to sort out a [Matlab-pybind11 incompatibility](https://github.com/pybind/pybind11/issues/3945).
244
237
 
245
238
  ````Matlab
246
239
  ppmc = py.importlib.import_module('PyPartMC');
@@ -260,9 +253,7 @@ aero_dist = ppmc.AeroDist(aero_data, py.tuple({ ...
260
253
  "num_conc", 3200 / si.cm^3, ...
261
254
  "geom_mean_diam", 8.64 * si.nm, ...
262
255
  "log10_geom_std_dev", .28 ...
263
- )) ...
264
- )), ...
265
- py.dict(pyargs( ...
256
+ )), ...
266
257
  "diesel", py.dict(pyargs( ...
267
258
  "mass_frac", py.tuple({ ...
268
259
  py.dict(pyargs("OC", py.tuple({.3}))), ...
@@ -0,0 +1,9 @@
1
+ pypartmc-2.0.0rc3.dist-info/RECORD,,
2
+ pypartmc-2.0.0rc3.dist-info/WHEEL,sha256=QYFdNGzXwuBjBNCy_HhT_OkFdKSB_RjbuJI9OL8ME3Q,113
3
+ pypartmc-2.0.0rc3.dist-info/METADATA,sha256=4aUTawjPsb6pM4Ri_j8vmVSsCzx-O8mdi8jichPcoSs,26630
4
+ pypartmc-2.0.0rc3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
5
+ PyPartMC/__init__.py,sha256=e1ngb8Sodfqneb__Vmf_K5eIOoOY11gvrSHmlIZbruM,2349
6
+ PyPartMC/_PyPartMC.cpython-38-darwin.so,sha256=tM4uERBnCARVwKhlu01YrEU-7jsWYcesQv1FmEtFh9k,8484928
7
+ PyPartMC/.dylibs/libgfortran.5.dylib,sha256=uZj18mk7PGjzH0FQclHZLMRAcsG4TETIRZt_8CGlEpg,3988672
8
+ PyPartMC/.dylibs/libquadmath.0.dylib,sha256=19PcPx5n69p9h9xP2dOhLmhRI2hzljSQcJBXLyFC2go,379200
9
+ PyPartMC/.dylibs/libgcc_s.1.1.dylib,sha256=mW61tfzTB6d8xKZxf5SR2V03z7kbDW950dagh_mLK_U,266112
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: scikit-build-core 0.11.5
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp38-cp38-macosx_13_0_x86_64
5
5
 
@@ -1,7 +0,0 @@
1
- _PyPartMC.cpython-38-darwin.so,sha256=JqtXLvBHQaROa8wRDVQpc6NOF4pl0Cl48WBG09Cd7rY,8563088
2
- PyPartMC/__init__.py,sha256=VAqwePpJZEFJ7YieM1GbUvfluRhUyWXciP89pY9xIH4,2217
3
- PyPartMC-1.4.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
4
- PyPartMC-1.4.2.dist-info/METADATA,sha256=Pp5TaR3vg27KAIgJ-EMQlDx1i4D0cqgo9BqYeZiGWsI,26665
5
- PyPartMC-1.4.2.dist-info/WHEEL,sha256=OzbVqQDGgCN-oj-FNGUZi3Dga71LFiZj1IqKmk_Y6R4,108
6
- PyPartMC-1.4.2.dist-info/top_level.txt,sha256=PJxy22pTnxcBhqrb6r4AIL32rkxA61gzw7ohlzybgSM,19
7
- PyPartMC-1.4.2.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- PyPartMC
2
- _PyPartMC