Skip to content
Snippets Groups Projects
Commit 7160aec7 authored by u214892's avatar u214892
Browse files

#97 tox-conda #94 use miniconda instead of anaconda

parent 7c740e61
No related branches found
No related tags found
No related merge requests found
......@@ -71,8 +71,6 @@ target/
# Jupyter Notebook
.ipynb_checkpoints
# Jupyter Notebooks converted to python
notebooks/*.py
# PyCharm
.idea/
......
File moved
......@@ -17,3 +17,4 @@ importlib-metadata>=0.17
importlib-resources>=1.0.1
six>=1.12.0
attrs
ushlex
......@@ -28,6 +28,14 @@ def get_all_images_files(directory='./images/'):
return ret
def get_all_notebook_files(directory='./notebooks/'):
ret = []
for f in os.listdir(directory):
if os.path.isfile(os.path.join(directory, f)):
ret.append(directory + f)
return ret
# Gather requirements from requirements_dev.txt
install_reqs = []
requirements_path = 'requirements_dev.txt'
......@@ -63,7 +71,9 @@ setup(
keywords='flatland',
name='flatland-rl',
packages=find_packages('.'),
data_files=[('svg', get_all_svg_files()), ('images', get_all_images_files())],
data_files=[('svg', get_all_svg_files()),
('images', get_all_images_files()),
('notebooks', get_all_notebook_files())],
setup_requires=setup_requirements,
test_suite='tests',
tests_require=test_requirements,
......
......@@ -10,7 +10,7 @@ from flatland.envs.observations import GlobalObsForRailEnv, TreeObsForRailEnv
from flatland.envs.predictions import ShortestPathPredictorForRailEnv
from flatland.envs.rail_env import RailEnv, RailEnvActions
from flatland.utils.rendertools import RenderTool
from tests.simple_rail import make_simple_rail
from flatland.utils.simple_rail import make_simple_rail
"""Tests for `flatland` package."""
......
......@@ -10,7 +10,7 @@ from flatland.envs.observations import TreeObsForRailEnv
from flatland.envs.predictions import DummyPredictorForRailEnv, ShortestPathPredictorForRailEnv
from flatland.envs.rail_env import RailEnv
from flatland.utils.rendertools import RenderTool
from tests.simple_rail import make_simple_rail
from flatland.utils.simple_rail import make_simple_rail
"""Test predictions for `flatland` package."""
......
......@@ -154,9 +154,7 @@ commands =
jupyter nbextension enable --py --sys-prefix widgetsnbextension
jupyter nbextension install --py --sys-prefix jpy_canvas
jupyter nbextension enable --py --sys-prefix jpy_canvas
; https://stackoverflow.com/questions/35545402/how-to-run-an-ipynb-jupyter-notebook-from-terminal/35545463
sh -c 'ls {toxinidir}/notebooks/*.ipynb | xargs -n 1 jupyter nbconvert --to python'
sh -c 'ls {toxinidir}/notebooks/*.py | xargs -I{} -n 1 sh -c "echo -e \"\n====== Running {} ========\n\"; ipython {}"'
python notebooks/run_all_notebooks.py
[testenv:start_jupyter]
basepython = python
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment