Skip to content

Janitor CLI #506

Description

@clampr

We want to create a CLI tool based on the click framework which helps managing the directory of weather stations. The CLI tool will be named "janitor".

Tech Stack

  • UV(X)
  • Click
  • Ruff
  • Ty
  • Pytest

Features

  • janitor sync – Create a SQLite .db file based on all active stations in the stations directory (based on current implementation)
  • janitor duplicates – List potential duplicates
  • janitor active – Update the active flags based on the latest database file (available from http://data.meteostat.net/stations.db) -> if inventory is empty, active is false
  • janitor check – Validate all station files and print failing ones
  • janitor check -d – Delete stations which fail validation
  • janitor import --source gsa – Update existing weather stations and create missing ones from a data source (source argument will map to an import script)
  • janitor query "YOUR QUERY" – Query the database of weather stations (available from http://data.meteostat.net/stations.db)

Requirements

  • There will only be three directories in this repo:
    • .github
    • cli <- ALL logic lives here
    • stations
  • GitHub Actions workflows are using the CLI themselves
  • All code is thoroughly tested
  • GitHub workflows exist for linting, type checks and tests
  • The README file has been updated to explain usage of the CLI
  • The janitor check tool checks against a strict JSON schema

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Fields

No fields configured for Feature.

Projects

Status
📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions