Skip to content

Latest commit

 

History

History
162 lines (114 loc) · 3.38 KB

File metadata and controls

162 lines (114 loc) · 3.38 KB

🤝 Contributing

Thank you for your interest in contributing to RME Toolkit! This guide will walk you through setting up your environment, maintaining code quality, testing, and submitting changes.

1. Set Up Your Development Environment

Install dependencies using uv, our package and virtual environment manager.

Show setup instructions
# Clone the repository
git clone https://github.com/reverseame/rme-toolkit.git
cd rme-toolkit
# Create and activate virtual environment
uv venv
source .venv/bin/activate    # On Windows: .\venv\Scripts\activate
# Install dependencies from the global pyproject.toml
# Create and activate virtual environment
uv pip install -r requirements.txt

[!NOTE] If you don't have a requirements.txt yet, you can generate it from your pyproject.toml using:

uv pip compile pyproject.toml > requirements.txt
# Install pre-commit hooks
pre-commit install

[!NOTE] if uv is not installed, you can install it with: curl -LsSf https://astral.sh/uv/install.sh | sh

2. Create a Feature or Fix Branch

Work on a dedicated branch for your changes, following naming conventions.

Show branch naming guide
# Use one of the following formats
git checkout -b feat/your-feature-name
git checkout -b fix/short-bug-description

3. Format and Lint Your Code

We use ruff to ensure code quality and consistency.

Show lint & format commands
# Check for lint issues
ruff check .
# Auto-format the code
ruff format .
# (Optional) Run pre-commit hooks manually
pre-commit run --all-files

4. Run Tests

We use pytest with pytest-cov. Since the code is in a src/ layout, you must set PYTHONPATH=src.

Show test commands
# Run the full test suite with coverage
PYTHONPATH=src pytest --cov=src tests
# Or test a specific package
PYTHONPATH=src pytest packages/my_package/tests

5. Use Conventional Commits

All commit messages must follow the conventional commit format via Commitizen.

Show commit and changelog commands
# Create a commit with Commitizen
cz commit
# (Optional) Bump version and generate changelog
cz bump --changelog

6. Add a New Package

All packages live under packages/ and use the root environment.

Show package creation steps
# Create a new package folder
mkdir -p packages/my_package
# (Optional) Add tests folder
mkdir -p packages/my_package/tests
# Initialize pyproject.toml using uv
cd packages
uv init --package my_new_package
# Run it
uv run my-new-package

Before Submitting

Make sure your code meets the following checklist:

PR checklist
  • Code is linted (ruff check .) and formatted (ruff format .)
  • All tests pass (PYTHONPATH=src pytest)
  • Commits follow conventional commit standards (cz commit)
  • Version bumped and changelog updated (if needed)
  • PR targets the dev branch