Getting Started
- If you’re fixing a bug or typo, feel free to submit a Pull Request directly.
- For new features or bug fix discussions, open an issue or join our Discord server to chat with the community.
Setting Up Your Environment
- Clone the repository:
git clone https://github.com/guardrails-ai/guardrails.git - Enter the project directory:
cd guardrails - Install the project in developer mode (use a virtual environment if preferred):
make dev - Install pre-commit:
pre-commit install
Development Workflow
Follow these steps before committing your changes:- Ensure tests pass:
make test - Format your code:
make autoformat - Run static analysis:
make type - Update documentation if needed. Docs are located in the
docsdirectory. You can serve docs usingmkdocs serve.
Optional: Pre-Commit Hooks
For convenience, consider installing the pre-commit hooks provided in the repository. These hooks automatically run tests and formatting checks each time you commit, reducing development overhead.Submitting a Pull Request
- Ensure all tests pass and code is formatted.
- Create a pull request with a clear description of your changes. Link to relevant issues or discussions. Follow this guide if needed.
- Address any failing checks before requesting a review.
- Engage in the code review process and make any necessary changes.
- Celebrate when your pull request is merged! Your changes will be available in the next Guardrails release.
Documentation
Docs are served via docusaurus. To serve docs locally, run the followinglocalhost:3000 in your browser.