Skip to content

DAGs describing the production workflows used at Open Climate Fix

Notifications You must be signed in to change notification settings

openclimatefix/airflow-dags

Repository files navigation

Airflow Dags

Airflow pipelines for Open Climate Fix's production systems

workflows badge tags badge contributors badge ease of contribution: medium

Note

This repo is a migration of the dags folder from the ocf-infrastructure repository. Commit history and authorship has not been preserved, so for previous iterations of the DAGs, see the original repository's history.

Installation

Copy the airflow_dags folder into your dags location:

$ cp -r airflow_dags /path/to/airflow/dags

Or use the build webserver image in your containerized airflow deployment:

$ docker pull ghcr.io/openclimatefix/airflow-dags

Example usage

See the docker-compose file in the ocf-infrastructure repository.

Documentation

TODO

FAQ

Can I change the name of a DAG?

Try to avoid it! The DAG name is how airflow identifies the DAG in the database. If you change the name of a DAG, airflow will treat it as a new DAG. This means that the old DAG will still be in the database, but it will not be updated or run.

Development

Linting and static type checking

This project uses MyPy for static type checking and Ruff for linting. Installing the development dependencies makes them available in your virtual environment.

Use them via:

$ python -m mypy .
$ python -m ruff check .

Be sure to do this periodically while developing to catch any errors early and prevent headaches with the CI pipeline. It may seem like a hassle at first, but it prevents accidental creation of a whole suite of bugs.

Running the test suite

There are some additional dependencies to be installed for running the tests, be sure to pass --extra=dev to the pip install -e . command when creating your virtualenv. (Or use uv and let it do it for you!)

Run the unit tests with:

$ python -m unittest discover -s tests -p "test_*.py"

Further reading

On the directory structure:


Contributing and community

issues badge

Contributors


Part of the Open Climate Fix community.

OCF Logo

About

DAGs describing the production workflows used at Open Climate Fix

Resources

Stars

Watchers

Forks

Packages