Contributing to GraFlo¶
We welcome contributions to GraFlo! This document provides guidelines and instructions for contributing to the project.
Getting Started¶
- Fork the repository on GitHub
- Clone your fork locally
- From the repository root (where
pyproject.tomllives), install development dependencies: Add--extra docsif you will build the documentation site locally. - Install pre-commit hooks:
Development Workflow¶
-
Create a new branch for your feature or bugfix:
-
Make your changes and ensure tests pass:
-
Commit your changes with a descriptive message:
-
Push your branch to your fork:
-
Create a Pull Request on GitHub
Code Style¶
- Follow PEP 8 style guidelines
- Use type hints for all function parameters and return values
- Write docstrings following the Google style
- Keep functions focused and small
- Add tests for new features
Documentation¶
- Update relevant documentation when adding new features
- Add docstrings to all new functions and classes
- Include examples in docstrings where appropriate
- Update the changelog for significant changes
To build and preview the docs site locally:
If you edit the GraFlo meta-ontology (graflo/rdf/ontology/graflo.ttl), regenerate the interactive visualization and commit the updated assets:
Visual tweaks and the graph viewer live in repo-owned files under docs/scripts/ontology_viz/ and are copied into docs/assets/graflo-ontology-viz/ at build time. Do not edit packages inside .venv.
CI runs the same script and fails if docs/assets/graflo-ontology-viz/ is out of date with the committed ontology.
Testing¶
- Write tests for all new features
- Ensure all tests pass before submitting a PR
- Add tests for bug fixes
- Maintain or improve test coverage
Pull Request Process¶
- Ensure your PR description clearly describes the problem and solution
- Include relevant tests
- Update documentation as needed
- Ensure all CI checks pass
- Request review from maintainers
Reporting Issues¶
When reporting issues, please include:
- Python version
- GraFlo version
- Steps to reproduce
- Expected behavior
- Actual behavior
- Any relevant error messages