Contributing¶
We welcome contributions to persistent_ssh_agent! Here’s how you can help:
Setting Up Development Environment¶
Clone the repository:
git clone https://github.com/loonghao/persistent_ssh_agent.git cd persistent_ssh_agent
Create a virtual environment and install development dependencies:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e ".[dev]"
Install pre-commit hooks:
pre-commit install
Development Workflow¶
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
Make your changes and write tests for them.
Run the tests to ensure everything works:
uvx nox -s pytest
Check code style:
uvx nox -s lint
Build and check the documentation:
uvx nox -s docs-build
Commit your changes with a descriptive message:
git commit -m "Add feature: your feature description"
Push your branch and create a pull request:
git push origin feature/your-feature-name
Pull Request Guidelines¶
Include tests for any new features or bug fixes
Update documentation if necessary
Follow the code style of the project
Make sure all tests pass before submitting
Keep pull requests focused on a single topic
Reference any relevant issues in your PR description
Code Style¶
This project uses:
isort for import sorting
ruff for linting and formatting
Type hints for all function signatures
Testing¶
Write unit tests for all new functionality
Run the test suite with
uvx nox -s pytest
Aim for high test coverage for all new code
Documentation¶
Update documentation for any new features or changes
Build and check documentation with
uvx nox -s docs-build
Use clear, concise language in docstrings and documentation