2019-10-28 16:49:18 +00:00
|
|
|
language: python
|
|
|
|
|
|
|
|
python:
|
|
|
|
- "3.7"
|
|
|
|
|
|
|
|
install:
|
|
|
|
# install system utilities
|
|
|
|
- sudo apt-get update --fix-missing
|
|
|
|
- sudo apt-get install -yq --no-install-recommends curl bzip2 xz-utils git ca-certificates coinor-cbc
|
|
|
|
|
|
|
|
# download and extract data dependencies
|
|
|
|
- curl -L "https://zenodo.org/record/3517921/files/pypsa-eur-tutorial-data-bundle.tar.xz" -o "./bundle.tar.xz"
|
|
|
|
- curl -L "https://zenodo.org/record/3518020/files/pypsa-eur-tutorial-cutouts.tar.xz" -o "./cutouts.tar.xz"
|
2019-10-31 17:11:40 +00:00
|
|
|
- curl -L -N -s "https://zenodo.org/record/3518215/files/natura.tiff" -o "./resources/natura.tiff"
|
2019-10-28 16:49:18 +00:00
|
|
|
- tar xJf ./bundle.tar.xz -C ./data
|
|
|
|
- tar xJf ./cutouts.tar.xz -C .
|
|
|
|
|
|
|
|
# install conda
|
|
|
|
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/use-conda-with-travis-ci.html
|
|
|
|
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
|
|
|
|
- bash miniconda.sh -b -p $HOME/miniconda
|
|
|
|
- source "$HOME/miniconda/etc/profile.d/conda.sh"
|
|
|
|
- hash -r
|
|
|
|
- conda config --set always_yes yes --set changeps1 no
|
|
|
|
- conda update -q conda
|
|
|
|
- conda info -a
|
|
|
|
|
|
|
|
# install conda environment
|
|
|
|
- conda env create -f ./environment.yaml
|
|
|
|
- conda activate pypsa-eur
|
|
|
|
|
|
|
|
# install open-source solver
|
|
|
|
- conda install -c conda-forge ipopt
|
|
|
|
|
|
|
|
script:
|
|
|
|
- cp ./test/config.test1.yaml ./config.yaml
|
|
|
|
- snakemake
|
|
|
|
- rm -rf resources/*.nc resources/*.geojson resources/*.h5 networks results
|
|
|
|
# could repeat for more configurations in future
|