Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/mist-userid.git cd mist-userid - Create a virtual environment and install dependencies:
python -m venv .venv source .venv/bin/activate pip install -e ".[dev]"
# Run all tests
pytest
# Run with coverage
pytest --cov=app
# Run specific test file
pytest tests/test_webhook.py -vThis project uses Ruff for linting. Configuration is in pyproject.toml.
# Check for issues
ruff check .
# Auto-fix issues
ruff check --fix .# Set required environment variables
export PA_TARGETS=https://your-pa-firewall.example.com
export PA_API_KEY=your-api-key
export MIST_WEBHOOK_SECRET=your-secret
export REDIS_URL=redis://localhost:6379
# Run the API server
uvicorn app.main:app --reload
# In another terminal, run the worker
python -m app.worker-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes and add tests
-
Ensure all tests pass:
pytest
-
Commit your changes with a descriptive message:
git commit -m "Add feature: description of what you added" -
Push to your fork and open a Pull Request
- Include tests for new functionality
- Update documentation if needed
- Keep PRs focused on a single change
- Ensure CI passes before requesting review
When reporting issues, please include:
- Operating system and version
- Python version
- Redis version
- Steps to reproduce the issue
- Expected vs actual behavior
- Relevant log output
Open an issue with the "question" label if you need help or clarification.