Skip to main content

Weather Forecast in a Box

Project description

See project's readme.

Development

Setup

There are two options:

  1. create manually a venv and install this as an editable package into it,
  2. use the fiab.sh script.

The first gives you more control, the second brings more automation -- but both choices are ultimately fine and lead to the same result.

For the first option, active your venv of choice, and then:

mkdir -p ~/.fiab
uv pip install --prerelease=allow --upgrade -e .[test] # the --prerelease will eventually disapper, check whether pyproject contains any `dev` pins
pytest backend # just to ensure all is good

For the second option, check the fiab.sh first -- it is configurable via envvars which are listed at the script's start. In particular, you can change the directory which will contain the venv, and whether it does a PyPI-released or local-editable install. Note however that in case of the local-editable installs, you must execute the fiab.sh with cwd being the backend, as there is pip install -e..

Frontend Required

The frontend is actually expected to be present as artifact inside the backend in case of the editable install. See the justfile's fiabwheel recipe for instruction how to build the frontend and create a symlink inside the backend.

Backend wheels on pypi do contain a frontend copy -- you can alternatively pull a wheel and extract the built frontend into the local install.

Developer Flow

Primary means is running ruff, ty, and pytest, with the config being in pyproject.toml. Ideally, you utilize the val recipe from the justfile here, and install pre-commit hooks.

Type annotations are present and enforced.

In the bigtest.py there is a larger integration test, triggered at CI in addition to the regular pytest -- see the github action for execution.

Architecture Overview

Consists of a four primary components:

  1. JavaScript frontend as a stateless page, basically "user form → backend request" -- located at frontend,
  2. FastAPI/Uvicorn application with multiple routes, organized by domain: auth, job submission & status, model download & status, gateway interaction, ...
  3. standalone "gateway" process, expected to be launched at the beginning together with the Uvicorn process, which is the gateway to the earthkit-workflows,
  4. persistence, based on a local sqlite database.

Configuration is handled by the config.py using pydantic's BaseSettings, meaning most behaviour is configurable via envvars -- see fiab.sh or tests for examples. See tuning and configuration guide for more.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forecast_in_a_box-0.6.0.tar.gz (51.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

forecast_in_a_box-0.6.0-py3-none-any.whl (10.7 MB view details)

Uploaded Python 3

File details

Details for the file forecast_in_a_box-0.6.0.tar.gz.

File metadata

  • Download URL: forecast_in_a_box-0.6.0.tar.gz
  • Upload date:
  • Size: 51.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for forecast_in_a_box-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e4988d783cb377d32cdd94f99ad3a01a4ab57189e3942f4d5404694f825104f2
MD5 3976278f874be0203246d87733fd27bd
BLAKE2b-256 a851e05c1f462fa39f311257d4bff4cb7cb98c48ea4b7e0f89263be4ec04c96a

See more details on using hashes here.

File details

Details for the file forecast_in_a_box-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for forecast_in_a_box-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a9f9eaf004628c7e45723680b9d25ad195bbcb3e57598db513a60e43c10bf07
MD5 5cab2b04278fb2c6c9a0ba0308c4c384
BLAKE2b-256 fe2ba177c9991b60f6065c1e087ed74f3fa0bf54a090b3c62a648ba774d6e832

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page