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.5.6.tar.gz (12.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.5.6-py3-none-any.whl (12.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: forecast_in_a_box-0.5.6.tar.gz
  • Upload date:
  • Size: 12.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.5.6.tar.gz
Algorithm Hash digest
SHA256 b47efa12de2ef7af8fded0b07ffa59155e2aa2e4bc6b9032ec906b38445a8fbc
MD5 3b224afee96a7511d5bca918d9101d5a
BLAKE2b-256 262014181b303b61aced5e0a28ec825167b7dcbbea31d76f92a7d60bdefc251a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forecast_in_a_box-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6c4fb7eb6e1402cf088e8cbc409c90d23a43bc17ed489208845c5c87e52075e6
MD5 ccbb42b24f3d025294700de2484dfc57
BLAKE2b-256 f2a328ea4b4281210415693cd735ebb38ac0b6f10c62bcb813abd19963cf2734

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