Fork the github repo, create a new branch from dev, and submit your pull request!
Make sure to run the tests before submitting the pull request (make test
in the build directory,
you may also run make docker_test
for important contributions), and have a wee look at what follows.
If you want to build navitia, please refer to the installation documentation.
You can also check the automated build script which is meant to be a step by step tutorial for compiling and using navitia with ubuntu 16.04.
At the root of the repository, several directories can be found:
- source: contains the navitia source code (c++ and python)
- third_party: third party developped modules
- documentation: all the navitia documentation
- (debug|release): by convention, the build repositories
- Gcc (or clang) as the C++ compiler (g++)
- CMake for the build system
- Python for the api
The project provides a few git hooks that you should use to prevent any issue. The hooks are managed by pre-commit that you need to install. Then, install the hooks with:
pre-commit install
Python source code in this project is formatted using Black
You should enable the pre-commit git hook to make sure it's being run before commiting your changes, it's
also the easiest way to run Black.
Otherwise, to only update the files that you've changed, simply run:
pre-commit run black
If you want to run it on the whole project, you can add --all
:
pre-commit run black --all
You can also install Black traditionally But bare in mind, it requires python 3.6+ to run.
Our pre-commit hooks are running Clang-format to format our c++ codebase. You'll need version 6.0 in order to pass our CI.
sudo apt install clang-format-6.0
In case you might want to run Clang-format on the entire codebase, you can do:
pre-commit run clang-format-6.0 --all