3.9 KiB
Contributing to FitTrackee
First off, thank you for your interest in contributing!
Report issues, ask for features
-
If a bug is a security vulnerability, please refer to security policy.
-
Ensure an issue was not already opened by searching on GitHub under Issues.
-
If not, open a new one with a descriptive title and provide a description.
Contributing Code
Project repository
The GitHub repository contains:
- source code (note that the repository also includes client build),
- translations,
- tests,
- documentation (source and build).
Continuous integration workflows run on Github Actions platform (on push and pull requests).
Translations
Translations files are located:
- on API side (emails):
fittrackee/emails/translations/
(implemented with Babel) - on client side:
fittrackee_client/src/locales
(implemented with Vue I18n)
Translations can be updated through Weblate.
How to install FitTrackee
see Installations instructions
Pull Requests
Note: Before starting, please open an issue to discuss implementation if the feature requires major changes or involves the addition of a new sport or language.
Please make your changes from the development branch (dev
).
-
Fork the repository (see GitHub instructions)
-
Implement your feature.
-
If your changes need a database migration:
- You can generate one after updating models with the following command:
$ make migrate-db
- For data migration, an empty migration can be created with this following command:
$ make revision MIGRATION_MESSAGE="<MIGRATION_MESSAGE>"
- Rename the migration, prefixing with the next number.
- To apply database changes:
$ make upgrade-db
- Check the downgrade migration.
- You can generate one after updating models with the following command:
-
Run checks (lint, type check and unit tests).
$ make check-all
There are some end-to-end tests, to run them (needs a running application):
$ make test-e2e
-
If needed, update translations (at least add English strings).
- On client side, update files in
fittrackee_client/src/locales
folder. - On API side (emails), to extract new strings into
messages.pot
:
To add new strings in translations files ($ make babel-extract
fittrackee/emails/translations/<LANG>/LC_MESSAGES/messages.po
):
After updating strings in$ make babel-update
messages.po
, compile the translations:$ make babel-compile
- On client side, update files in
-
If needed, add or update tests.
-
If needed, update documentation (no need to build documentation, it will be done when releasing).
-
If updated code contains client-side changes, you can generate javascript assets to check FitTrackee whithout starting client dev server:
$ make build-client
No need to commit these files, dist files will be generated before merging or when releasing.
-
Create your pull request to merge on
dev
branch. -
Ensure the pull requests description clearly describes the problem and solution. Include the relevant issue number if applicable.
-
Check that all tests have been successfully passed.
-
If needed, update your branch.
Thanks.