flatland-association / flatland-rl

The Flatland Framework is a multi-purpose environment to tackle problems around resilient resource allocation under uncertainty. It is designed to be a flexible and method agnostic to solve a wide range of problems in the field of operations research and reinforcement learning.
https://www.flatland-association.org/
MIT License
20 stars 7 forks source link

Enable notebooks in checks.yml #64

Closed hagrid67 closed 9 months ago

hagrid67 commented 9 months ago

Objectives

Let's enable the notebooks in checks.yml. If there are problem notebooks, these can be removed from tox.ini which any of us can change.

I have now made this change using a GitHub personal access token, "classic" style, with workflow permission.

Todos comment out / remove if: ${{ false }} in checks.yml notebooks section.

Minimal testing requirements none - this change will enable some notebooks to be run as a test.

Additional context This change forms part of #39 - Include running notebooks in CI.

run-all-notebooks.py did once run a list of working notebooks, by forking / execing a separate process running nbconvert for each notebook. It used a file notebook-list to list which notebooks were eligible for running. The intention was at least partly to check for changes which broke the notebooks; however the mechanism was removed from the build / CI some time ago (back in gitlab days). The approach was ad hoc and obsolete and we now have the pytest plugin nbmake.

I've added the list of notebooks to tox.ini testenv:notebooks and it works locally with tox -e notebooks

The notebook test-service.ipynb needs redis -- this runs an evaluator process in the background and a client in the foreground. It's a bit contrived / "heath robinson" but I gather @manuschn Manuel would like us to do some evaluator work so it may be worthwhile, if this is simple to enable on github. If not then remove this notebook from the list in tox.ini.

hagrid67 commented 9 months ago

I've commented out the if false in checks.yml so that tox -e notebooks now runs. I've fixed most of the notebooks listed so the task completes successfully. The notebook test_service.ipynb needs a redis server - raising a separate issue for this.