forked from PyPSA/PyPSA
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Includes conda requirements files - Loosely based on calliope from https://github.com/calliope-project/calliope
- Loading branch information
Showing
5 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Modified from | ||
# https://github.com/calliope-project/calliope/blob/master/.travis.yml | ||
|
||
language: python | ||
sudo: false # Use container-based infrastructure | ||
|
||
matrix: | ||
include: | ||
- env: | ||
- PYTHON_VERSION="2.7" | ||
- env: | ||
- PYTHON_VERSION="3.6" | ||
|
||
before_install: | ||
- if [[ "$PYTHON_VERSION" == "2.7" ]]; then | ||
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; | ||
else | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; | ||
fi | ||
- bash miniconda.sh -b -p $HOME/miniconda | ||
- export PATH="$HOME/miniconda/bin:$PATH" | ||
- hash -r | ||
- conda config --set always_yes yes --set changeps1 no | ||
- conda update -q conda | ||
# Useful for debugging any issues with conda | ||
- conda info -a | ||
|
||
install: | ||
- conda create -n pypsa python=$PYTHON_VERSION | ||
- conda env update -n pypsa --file=requirements.yml | ||
- conda env update -n pypsa --file=requirements_dev.yml | ||
- source activate pypsa | ||
- conda install -c conda-forge python-coveralls # don't install on appveyor | ||
- pip install --no-cache-dir . | ||
|
||
# before_script: # configure a headless display to test plot generation | ||
# - "export DISPLAY=:99.0" | ||
# - "sh -e /etc/init.d/xvfb start" | ||
# - sleep 3 # give xvfb some time to start | ||
|
||
script: "make test" | ||
|
||
after_success: | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
include pypsa/component_attrs/*.csv | ||
include pypsa/standard_types/*.csv | ||
include pypsa/components.csv | ||
include README.rst LICENSE.txt | ||
include requirements.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.PHONY : test sdist upload clean dist | ||
|
||
test : | ||
pytest --cov pypsa --cov-report term-missing | ||
|
||
sdist : | ||
python setup.py sdist | ||
|
||
upload : | ||
twine upload dist/* | ||
|
||
clean : | ||
rm dist/* | ||
|
||
dist : sdist upload clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: pypsa | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python | ||
- six | ||
- numpy | ||
- pyomo | ||
- scipy | ||
- pandas>=0.19.0 | ||
- matplotlib | ||
- networkx>=1.10 | ||
- pyomo | ||
- coincbc | ||
- glpk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: pypsa | ||
|
||
channels: | ||
- conda-forge | ||
- anaconda | ||
|
||
dependencies: | ||
- pytest | ||
- pytest-cov | ||
- twine | ||
- pip: | ||
- pypower | ||
- pandapower |