Thank you for your interest in contributing to airsspy! This document provides guidelines for contributors.
-
Clone the repository:
git clone https://github.com/zhubonan/airsspy.git cd airsspy -
Set up the development environment:
# Using uv (recommended) uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install -e .[dev,test] # Or using pip python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -e .[dev,test]
-
Install pre-commit hooks:
pre-commit install
We use modern Python tooling to maintain code quality:
- Formatting:
ruff format(auto-formats code) - Linting:
ruff check(finds and fixes issues) - Type checking:
mypy(static type analysis)
# Format code
ruff format airsspy/
# Check for issues
ruff check airsspy/
# Type checking
mypy airsspy/ --ignore-missing-imports
# Run all checks at once
pre-commit run --all-filesWe use pytest for testing with coverage reporting:
# Run all tests
pytest airsspy/
# Run with coverage
pytest airsspy/ --cov=airsspy --cov-report=html
# Run specific test file
pytest airsspy/tests/test_seed.py- Create a new branch for your feature/bugfix
- Make your changes
- Run tests and code quality checks
- Commit your changes (pre-commit hooks will run automatically)
- Push to your fork and create a pull request
airsspy/seed.py: Core SeedAtoms classairsspy/build.py: Buildcell wrapperairsspy/restools.py: RES file utilitiesairsspy/common.py: Shared utilities
When adding new features:
- Follow existing code patterns
- Add type hints where appropriate
- Include tests for new functionality
- Update documentation if needed
- Ensure all tests pass
- Follow the existing code style
- Write clear commit messages
- Include tests for new functionality
- Update documentation as needed
Feel free to open an issue for questions or discussion before making major changes.