Thank you for your interest in contributing! This document provides guidelines for contributing to this project.
# Clone the repository
git clone https://github.com/SanyogSingh07/data-skew-intelligence.git
cd data-skew-intelligence
# Create and activate virtual environment
python -m venv .venv
.venv\Scripts\activate # Windows
source .venv/bin/activate # macOS/Linux
# Install all dependencies (including dev tools)
pip install -r requirements-dev.txt| Tool | Version | Purpose |
|---|---|---|
| Python | 3.11+ | Runtime |
| Java JDK | 17+ | PySpark dependency |
| Git | Latest | Version control |
- Check existing Issues to avoid duplicates
- Use the bug report template (if available)
- Include: Python version, Java version, OS, error output, and reproduction steps
- Open a Discussion or Issue
- Describe the use case and expected behavior
- Include code examples or mockups if possible
- Fork the repository
- Create a feature branch from
main:git checkout -b feature/your-feature-name
- Make your changes following the code style guidelines below
- Run the test suite and linter:
ruff check . pytest -q --cov=. - Commit with a descriptive message:
git commit -m "feat: add XYZ capability to mitigation engine" - Push and open a Pull Request against
main
This project uses Ruff for linting and formatting:
- Line length: 120 characters
- Selected rules:
E(pycodestyle),F(pyflakes),I(isort),B(bugbear) - Ignored rules:
E402(module-level imports),E501(line length handled by formatter)
# Check for issues
ruff check .
# Auto-fix
ruff check --fix .Use Conventional Commits:
| Prefix | Use Case |
|---|---|
feat: |
New feature |
fix: |
Bug fix |
docs: |
Documentation changes |
test: |
Adding or modifying tests |
refactor: |
Code restructuring (no behavior change) |
perf: |
Performance improvements |
ci: |
CI/CD changes |
All contributions must pass the existing test suite:
# Full suite
pytest
# With coverage
pytest -q --cov=. --cov-report=term-missing
# Specific module
pytest tests/test_mitigation.py -v- Place tests in the
tests/directory - Follow the naming convention
test_<module>.py - Use fixtures from
tests/conftest.py - Aim for meaningful assertions, not just coverage
| Directory | Purpose |
|---|---|
spark/ |
PySpark computation — sessions, metrics, mitigation |
ml/ |
scikit-learn training, evaluation, prediction |
cli/ |
Terminal interface (Typer + Rich) |
visualization/ |
Charts (Matplotlib), theme, site export |
core/ |
Pipeline orchestration & configuration |
tests/ |
All pytest tests |
docs/ |
Architecture documents & screenshots |
By contributing, you agree that your contributions will be licensed under the MIT License.