From eb8e1c3e02dc0200201e487f6a250332051b61a8 Mon Sep 17 00:00:00 2001 From: Erwin de Gelder Date: Thu, 27 Mar 2025 15:37:34 +0100 Subject: [PATCH 1/2] Add how one can contribute to development. --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index baaa1c8..71e8cd3 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,32 @@ This drawings can be printed on screen using `matplotlib` and exported to images ## Installation +Installation can be done using `pip`. Simply run + pip install traffic-scene-renderer ## Usage -# Development +## Development + +Yes, you can help! Follow the steps below to contribute to this package: + +1. Download the git repository, e.g., using `git clone git@github.com:ErwindeGelder/TrafficSceneRenderer.git` +2. Create a virtual environment, e.g., using `python -m venv venv` +3. Install the necessary libraries using `pip install -e .[dev]` +4. The `main` branch 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 using `git checkout -b feature/my_awesome_new_feature`. +5. Before pushing changes, ensure that the code adheres to the linting rules and that the tests are successful. + To run the linting and testing, `tox` first needs to know where it can find the different Python versions that are supported. + One way to do so is by making use of `pyenv` or [pyenv-win](https://github.com/pyenv-win/pyenv-win). + Note that you only need to do this once for a single machine. +6. Run `tox run -e lint`. If issues arise, fix them. You can do the linting commands manually using: + 1. `ruff format . --check` (remove the `--check` flag to let `ruff` do the formatting) + 2. `ruff check .` + 3. `mypy .` +7. Run `tox run -f test` +8. Check if the tests covered everything using the coverage report in `/reports/coverage_html/index.html` +9. Push changes to GitHub. If everything is OK and you want to merge your changes to the `main` branch, create a pull request. + Ideally, there is at least one reviewer who reviews the pull request before the merge. From c32d8b3ab81293ac2de546be0b8a59d74408792a Mon Sep 17 00:00:00 2001 From: ErwindeGelder <56429838+ErwindeGelder@users.noreply.github.com> Date: Fri, 18 Apr 2025 15:30:20 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 71e8cd3..9fe8d9d 100644 --- a/README.md +++ b/README.md @@ -18,19 +18,20 @@ Yes, you can help! Follow the steps below to contribute to this package: 1. Download the git repository, e.g., using `git clone git@github.com:ErwindeGelder/TrafficSceneRenderer.git` 2. Create a virtual environment, e.g., using `python -m venv venv` -3. Install the necessary libraries using `pip install -e .[dev]` -4. The `main` branch is protected, meaning that you cannot directly push changes to this branch. +3. Activate the virtual environment (e.g., on Windows, `venv\Scripts\activate.bat`) +4. Install the necessary libraries using `pip install -e .[dev]` +5. The `main` branch 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 using `git checkout -b feature/my_awesome_new_feature`. -5. Before pushing changes, ensure that the code adheres to the linting rules and that the tests are successful. +6. Before pushing changes, ensure that the code adheres to the linting rules and that the tests are successful. To run the linting and testing, `tox` first needs to know where it can find the different Python versions that are supported. One way to do so is by making use of `pyenv` or [pyenv-win](https://github.com/pyenv-win/pyenv-win). Note that you only need to do this once for a single machine. -6. Run `tox run -e lint`. If issues arise, fix them. You can do the linting commands manually using: +7. Run `tox run -e lint`. If issues arise, fix them. You can do the linting commands manually using: 1. `ruff format . --check` (remove the `--check` flag to let `ruff` do the formatting) 2. `ruff check .` 3. `mypy .` -7. Run `tox run -f test` -8. Check if the tests covered everything using the coverage report in `/reports/coverage_html/index.html` -9. Push changes to GitHub. If everything is OK and you want to merge your changes to the `main` branch, create a pull request. +8. Run `tox run -f test` +9. Check if the tests covered everything using the coverage report in `/reports/coverage_html/index.html` +10. Push changes to GitHub. If everything is OK and you want to merge your changes to the `main` branch, create a pull request. Ideally, there is at least one reviewer who reviews the pull request before the merge.