This repository aims to help Python developers with fit files, transforming them and converting into dataframes.
Provides .FIT file examples gathered from Zwift trainings for a fast introduction to the repository.
To install the required packages, just run:
pip install -r requirements.txt
Probably in the future an option for Docker image is added.
- Place your fit files into the data>fit folder.
- Ensure that the data>json folder is empty, if this is your first execution.
- Run the conversion from .FIT to .JSON, which is incremental: It will only convert and add the new files.
cd src
python fit2json.py
- If needed, convert the .JSON files into a pandas Dataframe to work with it
cd src
python json2df.py
If the constant SAVE_DATAFRAME is True, the dataframe will be saved on the root folder of the project.
- Place yourself in the root folder of the repo
- Run the following command:
pytest
- If you want to gather the coverage, just run the following command after installing coverage:
coverage report