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

Uploaded Python 3

File details

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

File metadata

  • Download URL: forecast_in_a_box-0.5.7.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.7.tar.gz
Algorithm Hash digest
SHA256 feeec0891aea704c436705425817ec94be490d4dd1f04cf2a79ed8ada65b1f59
MD5 6d1a103cea6b561eb18590ece225f6b4
BLAKE2b-256 c5be700642da6550e21897d9f48c06453de57fca99cfccf80e9d412a7a6af4c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for forecast_in_a_box-0.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e09bacdf4faff79370372e57e2880be27573352bfc8ae341f1585d584a19d409
MD5 8625ed14af16fe5e5235911c7d73e7b3
BLAKE2b-256 f7f58422106640203bcd76df19e5c8bdf23b7f6ad885a286b897ec6bb649055d

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