Thank you for your interest in contributing to Arbrynnica! This document provides instructions for setting up the development environment and contributing to the project.
We follow an iterative development process with a strong emphasis on unit tests to maintain high code quality. Continuous integration and automated testing are integral to our workflow, ensuring a stable and reliable codebase.
Before you begin, ensure you have the following installed:
-
Clone the repository:
git clone <repository-url> cd arbrynnica
-
Install Rye (if not already installed):
Follow the instructions on the Rye website.
-
Initialize the project with Rye:
rye init arbrynnica
-
Add project dependencies:
rye add pytest mypy ruff isort
-
Create and activate a virtual environment (handled by Rye):
rye sync
-
Install the following VS Code extensions:
- Python by Microsoft
- Pylance
- Ruff Formatter
- isort
-
Open the project in VS Code:
code .
-
Configure VS Code settings:
- Ensure your workspace settings (
.vscode/settings.json
) include the following configurations:
{ "python.pythonPath": ".venv/bin/python", // Adjust if necessary "python.formatting.provider": "none", "editor.formatOnSave": true, "[python]": { "editor.defaultFormatter": "charliermarsh.ruff" }, "editor.codeActionsOnSave": { "source.organizeImports": true }, "python.linting.mypyEnabled": true, "python.linting.enabled": true, "editor.rulers": [120] }
- Ensure your workspace settings (
-
Run tests using pytest:
rye run pytest
-
Check types with mypy:
rye run mypy src tests
-
Lint and format code with ruff and isort:
rye run ruff check src tests rye run isort .
-
Ensure all tests pass before committing and pushing your changes.
-
Create a new branch for your feature or bugfix:
git checkout -b feature/description
-
Make your changes. Ensure that your code adheres to the project's coding standards and passes all tests.
-
Commit your changes:
git add . git commit -m "Description of the changes"
-
Push your branch to GitHub:
git push origin feature/description
-
Create a pull request on GitHub. Provide a clear description of your changes and ensure all checks pass.
- Code style: Follow the Google Python Style Guide, with a line length limit of 120 characters.
- Documentation: Update documentation to reflect your changes, including docstrings and README.md if necessary.
- Reviews: Address any feedback during the code review process promptly.
By following these instructions, you'll help maintain a clean, efficient, and collaborative development environment. Thank you for contributing to Arbrynnica!