Thank you for your interest in contributing to SWVO. This guide explains the development workflow, coding standards, and testing requirements.
- Fork the repository and clone it locally:
git clone https://github.com/<your-username>/SWVO.git cd SWVO
- Create a feature branch:
git checkout -b my-feature
We use Ruff for linting, formatting, and import sorting.
- To check your code for issues:
ruff check . - To automatically apply available fixes:
ruff check . --fix - If Ruff cannot auto-fix an issue, fix it manually.
- [Optional] Ruff is also integrated with
pre-commit. To enable it:This ensures Ruff runs automatically on changed files before each commit (this wall also run Ty type checking, see below)pip install pre-commit pre-commit install
We use Ty for type checking.
- To check your code for type issues:
ty check . - Address any type errors reported by Ty.
- [Optional] Ty is also integrated with
pre-commit. If you have set uppre-commitas described above, Ty will run automatically on changed files before each commit.
We use pytest for testing.
-
Install dependencies:
pip install -e . -
Run the test suite locally:
python -m pytest tests/io
All new code should include tests when applicable.
Note
Tests may occasionally fail due to JSON parsing errors or server timeouts. These failures are not critical. Contributors should ensure that the implemented feature functions correctly and does not break any related functionality.
-
Push your branch:
git push origin my-feature
-
Open a Pull Request (PR) against
main.- Clearly describe the purpose of the changes.
- Reference related issues if applicable.
CI will automatically run Ruff and the test suite on your PR.
- If Ruff fails and cannot auto-fix, you must resolve the issues before merging.
- If tests fail, update your code or test cases accordingly.
- Use clear, descriptive commit messages.
- Example:
Fix handling of missing satellite data in solar wind reader
- At least one maintainer must review and approve your PR.
- Be open to feedback and make the requested changes.
- Keep PRs focused and small when possible.
- Document new functions or modules.