We welcome contributions from the community! This guide will help you get started with contributing to the Netra SDK.
You can set up your development environment using the provided setup script:
./setup_dev.shThis script will:
- Install all Python dependencies in development mode
- Set up pre-commit hooks for code quality
- Configure commit message formatting
If you prefer to set up manually:
# Install dependencies
pip install -e ".[dev,test]"
# Install pre-commit hooks
pip install pre-commit
pre-commit install --install-hooks
pre-commit install --hook-type commit-msg
pre-commit install --hook-type pre-pushRun the test suite with:
poetry run pytestTo run a specific test file:
poetry run pytest tests/test_netra_init.pyGenerate a test coverage report with:
poetry run pytest --cov=netra --cov-report=htmlThis creates an htmlcov directory with a detailed report.
Tests are organized using pytest markers. Run specific categories with:
# Unit tests
poetry run pytest -m unit
# Integration tests
poetry run pytest -m integration
# Thread safety tests
poetry run pytest -m thread_safety
# Slow tests (run last)
poetry run pytest -m slowWe use Conventional Commits for commit messages:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- chore: Changes to the build process or auxiliary tools
feat: add support for Claude AI instrumentation
fix(pii): resolve masking issue with nested objects
docs: update installation instructions
Use the scope to specify the area of change (e.g., pii, instrumentation, decorators).
Include the motivation for the change and contrast with previous behavior.
Use for "BREAKING CHANGE:" or issue references.
- Fork the repository and create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes following the commit message guidelines
- Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please note we have a Code of Conduct, please follow it in all your interactions with the project.