Thank you for your interest in contributing to PyFastL2LiR! This document provides guidelines and instructions for contributing to the project.
-
Fork and clone the repository
git clone https://github.com/<USERNAME>/PyFastL2LiR.git cd PyFastL2LiR
-
Create a virtual environment and install dependencies
uv sync
This will install the package in editable mode along with all development dependencies.
-
Create a new branch for your changes
git checkout -b feature/your-feature-name
Use descriptive branch names:
feature/for new featuresfix/for bug fixesdocs/for documentation changesrefactor/for code refactoring
-
Make your changes
- Write clear, concise commit messages
- Keep commits focused and atomic
- Update documentation as needed
We use pytest for testing. All tests should pass before submitting a pull request.
Run all tests:
pytestRun tests with coverage:
pytest --cov=fastl2lir --cov-report=term-missingRun specific tests:
pytest tests/test_specific_module.py- Place tests in the
tests/directory - Name test files with the
test_prefix - Name test functions with the
test_prefix - Aim for high test coverage, especially for new features
- Include both unit tests and integration tests where appropriate
We use Ruff for linting and code formatting.
Check for linting issues:
ruff check .Automatically fix issues:
ruff check --fix .Format code:
ruff format .Make sure your code passes both linting and formatting checks:
ruff check . && ruff format --check .-
Ensure all tests pass
pytest
-
Ensure code passes linting
ruff check . ruff format --check .
-
Commit your changes
git add . git commit -m "[tag] Brief description of your changes"
Write clear commit messages following these guidelines:
- Use the imperative mood ("Add feature" not "Added feature")
- Provide additional details in the body if needed
-
Push to your fork
git push origin feature/your-feature-name
-
Create a Pull Request
- Go to the original repository on GitHub
- Click "New Pull Request"
- Select your fork and branch
- Provide a clear description of your changes
- Reference any related issues
- Provide a clear description of the problem and solution
- Include relevant issue numbers (e.g., "Fixes #123")
- Ensure CI checks pass
- Respond to review comments promptly
- Keep pull requests focused on a single feature or fix
- Maintainers will review your pull request
- Address any requested changes
- Once approved, your changes will be merged
If you have questions or need help, feel free to:
- Open an issue on GitHub
- Reach out to the maintainers
By contributing to PyFastL2LiR, you agree that your contributions will be licensed under the same license as the project.
Thank you for contributing!