OCHA-DAP / ds-mapaction-ecmwf

Collaboration with MapAction for historical analysis of ECMWF seasonal forecasts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

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

License:GNU General Public License v3.0


Languages

Language:Jupyter Notebook 96.6%Language:Python 3.3%Language:Makefile 0.1%