Contributing to ShellSense
January 18, 2025 ยท View on GitHub
We love your input! We want to make contributing to ShellSense as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
Development Process
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
- Fork the repo and create your branch from
main. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints.
- Issue that pull request!
Development Setup
-
Clone the repository:
git clone https://github.com/venopyx/shellsense.git cd shellsense -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install development dependencies:
pip install -e ".[dev]"
Code Style
We use several tools to maintain code quality:
blackfor code formattingisortfor import sortingmypyfor type checkingflake8for style guide enforcement
Before submitting a PR, please run:
black .
isort .
mypy shellsense
flake8
Testing
We use pytest for testing. To run tests:
pytest
For coverage report:
pytest --cov=shellsense
Adding New Tools
- Create a new tool class in the appropriate category directory under
shellsense/tools/ - Inherit from
BaseTool - Implement the required methods
- Add tests
- Update documentation
Example:
from shellsense.tools.base import BaseTool
class MyNewTool(BaseTool):
"""
Description of what your tool does.
"""
def invoke(self, input: dict) -> dict:
# Implementation
pass
def get_schema(self) -> dict:
# Schema definition
pass
Documentation
- Use docstrings for all public classes and methods
- Follow Google style docstrings
- Keep README.md updated
- Add examples for new features
Pull Request Process
- Update the README.md with details of changes if applicable
- Update the docs with details of any new tools or features
- The PR will be merged once you have the sign-off of at least one maintainer
Any contributions you make will be under the MIT Software License
In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.
Report bugs using GitHub's issue tracker
We use GitHub issues to track public bugs. Report a bug by opening a new issue.
License
By contributing, you agree that your contributions will be licensed under its MIT License.