How to contribute¶
You are invited to contribute to the L5Kit with your examples and improvements. These are peer-reviewed by the development team to maintain quality and reproducibility.
Note: All commands below must be run from the
l5kit folder (the one with the
You will be required to sign a contributor agreement license upon a pull request (PR).
Installing l5kit as a developer¶
pip install -r requirements.txt
to install all developer dependencies along with l5kit in editable (-e) mode.
Code Sanity checks¶
Before starting a PR, it is highly recommended to also install the git pre-commit hooks, run:
This will run all required code checks before each commit and it ensures your builds won’t fail in CI.
If, on the other hand, you want to run individual checks, please refer to the instructions below.
To run the tests, run:
To generate a test coverage report, run:
# Outputs to std out pytest --cov # Output to HTML files within the coverage_report_html folder pytest --cov --cov-report html
To run type checking with mypy, run:
Code style, linting and formatting¶
You can check against those by running:
Or, if you want to apply those formatters:
# Sort imports automatically. isort l5kit --apply --recursive # Check linting errors. flake8 l5kit
Our docstrings are in Google docstring format.
Creating a distribution¶
# Clean up from potential earlier runs rm -rf dist rm -rf build python3 setup.py sdist bdist_wheel
You can now find the distribution files (both tar.gz and wheel) in the
We look forward to your contributions!