CtrlK
BlogDocsLog inGet started
Tessl Logo

climate-indices-conventions

Repository conventions for the climate_indices Python scientific-computing library — enforces coding style, module boundaries, test placement, and Conventional Commit format. Use when changing climate_indices, writing its tests or docs, preparing commits, or running ruff/mypy validation and pytest tests.

72

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

climate_indices Conventions

Generated from monocongo/climate_indices on 2026-08-08, then reviewed against this repository.

Use this skill when changing climate_indices, writing its tests or documentation, or preparing commits.

Project Layout and Module Boundaries

climate_indices is a Python library with a src/ layout. Its production code is the src/climate_indices/ package; tests are direct pytest modules in tests/, with reference data in tests/fixture/.

The package uses responsibility-focused modules:

AreaModules
Command-line interfaces__main__.py, __spi__.py
Public APIsindices.py (NumPy), typed_public_api.py, xarray_adapter.py
Climate-index computationcompute.py, palmer.py
PET and statisticseto.py, pm_eto.py, lmoments.py
Supporting servicescf_metadata_registry.py, exceptions.py, logging_config.py, performance.py, utils.py

Keep changes within the established module boundary. Read src/climate_indices/CONTEXT.md before using project domain terminology.

Python Style

ElementConvention
Modules and filessnake_case.py
Functions and variablessnake_case
ClassesPascalCase
ConstantsSCREAMING_SNAKE_CASE
Teststests/test_<subject>.py

Follow the existing package-qualified import style:

from climate_indices import compute
from climate_indices.exceptions import InvalidArgumentError

For an explicitly curated module API, use Python's __all__. Package-level re-exports belong in src/climate_indices/__init__.py.

Public APIs must be typed and documented with Google-style docstrings. Use structlog through climate_indices.logging_config; do not introduce stdlib logging.

Tests and Documentation

  • Put pytest tests directly under tests/ as test_*.py.
  • Put shared fixtures in tests/conftest.py and stable reference data in tests/fixture/.
  • Add or update tests for behavior changes and bug fixes.
  • Update documentation for public API, behavior, or workflow changes.

A typical feature touches paths such as:

src/climate_indices/<module>.py
tests/test_<module>.py
tests/fixture/<reference-data>    # when needed
docs/<document>                   # when public behavior changes

Commit Conventions

Use Conventional Commit messages. Common types are:

  • feat
  • fix
  • docs
  • test
  • refactor
  • chore
  • ci
  • build
  • style

Use a scope when it adds useful context, for example:

feat: add rolling-window extreme Z-index sum with wet-side anomaly filter
fix(review): align integrity checks with repository standards
chore(deps): bump actions/checkout from 7.0.0 to 7.0.1

Keep the subject concise, descriptive, and focused on one coherent change.

Validation

For source or test changes, run:

uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
uv run mypy src/
uv run pytest

For packaging, release, or workflow changes, also run:

uv run pytest tests/test_release_integrity.py

Feature Workflow

  1. Identify the responsible module and existing tests.
  2. Implement the smallest coherent change in src/climate_indices/.
  3. Add or update tests/test_*.py coverage and fixtures as needed.
  4. Update user-facing documentation when behavior changes.
  5. Run the relevant validation commands before review.
Repository
monocongo/climate_indices
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.