Skip to content

Commit 1e2752b

Browse files
authored
fix compatibility with PySDM 2.22 (terminal velocity attribute) (#239)
1 parent 96a89ee commit 1e2752b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.github/workflows/pylint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
pip install -e .[tests]
2525
pip install -r .binder/requirements.txt
2626
- run: pylint --unsafe-load-any-extension=y --disable=fixme,no-member,trailing-newlines,missing-module-docstring,missing-class-docstring,missing-function-docstring,unnecessary-pass $(git ls-files '*.py')
27-
- run: nbqa pylint --unsafe-load-any-extension=y --disable=fixme,no-member,duplicate-code,wrong-import-position,ungrouped-imports,trailing-whitespace,missing-function-docstring,missing-module-docstring $(git ls-files '*.ipynb')
27+
- run: nbqa pylint --unsafe-load-any-extension=y --disable=fixme,no-member,duplicate-code,wrong-import-position,ungrouped-imports,trailing-whitespace,missing-function-docstring,missing-module-docstring,unsubscriptable-object,invalid-name $(git ls-files '*.ipynb')

examples/terminal_velocities.ipynb

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"from PySDM.backends import CPU\n",
1212
"from PySDM.physics import si\n",
1313
"from PySDM.environments import Box\n",
14-
"from PySDM.dynamics import Displacement\n",
1514
"import numpy as np\n",
1615
"from matplotlib import pyplot\n",
1716
"from open_atmos_jupyter_utils import show_plot"
@@ -36,7 +35,7 @@
3635
"source": [
3736
"builder = Builder(n_sd=100, backend=CPU())\n",
3837
"builder.set_environment(Box(dt=np.nan, dv=np.nan))\n",
39-
"builder.add_dynamic(Displacement())\n",
38+
"builder.request_attribute('terminal velocity')\n",
4039
"particulator = builder.build(attributes={'n': np.ones_like(volumes), 'volume': volumes})"
4140
]
4241
},

0 commit comments

Comments
 (0)