Contributing to PromptRefiner
Thank you for your interest in contributing to PromptRefiner! π This guide will help you set up a development environment and contribute effectively.
π Setting Up the Development Environment
1οΈβ£ Clone the Repository
git clone https://github.com/darshit7/promptrefiner.git
cd promptrefiner
2οΈβ£ Install Hatch (if not installed)
We use Hatch for dependency management and virtual environments. If you donβt have it installed, run:
pip install hatch
3οΈβ£ Create and Activate the Development Environment
To set up your environment, run:
hatch env create dev
hatch shell dev
[tool.hatch.envs.dev]
in pyproject.toml
.
4οΈβ£ Verify Installation
To confirm everything is set up correctly, run:
pytest # Runs tests
mypy . # Runs type checks
ruff check . # Runs linter
π Making Contributions
π Found a Bug?
- Open an issue describing the bug and steps to reproduce.
- If you already have a fix, feel free to submit a PR!
β¨ Adding a Feature?
- Discuss your idea in an issue first.
- Follow best practices for writing clean, maintainable Python code.
π Writing Documentation?
- We use MkDocs with
mkdocs-material
. Runmkdocs serve
locally to preview changes.
π Running Tests
Before submitting a PR, ensure all tests pass:
pytest
If adding new functionality, include appropriate tests.
π Submitting a Pull Request
- Fork the repository and create a new branch.
- Make your changes and commit them with a meaningful message.
- Push your branch and open a PR.
- Ensure your PR follows the style guide and passes all checks.
π‘ Code Style & Linting
We enforce PEP8 and other best practices using ruff
, black
, and mypy
. Before committing, format your code:
black .
ruff check . --fix
mypy .
π Join the Community
We welcome contributions of all kinds! Whether it's code, documentation, or discussions, your input is valuable.
Feel free to open an issue or join discussions to help improve PromptRefiner! π