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
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
Features
janitor sync– Create a SQLite.dbfile based on all active stations in thestationsdirectory (based on current implementation)janitor duplicates– List potential duplicatesjanitor active– Update theactiveflags based on the latest database file (available fromhttp://data.meteostat.net/stations.db) -> if inventory is empty,activeisfalsejanitor check– Validate all station files and print failing onesjanitor check -d– Delete stations which fail validationjanitor import --source gsa– Update existing weather stations and create missing ones from a data source (sourceargument will map to an import script)janitor query "YOUR QUERY"– Query the database of weather stations (available fromhttp://data.meteostat.net/stations.db)Requirements
.githubcli<- ALL logic lives herestationsREADMEfile has been updated to explain usage of the CLIjanitor checktool checks against a strict JSON schema