Contributing to BOOMER
Thank you for your interest in contributing to BOOMER! This document provides guidelines and information about how to contribute to the project.
Getting Started
Prerequisites
- Python 3.10 or higher
- Git
- Basic understanding of probabilistic reasoning and ontologies
Setting Up Your Development Environment
-
Clone the repository:
-
Create a virtual environment (optional but recommended):
-
Install development dependencies:
-
Run tests to verify your setup:
Development Workflow
Making Changes
-
Create a new branch for your feature or bugfix:
-
Make your changes to the codebase.
-
Run the linter to ensure code quality:
-
Run tests to ensure your changes don't break existing functionality:
-
Commit your changes with a clear commit message:
-
Push your changes to your fork:
-
Submit a pull request to the main repository.
Code Style
- Follow Python's PEP 8 style guide.
- Use type annotations for function parameters and return values.
- Write docstrings for all functions, classes, and methods.
- Use descriptive variable names and comments where necessary.
- Aim for clean, readable, and maintainable code.
Testing
- Write tests for all new functionality.
- Update existing tests when modifying functionality.
- Use pytest for testing.
- Aim for high test coverage.
Project Structure
src/boomer/: Core source codemodel.py: Data modelssearch.py: Search algorithmsreasoners/: Reasoning implementationsrenderers/: Output renderingio.py: Input/output utilitiescli.py: Command-line interfacetests/: Test filesdocs/: DocumentationMakefile: Build and test commands
Adding Features
New Fact Types
To add a new type of fact:
- Define the fact class in
src/boomer/model.py. - Update the
Factunion type. - Update the reasoners to handle the new fact type.
- Add tests for the new fact type.
New Reasoners
To add a new reasoner:
- Create a new file in the
src/boomer/reasoners/directory. - Implement the
Reasonerinterface. - Add tests for the new reasoner.
- Update documentation.
New Input/Output Formats
To add a new input or output format:
- Add functions to
src/boomer/io.py. - Add appropriate renderer in
src/boomer/renderers/. - Update the CLI to support the new format.
- Add tests and documentation.
Documentation
- Update documentation when adding or changing features.
- Add examples for new functionality.
- Use Markdown for documentation.
- Build and test documentation using MkDocs:
Submitting a Pull Request
- Ensure your code passes all tests and linting.
- Update documentation if necessary.
- Submit a pull request with a clear description of the changes.
- Wait for review and address any feedback.
Release Process
- Update version number in
pyproject.toml. - Update CHANGELOG.md with details of changes.
- Create a new release on GitHub.
- Build and publish the package to PyPI.
Getting Help
If you have questions or need help, you can:
- Open an issue on GitHub
- Contact the project maintainer
Thank you for contributing to BOOMER!