Thank you for your interest in contributing to GridCast! This document provides guidelines to ensure a smooth development workflow.
# Clone and setup
git clone https://github.com/knight22-21/GridCast.git
cd GridCast
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
pre-commit installWe use Ruff for both linting and formatting:
ruff check src/ tests/ pipelines/ # Lint
ruff format src/ tests/ pipelines/ # FormatAll changes must pass the existing test suite and maintain ≥80% coverage:
# Run all tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=src --cov-report=term-missing
# Run specific test suites
pytest tests/unit/ -v
pytest tests/integration/ -v
pytest tests/data_validation/ -vPre-commit hooks run automatically on git commit. To run them manually:
pre-commit run --all-files- Create a feature branch from
main - Make your changes with clear commit messages
- Ensure all tests pass and coverage ≥80%
- Open a pull request against
main - CI will run automatically on the PR
- Configuration: All hyperparameters and paths go in
params.yaml— never hardcode - Secrets: All credentials use environment variables via
.env— never commit secrets - Blob Storage: All Azure Blob interactions include a local file fallback for offline development
- Time-series: Always use chronological splits, never random. Use
shift()for lag features - Type hints: All function signatures include type annotations
- Docstrings: All public functions have Google-style docstrings