Model to simulate performance for cycling time trial
The dashboard is hosted at Heroku and AWS.
The jupyter notebook is hosted at Binder, please see this link.
The tox
package is used for development, test and build. Tox is a build tool for python. It allowes us to define a set of standards and configure a set of commands
to make sure the project is maintainable by others. See also:
For an introduction to python directory structures, see here.
This step makes sure we create an isolated python environment from the rest of the system. Current this python environment exists under the newly created directory ".venv" under the project root folder.
If your OS is MacOS
pip install tox
If your OS is Window, do the following instead as there is a bug still unresolved.
pip install tox==3.8.3
tox -e develop
You can verify the python versions by running the following if your OS is Mac
./.venv/bin/python -V
If your OS is Window
.\.venv\Scripts\python -V
Start the web server
tox -e serve
source .venv/bin/activate
jupyter notebook
If you want to quickly interact with a pre-built Jupyter Notebook, you can click here, I have set it all up in MyBinder.
A trim down notebook is set up for youngster to learn more about Python and simulation, see this link.
This step verifies the code style of the project and makes sure that common inconsistencies are avoided. You can easily check for common bugs and also improve the readability of the code.
tox -e lint
Testing verifies the functional requirements of the application. We use pytest but this is configurable by the developer in case a different framework is needed.
tox -e test