Skip to content

Commit

Permalink
Setup & Installation
Browse files Browse the repository at this point in the history
In preparation to migrate parts of pyiron_mpie to pyiron_contrib we should implement the same setup scripts we use for pyiron.
  • Loading branch information
jan-janssen committed Oct 9, 2020
1 parent acb479c commit 2b7d358
Show file tree
Hide file tree
Showing 10 changed files with 2,519 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .ci_support/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
channels:
- conda-forge
dependencies:
- ase =3.19
- coveralls
- coverage
- codacy-coverage
- matplotlib
- numpy
- pyiron =0.3.6
- scipy
- seaborn
- skimage
19 changes: 19 additions & 0 deletions .ci_support/pyironconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os


def main():
current_path = os.path.abspath(os.path.curdir)
top_level_path = current_path.replace('\\', '/')
resource_path = os.path.join(current_path, "tests", "static").replace('\\', '/')
pyiron_config = os.path.expanduser('~/.pyiron').replace('\\', '/')
if not os.path.exists(pyiron_config):
with open(pyiron_config, 'w') as f:
f.writelines(['[DEFAULT]\n',
'TOP_LEVEL_DIRS = ' + top_level_path + '\n',
'RESOURCE_PATHS = ' + resource_path + '\n'])
else:
print('config exists')


if __name__ == '__main__':
main()
11 changes: 11 additions & 0 deletions .ci_support/travis_setup_pyiron.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Setup Miniconda
wget ${1} -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
conda info -a
conda config --set always_yes yes --set changeps1 no

# Setup pyiron
conda install python=${2}
conda env update --name root --file .ci_support/environment.yml
pip install --pre .
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
matrix:
include:
- stage: test
name: test_linux_3_7
os: linux
language: python
env: MINICONDA="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh" PYTHONVER="3.7"
install:
- export PATH="$HOME/miniconda/bin:$PATH"
- ./.ci_support/travis_setup_pyiron.sh ${MINICONDA} ${PYTHONVER}
- python .ci_support/pyironconfig.py
script:
- coverage run -m unittest discover tests
- coverage combine
after_success:
- coveralls
- coverage xml
- python-codacy-coverage -r coverage.xml
deploy:
- provider: pypi
user: pyiron
password: ${PYPI_UPLOAD_TOKEN}
allow_failure: true
on:
branch: master
- provider: pypi
user: pyiron
password: ${PYPI_UPLOAD_TOKEN}
allow_failure: true
on:
tags: true
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include versioneer.py
include pyiron_contrib/_version.py
include LICENSE
8 changes: 8 additions & 0 deletions pyiron_contrib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
__version__ = "0.1"
__all__ = []

from pyiron import Project
from pyiron_base import JOB_CLASS_DICT

Expand All @@ -9,3 +12,8 @@
JOB_CLASS_DICT['ProtocolHarmonicTILD'] = 'pyiron_contrib.protocol.compound.tild'
JOB_CLASS_DICT['ProtocolHarmonicTILDParallel'] = 'pyiron_contrib.protocol.compound.tild'
JOB_CLASS_DICT['ImageJob'] = 'pyiron_contrib.image.job'

from ._version import get_versions

__version__ = get_versions()["version"]
del get_versions
Loading

0 comments on commit 2b7d358

Please sign in to comment.