Skip to content

Commit

Permalink
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -44,5 +44,3 @@ script:
- PYTEST="python$PY_SFX -m pytest $PY_FLAGS -p no:unraisableexception"
- NUMBA_DISABLE_JIT=1 $PYTEST PySDM_tests/unit_tests --cov-report term --cov=PySDM # TODO #461
- $PYTEST
# execute Python lines from README.md # TODO #463
- awk < README.md 'BEGIN {cmt=1; swp=0;} {swp=(substr($0,1,3)=="```"); if (swp && !cmt) {cmt=1; swp=0} if (cmt) print("#" $0); else print $0; if (swp && cmt) {cmt=0; swp=0}}' | python$PY_SFX $PY_FLAGS
9 changes: 9 additions & 0 deletions PySDM_tests/devops_tests/test_readme_code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import exdown
import pathlib


test_readme = exdown.pytests(
pathlib.Path(__file__).parent.parent.parent.joinpath("README.md").absolute(),
syntax_filter="Python",
encoding='utf8'
)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -146,6 +146,7 @@ The key element of the PySDM interface is the [``Core``](https://github.com/atmo
class which instances are used to manage the system state and control the simulation.
Instantiation of the ``Core`` class is handled by the ``Builder``
as exemplified below:
<!--exdown-cont-->
```Python
from PySDM import Builder
from PySDM.environments import Box
@@ -178,6 +179,7 @@ The ``run(nt)`` method advances the simulation by ``nt`` timesteps.
In the listing below, its usage is interleaved with plotting logic
which displays a histogram of particle mass distribution
at selected timesteps:
<!--exdown-cont-->
```Python
from PySDM.physics.constants import rho_w
from matplotlib import pyplot
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
matplotlib>=3.2.2
ghapi
pytest
exdown>=0.8.8

# note: if cloning both PySDM and PySDM examples, consider "pip install -e"
git+git://github.com/atmos-cloud-sim-uj/PySDM-examples

0 comments on commit 78cada1

Please sign in to comment.