PySDM-examples 2.97__py3-none-any.whl → 2.99__py3-none-any.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.
@@ -4,6 +4,5 @@ reusable commons for examples
4
4
 
5
5
  from .basic_simulation import BasicSimulation
6
6
  from .dummy_controller import DummyController
7
- from .notebook_vars import notebook_vars
8
7
  from .progbar_controller import ProgBarController
9
8
  from .read_vtk_1d import readVTK_1d
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: PySDM-examples
3
- Version: 2.97
3
+ Version: 2.99
4
4
  Summary: PySDM usage examples reproducing results from literature and depicting how to use PySDM from Python Jupyter notebooks
5
5
  Home-page: https://github.com/open-atmos/PySDM
6
6
  Author: https://github.com/open-atmos/PySDM/graphs/contributors
@@ -142,16 +142,15 @@ PySDM_examples/deJong_Mackay_et_al_2023/simulation_ss.py,sha256=fYE5LRPbt5qIYC3N
142
142
  PySDM_examples/seeding/__init__.py,sha256=RfACRu9O8zoWLR0HV6aUdikNlphpuAhY2QznMZUu72w,220
143
143
  PySDM_examples/seeding/settings.py,sha256=_dD_0YrWsXkqWpTuSHXDTUE9xktSd9196h6bpsLDNC4,2217
144
144
  PySDM_examples/seeding/simulation.py,sha256=kx-kUj0yJMc6zizQsu_K_E4_0-UQqPv1XSkx6AyF9tc,4088
145
- PySDM_examples/utils/__init__.py,sha256=MayUnfhdnjWwc5Ept-yYfCS_tuSR8yqe-RdBl8FO3Xk,258
145
+ PySDM_examples/utils/__init__.py,sha256=kf3zKLHnQkH5inbjfzaapfDy5ACDeU8efmbJtRVJaHo,217
146
146
  PySDM_examples/utils/basic_simulation.py,sha256=4EdgD0p8EKNNcqYYVSlGm1MG2ac7_6heQdwS-kp-Tmw,698
147
147
  PySDM_examples/utils/dummy_controller.py,sha256=f1AjVNXPnDhhD15GkBFtJthDf7jZivDrppj79guYc_w,741
148
- PySDM_examples/utils/notebook_vars.py,sha256=HY9dsTW8WkPNM4LbG4hKfEhIK9iP_u8GTNzIJCwn8_g,1339
149
148
  PySDM_examples/utils/progbar_controller.py,sha256=IXk7rkXUOBKP7EQe6zLHUpnCPwtE2LuEeho5lxdsewA,470
150
149
  PySDM_examples/utils/read_vtk_1d.py,sha256=7_3sagEbX_FxqFuGkFWdwQapd1-9echFghU8TSNvGuw,966
151
150
  PySDM_examples/utils/widgets/__init__.py,sha256=U67WZ2YDcXSocMraI7pzcMxCfcxzXNqehDzoG6ogsh4,519
152
151
  PySDM_examples/utils/widgets/freezer.py,sha256=tFlZWShXUzA2X0cxgeE44N1g9kD33q3KQWZBqkgBP0A,407
153
152
  PySDM_examples/utils/widgets/progbar_updater.py,sha256=3uhG32QkAiSM3dTV7DoROJl7fAUNA6ZsJEIKSg3tdmk,267
154
- PySDM_examples-2.97.dist-info/METADATA,sha256=b6WJZmLASHAELIqLs-YRaD3PXGdkngC8vwh6JDJaPTo,12289
155
- PySDM_examples-2.97.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
156
- PySDM_examples-2.97.dist-info/top_level.txt,sha256=axw2inuuYKPWkQhzBYtkZJTPDlo5LrpGLOA0iSAf9v0,15
157
- PySDM_examples-2.97.dist-info/RECORD,,
153
+ PySDM_examples-2.99.dist-info/METADATA,sha256=B3x1E-wp-0iRAbkJSOk-gxKqE4gJTi_30KqxLlZnBWg,12289
154
+ PySDM_examples-2.99.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
155
+ PySDM_examples-2.99.dist-info/top_level.txt,sha256=axw2inuuYKPWkQhzBYtkZJTPDlo5LrpGLOA0iSAf9v0,15
156
+ PySDM_examples-2.99.dist-info/RECORD,,
@@ -1,31 +0,0 @@
1
- """ helper routines for use in smoke tests """
2
-
3
- from pathlib import Path
4
-
5
- import nbformat
6
-
7
-
8
- def notebook_vars(file: Path, plot: bool):
9
- """Executes the code from all cells of the Jupyter notebook `file` and
10
- returns a dictionary with the notebook variables. If the `plot` argument
11
- is set to `True`, any code line within the notebook starting with `show_plot(`
12
- (see [open_atmos_jupyter_utils docs](https://pypi.org/p/open_atmos_jupyter_utils))
13
- is replaced with `pyplot.show() #`, otherwise it is replaced with `pyplot.gca().clear() #`
14
- to match the smoke-test conventions."""
15
- notebook = nbformat.read(file, nbformat.NO_CONVERT)
16
- context = {}
17
- for cell in notebook.cells:
18
- if cell.cell_type != "markdown":
19
- lines = cell.source.splitlines()
20
- for i, line in enumerate(lines):
21
- if line.strip().startswith("!"):
22
- lines[i] = line.replace("!", "pass #")
23
- if line.strip().startswith("show_plot("):
24
- lines[i] = line.replace(
25
- "show_plot(",
26
- "from matplotlib import pyplot; "
27
- + ("pyplot.show() #" if plot else "pyplot.gca().clear() #"),
28
- )
29
-
30
- exec("\n".join(lines), context) # pylint: disable=exec-used
31
- return context