This traffic scene renderer enables drawing top-view overviews of traffic constellations.
This drawings can be printed on screen using matplotlib and exported to images or tikz files that can be rendered with LaTeX to create vector-based drawings of the traffic scenes.
Installation can be done using pip. Simply run
pip install traffic-scene-renderer
Yes, you can help! Follow the steps below to contribute to this package:
- Download the git repository, e.g., using
git clone git@github.com:ErwindeGelder/TrafficSceneRenderer.git - Create a virtual environment, e.g., using
python -m venv venv - Activate the virtual environment (e.g., on Windows,
venv\Scripts\activate.bat) - Install the necessary libraries using
pip install -e .[dev] - The
mainbranch is protected, meaning that you cannot directly push changes to this branch. Therefore, if you want to make changes, do so in a seperate branch. For example, you can create a new branch usinggit checkout -b feature/my_awesome_new_feature. - Before pushing changes, ensure that the code adheres to the linting rules and that the tests are successful.
To run the linting and testing,
toxfirst needs to know where it can find the different Python versions that are supported. One way to do so is by making use ofpyenvor pyenv-win. Note that you only need to do this once for a single machine. - Run
tox run -e lint. If issues arise, fix them. You can do the linting commands manually using:ruff format . --check(remove the--checkflag to letruffdo the formatting)ruff check .mypy .
- Run
tox run -f test - Check if the tests covered everything using the coverage report in
/reports/coverage_html/index.html - Push changes to GitHub. If everything is OK and you want to merge your changes to the
mainbranch, create a pull request. Ideally, there is at least one reviewer who reviews the pull request before the merge.