Thank you for your interest in contributing to the Imperva Cloud WAF MCP Server! This document provides guidelines for contributing to the project.
If you find a bug or have a feature request:
- Check if the issue already exists in the issue tracker
- If not, create a new issue with a clear title and description
- Include steps to reproduce for bugs
- Include use cases and benefits for feature requests
- Fork the repository
- Create a new branch for your feature or bugfix
- Make your changes following our coding standards (see below)
- Write or update tests as needed
- Ensure all tests pass
- Submit a pull request
Before contributing, set up your development environment:
-
Install UV package manager:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Sync project dependencies:
uv sync
-
Enable pre-commit hooks:
uv run pre-commit install
This project uses:
- Black for code formatting
- Pylint for linting
Before submitting code:
-
Format your code with Black:
python3 -m black --color . -
Check code quality with Pylint (minimum score: 8):
uv run pylint src/ -r y --fail-under=8
- Write clear, self-documenting code
- Add docstrings to functions and classes
- Keep functions small and focused
- Follow Python PEP 8 conventions
All code contributions must include tests.
Run the test suite:
pytest tests/*- Write unit tests for new features
- Update existing tests when modifying functionality
- Ensure all tests pass before submitting a PR
- Aim for good test coverage
- Update Documentation: Update README.md if needed for new features
- Test Your Changes: Ensure all tests pass
- Code Quality: Pass Black and Pylint checks
- Clear Description: Write a clear PR description explaining your changes
- Link Issues: Reference any related issues in your PR description
Before submitting your pull request, make sure that:
- Code follows the project's style guidelines
- Code has been formatted with Black
- Pylint score is 8 or higher
- All tests pass
- New tests added for new functionality
- Documentation updated if needed
- Commit messages are clear and descriptive
If you have questions about contributing, feel free to open an issue for discussion.