Skip to content

jonathancychow/cycling-simulation

Repository files navigation

Binder Heroku

cycling.model

Model to simulate performance for cycling time trial

Deployment

The dashboard is hosted at Heroku and AWS.

The jupyter notebook is hosted at Binder, please see this link.

Getting started

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.

Create a development environment - develop

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.

Make sure tox is installed

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

Create develop environment

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

Start Jupyter Notebook

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.

Test

Static code analysis - lint

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

Unit and functional testing - test

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

About

Model to simulate performance for cycling time trial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •