This module takes a Pangeo Forge recipe meta.yaml and bakeries.yaml and registers the meta.yaml
's recipes with Prefect Cloud using the its specified bakery information.
It is intended for use with Github Actions in the pangeo-forge/staged-recipe
and feedstock
repositories as outlined here.
The Python version used to serialize Flows must be the same as the worker images deployed in the bakery cluster. Currently this requires Python 3.8.
In order to register flows with Prefect Cloud, the module requires the environment variable
PREFECT__CLOUD__AUTH_TOKEN
to be set to a Prefect Service Account key.
And the environment variable
PREFECT_PROJECT_NAME
To be set to the Pangeo Forge Prefect Cloud project name.
The environment variable
GITHUB_REPOSITORY
Should be the repository which triggers the Flow registration.
If the environment variable
COMMENT_ID
is present a notification hook will be registered for the Flow completion status.
From source
$ pip install git+https://github.com/developmentseed/pangeo-forge-prefect.git
$ tox
The use of a virtual environment is recommended.
$ git clone https://github.com/developmentseed/pangeo-forge-prefect
$ cd pangeo-forge-prefect
$ pip install -e .[dev]
This repo is set to use pre-commit to run isort, flake8, and black ("uncompromising Python code formatter") when committing new code.
$ pre-commit install