Skip to content

Commit

Permalink
making run_all.py, running all .py files with demo in title, adding t…
Browse files Browse the repository at this point in the history
…o build_and_test.sh
  • Loading branch information
robinsteuteville committed Oct 12, 2023
1 parent 3ea2802 commit 178448c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
2 changes: 1 addition & 1 deletion build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
(cd rust/fastsim-cli/ && cargo test) && \
pip install -qe ".[dev]" && \
pytest -v python/fastsim/tests/
(cd python/fastsim/demos/ && python run_all_demos.py)
(cd python/fastsim/demos/ && python run_all.py)
8 changes: 8 additions & 0 deletions python/fastsim/demos/run_all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pathlib

p = pathlib.Path('run_all.py').parent

for file in p.glob('*demo*.py'):
with open(file) as f:
exec(f.read())
print('{} ran successfully'.format(f))
18 changes: 0 additions & 18 deletions python/fastsim/demos/run_all_demos.py

This file was deleted.

0 comments on commit 178448c

Please sign in to comment.