Skip to content

Collaboration with MapAction for historical analysis of ECMWF seasonal forecasts

License

Notifications You must be signed in to change notification settings

deltodon/ds-mapaction-ecmwf

 
 

Repository files navigation

ECMWF Seasonal Forecast Historical Analysis

Project Python Versions License GitHub top language
Quality Issues
Tools pre-commit Poetry Jupyter
Community Maintenance Stars Forks Contributors Commit activity
Maintainers UN-OCHA MapAction

Overview

This repository contains the analysis of the ECMWF seasonal forecasts, done in collaboration with MapAction.

Development

We use Poetry for package management. Poetry is production tested dependency management tool with exact version locking and support for packaging and virtual environments.

We also use Docker development environement in cases where we need to work with libraries that depend on compiled binaries.

The minimum tested Docker version: 26.1.1

Installing Poetry

📖 Install Poetry on Linux, macOS, Windows (WSL) using the official installer

curl -sSL https://install.python-poetry.org | python3 -

if necessary, add poetry location to PATH

echo 'export POETRY_HOME="$HOME/.local/bin"' >> ~/.bashrc

echo 'export PATH="$POETRY_HOME:$PATH"' >> ~/.bashrc

. ~/.bashrc

test that installation was successful

poetry --version

Installing dependencies

Before you start developing in this repository,
you will need to install project dependencies and pre-commit Git hooks.

navigate to the project directory

cd ds-mapaction-ecmwf

and run

make .venv hooks

or if you do not have make on your OS (i.e. Windows), you can run

# first install all dependencies
poetry install --no-root

# then install Git hooks
poetry run pre-commit install

NOTE: any new package can be added to the project by running

poetry add [package-name]

Lint and format

All code is formatted according to black, flake8, and PyMarkdown guidelines.
The repo is set-up to trigger lint tests automatically on each commit using pre-commit.

You can also run lint tests manually using

make lint

or if you do not have make on your OS (i.e. Windows), you can run

poetry run pre-commit run --all-files

This is especially useful if you try to resolve some failed test.
Once you passed all tests, you should see something like this

$ make lint
Running lint tests..
black....................................................................Passed
isort....................................................................Passed
flake8...................................................................Passed
pymarkdown...............................................................Passed

About

Collaboration with MapAction for historical analysis of ECMWF seasonal forecasts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 98.6%
  • Python 1.3%
  • Other 0.1%