delvtech / agent0

Analysis & simulation repo for Delv
https://agent0.readthedocs.io/en/latest/
Apache License 2.0
52 stars 21 forks source link

add test for making sure examples work #1482

Closed dpaiton closed 5 months ago

dpaiton commented 5 months ago

This sets up a framework for testing examples in CI.

We don't always want to run the example files unaltered. As a couple of examples, they may have components that we do not expect to work in CI (like running a dashboard) or they may execute trades in a loop that has a large number of iterations. To allow us to test the files while skipping certain lines, this test uses Python's ast to parse the data and throw out any unwanted lines.

The test itself is an adaptation of a previous test that was used for example notebooks. The notebook portion could be reintegrated in order to test the tutorial.ipynb file.