Contributing#
This simple guide will walk you through the process of contributing to RouteE Powertrain.
Identifying an Issue#
Go to the “Issues” tab in the repository.
Look for issues with labels such as “good first issue” if you’re new to the project.
Read the issue description and any associated comments to make sure you understand the problem and its requirements.
Choose an issue that aligns with your skills and interests.
Letting Others Know You’re Working on the Issue#
Leave a comment on the issue, stating that you’d like to work on it. This helps prevent duplication of effort and lets us know someone is addressing the problem.
Wait for a response from the maintainers or the issue creator. They may provide additional information or guidance, or assign the issue to you.
Forking the Repository#
Navigate to the main RouteE Powertrain page on GitHub.
Click on the “Fork” button in the upper right corner. This creates a copy of the repository under your GitHub account.
Clone your forked repository to your local machine by clicking the “Code” button and copying the URL. Then, open your terminal or command prompt and run git clone [URL], replacing [URL] with the copied URL.
Installing the development environment#
Using Pixi (recommended)#
Install Pixi if you haven't already.
Run
pixi installfrom the project root. This will create an environment with Python, all dev dependencies, and tooling (ruff, dprint, mypy, etc.).Set up the pre-commit hooks by running
pixi run precommit-install. This ensures formatting, linting, type checking, and tests run automatically before each commit.You can now run tasks with
pixi run <task>:pixi run check— auto-fix formatting + lint, then run type checking and testspixi run ci— same checks without auto-fix (mirrors CI)pixi run test— run tests only
Using pip#
Create and activate a new virtual environment with the tool of your choice (e.g. venv, conda, pipenv, etc.).
Install the package and dependencies by running
pip install -e ".[dev]". This will install the package in editable mode, so you can make changes to the code and see them reflected in your environment.Set up the pre-commit hooks by running
pre-commit install.
Opening a Pull Request#
Create a new branch in your local repository by running git checkout -b [branch-name], replacing [branch-name] with a descriptive name for your changes.
Make changes to the code, addressing the issue you’ve chosen to work on.
Commit your changes with a meaningful commit message. Use git add [file] to stage changes, and git commit -m “[commit-message]” to commit them.
Push your changes to your forked repository using git push origin [branch-name].
Go to your forked repository on GitHub and click on the “Pull requests” tab.
Click on the “New Pull Request” button, and select your branch in the “compare” dropdown menu.
Review your changes and click “Create Pull Request”. Add a descriptive title and a detailed explanation of the changes you made.
Submit your pull request. The project maintainers will review your changes and provide feedback or merge your changes into the main repository.
Thanks for taking the time to contribute to RouteE Powertrain!