Skip to content

bnestes18/pyweather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyWeather 🌦️

A lightweight Python library for ingesting, validating, and summarising weather station data.

CI Python License

Features

  • ModelsWeatherReading and WeatherSummary dataclasses with built-in validation
  • Statistics – mean, variance, std-dev, percentiles, anomaly detection
  • Processor – load from JSON or CSV, filter by time range, produce aggregated summaries
  • Zero dependencies – pure Python standard library

Quick Start

from datetime import datetime
from pyweather import WeatherReading, WeatherProcessor

proc = WeatherProcessor(station_id="NYC01")
proc.load_from_json(open("data.json").read())

summary = proc.summarise()
print(summary.avg_temperature_c)   # 21.4
print(summary.total_precipitation_mm)

CI/CD Pipeline

The pipeline is defined in .github/workflows/ci.yml and consists of five jobs:

Job Trigger Purpose
lint every push/PR Ruff linter + formatter + mypy type-check
test after lint pytest on Python 3.10/3.11/3.12 × ubuntu/windows/macos
security after lint pip-audit CVE scan + trufflehog secret scan
build after test + security Build wheel + sdist, validate metadata
publish on GitHub Release Publish to PyPI via trusted publishing

A separate nightly workflow runs performance benchmarks at 02:00 UTC.

Development

git clone https://github.com/your-org/pyweather.git
cd pyweather
pip install -e ".[dev]"
pytest
ruff check src/ tests/
mypy src/pyweather/

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages