Skip to content

Commit

Permalink
Merge pull request #469 from bourque/add-3.8-and-3.9-support
Browse files Browse the repository at this point in the history
Support python 3.8 and 3.9
  • Loading branch information
bourque authored Feb 19, 2021
2 parents 3471339 + 14d38e3 commit c968c54
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ before_cache:
- rm -rf $HOME/miniconda3/pkgs/cache
- rm -rf $HOME/miniconda3/envs/exoctk-3.6
- rm -rf $HOME/miniconda3/envs/exoctk-3.7
- rm -rf $HOME/miniconda3/envs/exoctk-3.8
- rm -rf $HOME/miniconda3/envs/exoctk-3.9

os:
- linux
Expand All @@ -18,6 +20,8 @@ os:
env:
- PYTHON_VERSION="3.6"
- PYTHON_VERSION="3.7"
- PYTHON_VERSION="3.8"
- PYTHON_VERSION="3.9"

before_install:
- export PATH="$HOME/miniconda3/bin:$PATH"
Expand Down
8 changes: 1 addition & 7 deletions ci/install_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,4 @@ conda config --set always_yes true --set changeps1 false || exit 1
echo "Updating Miniconda"
conda update conda
conda update --all
conda info -a || exit 1

echo "Installing numpy"
conda install numpy
pip install Flask
pip install sphinx
pip install python-dateutil==2.8.0
conda info -a || exit 1
13 changes: 10 additions & 3 deletions ci/setup_conda_env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash
echo "Creating conda environment for Python $PYTHON_VERSION"
conda env create -f "env/environment-${PYTHON_VERSION}.yml" || exit 1
echo "Creating base conda environment for Python $PYTHON_VERSION"
conda create --yes --prefix /home/travis/envs python=$PYTHON_VERSION
conda activate /home/travis/envs

echo "Creating ExoCTK conda environment for Python $PYTHON_VERSION"
conda env update -f "env/environment-${PYTHON_VERSION}.yml" || exit 1
export CONDA_ENV=exoctk-$PYTHON_VERSION
source activate $CONDA_ENV
source activate $CONDA_ENV

echo "The installed environment:"
conda env export
1 change: 1 addition & 0 deletions env/environment-3.6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies:
- numpydoc=1.1.0
- pandas=1.1.3
- paramiko=2.7.2
- pip=20.3.3
- pytest=6.2.2
- python=3.6.7
- pyyaml
Expand Down
3 changes: 2 additions & 1 deletion env/environment-3.7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- defaults
- http://ssb.stsci.edu/astroconda
dependencies:
- astropy=4.0.2
- astropy<4.1
- bokeh=2.2.3
- boto3
- cython=0.29.17
Expand All @@ -20,6 +20,7 @@ dependencies:
- numpydoc=1.1.0
- pandas=1.2.0
- paramiko=2.7.2
- pip=20.3.3
- pytest=6.2.2
- python=3.7.1
- pyyaml
Expand Down
48 changes: 48 additions & 0 deletions env/environment-3.8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: exoctk-3.8
channels:
- defaults
- http://ssb.stsci.edu/astroconda
dependencies:
- astropy<4.1
- bokeh=2.2.3
- boto3
- cython=0.29.21
- docopt=0.6.2
- docutils=0.16
- flake8=3.8.4
- flask=1.1.2
- gunicorn=20.0.4
- h5py=2.10.0
- ipython=7.20.0
- jupyter=1.0.0
- matplotlib=3.3.4
- numpy=1.19.2
- numpydoc=1.1.0
- pandas=1.2.1
- paramiko=2.7.2
- pip=20.3.3
- pytest=6.2.2
- python=3.8.5
- pyyaml
- scipy=1.6.0
- scp=0.13.3
- sphinx=3.4.3
- sqlalchemy=1.3.23
- wtforms=2.3.3
- pip:
- asteval==0.9.22
- astroquery==0.4.1
- awscli
- bandit==1.7.0
- batman-package==2.4.7
- bibtexparser==1.2.0
- corner==2.1.0
- flask_wtf==0.14.3
- lmfit==1.0.2
- platon==5.1.2
- pysiaf==0.10.0
- pysynphot==1.0.0
- sphinx_astropy==1.3
- svo-filters==0.2.16
- werkzeug==0.16.1
- git+https://github.com/spacetelescope/jwst_gtvt.git@cd6bc76f66f478eafbcc71834d3e735c73e03ed5
48 changes: 48 additions & 0 deletions env/environment-3.9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: exoctk-3.9
channels:
- defaults
- http://ssb.stsci.edu/astroconda
dependencies:
- astropy=4.2
- bokeh=2.2.3
- boto3
- cython=0.29.21
- docopt=0.6.2
- flake8=3.8.4
- flask=1.1.2
- h5py=2.10.0
- ipython=7.20.0
- jupyter=1.0.0
- matplotlib=3.3.4
- numpy=1.19.2
- numpydoc=1.1.0
- pandas=1.2.2
- paramiko=2.7.2
- pip=20.3.3
- pytest=6.2.2
- python=3.9.1
- pyyaml
- scipy=1.6.0
- scp=0.13.3
- sphinx=3.4.3
- sqlalchemy=1.3.23
- wtforms=2.3.3
- pip:
- asteval==0.9.22
- astroquery==0.4.1
- awscli
- bandit==1.7.0
- batman-package==2.4.7
- bibtexparser==1.2.0
- corner==2.1.0
- docutils==0.15.2
- flask_wtf==0.14.3
- gunicorn==20.0.4
- lmfit==1.0.2
- platon==5.1.2
- pysiaf==0.10.0
- pysynphot==1.0.0
- sphinx_astropy==1.3
- svo-filters==0.2.16
- werkzeug==0.16.1
- git+https://github.com/spacetelescope/jwst_gtvt.git@cd6bc76f66f478eafbcc71834d3e735c73e03ed5
5 changes: 5 additions & 0 deletions exoctk/tests/test_visibilityPA.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import sys

import pytest

from exoctk.contam_visibility import visibilityPA


@pytest.mark.skipif(sys.version_info > (3, 9), reason='jwst_gtvt does not currently support python>=3.9.')
def test_using_gtvt():
instrument = 'NIRISS'

Expand Down
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup, find_packages

REQUIRES = ['asteval',
'astropy',
'astropy<4.1',
'astroquery',
'bandit',
'bibtexparser',
Expand Down Expand Up @@ -37,10 +37,8 @@
'sqlalchemy',
'svo_filters',
'wtforms',
'werkzeug==0.16.1']

DEPENDENCY_LINKS = [
'git+https://github.com/spacetelescope/jwst_gtvt.git@cd6bc76f66f478eafbcc71834d3e735c73e03ed5']
'werkzeug==0.16.1',
'jwst_gtvt @ git+https://github.com/spacetelescope/jwst_gtvt.git@cd6bc76f66f478eafbcc71834d3e735c73e03ed5']

FILES = []
for root, _, files in os.walk("exoctk"):
Expand All @@ -57,7 +55,6 @@
package_data={
'exoctk': FILES},
install_requires=REQUIRES,
dependency_links=DEPENDENCY_LINKS,
author='The ExoCTK Group',
author_email='exoctk@gmail.com',
license='MIT',
Expand Down

0 comments on commit c968c54

Please sign in to comment.