First off, thank you for considering contributing to Pattern Analyzer! We welcome any contributions, from fixing a typo in the documentation to implementing a brand-new analysis plugin.
This document provides guidelines for contributing to the project.
This project and everyone participating in it is governed by the Pattern Analyzer Code of Conduct. By participating, you are expected to uphold this code.
There are many ways to contribute to Pattern Analyzer:
- Reporting Bugs: If you find a bug, please open an issue and provide detailed steps to reproduce it.
- Suggesting Enhancements: Have an idea for a new feature or a new plugin? Open an issue to discuss it.
- Improving Documentation: If you find parts of the documentation unclear or incomplete, feel free to submit a pull request with your improvements.
- Writing Code: Contribute by fixing bugs, improving existing features, or adding new plugins.
Unsure where to begin? A great place to start is by looking for issues tagged with good first issue or help wanted.
To get your development environment ready, please follow these steps:
-
Fork the repository on GitHub.
-
Clone your fork locally:
git clone https://github.com/edgetype/pattern-analyzer.git cd pattern-analyzer -
Create a virtual environment:
python -m venv .venv
-
Activate the virtual environment:
- On Windows:
.venv\Scripts\Activate.ps1
- On macOS and Linux:
source .venv/bin/activate
- On Windows:
-
Install dependencies in editable mode. This is crucial as it allows your local code changes to be immediately reflected when you run the
patternanalyzercommand.pip install -e .[test,ml,ui]
-
Create a new branch for your feature or bug fix:
git checkout -b feature/my-awesome-plugin-or-something-else
-
Make your changes. Write clean, readable code and follow the existing code style.
-
Add tests for your changes. This is very important.
- If you're fixing a bug, add a test that fails without your change and passes with it.
- If you're adding a new feature, add tests that cover its functionality.
- Tests are located in the
tests/directory.
-
Run the full test suite to ensure everything is working correctly:
pytest
-
Update the documentation if necessary.
- If you've added a new plugin, add it to the
docs/test-reference.mdfile. - If you've changed the CLI or API, update the relevant sections in the
docs/folder.
- If you've added a new plugin, add it to the
-
Commit your changes with a clear and descriptive commit message.
-
Push your branch to your fork on GitHub:
git push origin feature/my-awesome-plugin
-
Open a Pull Request to the
mainbranch of the original repository.- Provide a clear title and a detailed description of your changes.
- If your PR addresses an existing issue, link it by including
Closes #123in the description.
Your pull request will be reviewed, and we'll provide feedback. Thank you for your contribution!
One of the most valuable ways to contribute is by creating new plugins. The framework is designed to make this easy. For a detailed guide on creating your own tests, transforms, or visualizers, please see our Plugin Developer Guide.