Skip to content

Commit

Permalink
Merge pull request #312 from HERA-Team/support_py38
Browse files Browse the repository at this point in the history
Support py38
  • Loading branch information
adampbeardsley authored Dec 2, 2019
2 parents 597ec3b + 8b1175c commit 53b59ee
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 21 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ python:
# We don't actually use the Travis Python, but this keeps it organized.
- "2.7"
- "3.6"
- "3.7"
- "3.8"
env:
global:
- COVERALLS_PARALLEL=true
Expand Down Expand Up @@ -30,19 +32,19 @@ install:
- conda info -a

# create environment and install dependencies
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION coveralls
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- conda env update -n test-environment -f environment.yml
- source activate test-environment
- conda install numpy scipy matplotlib astropy scikit-learn h5py coveralls aipy six pycodestyle pydocstyle pytest-cov
# grab newest pyuvdata just in case
- pip install git+https://github.com/RadioAstronomySoftwareGroup/pyuvdata.git
- pip install git+https://github.com/HERA-Team/linsolve.git
- pip install git+https://github.com/HERA-Team/uvtools.git
- pip install git+https://github.com/HERA-Team/hera_cal.git
# install a few extras that we need for tests
- conda install matplotlib coveralls pycodestyle pydocstyle
- conda list
before_script:
- python -c "from pyuvdata import version; version.main()"
script:
- python -m pytest hera_qm --cov=hera_qm --cov-config=.coveragerc --cov-report xml:./coverage.xml --cov-report term
- pycodestyle */*.py hera_qm/tests/*.py --ignore=E501,W503
- pytest --cov-report xml:./coverage.xml --cov-report term
- pycodestyle
- pydocstyle hera_qm/*.py --convention=numpy
after_success:
- coveralls
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ will also be flexible to enable the third goal, and we welcome contributions (se

## Installation
Preferred method of installation for users is simply `pip install .`
(or `pip install git+https://github.com/HERA-Team/hera_qm`). This will install
(or `pip install git+https://github.com/HERA-Team/hera_qm`). This will install
required dependencies. See below for manual dependency management.

### Dependencies
If you are using `conda`, you may wish to install the following dependencies manually
to avoid them being installed automatically by `pip`::

$ conda install -c conda-forge "numpy>=1.10" "astropy>=2.0" "aipy>=3.0rc2" h5py pyuvdata
$ conda install -c conda-forge "numpy>=1.10" "astropy>=2.0.16" "aipy>=3.0rc2" h5py pyuvdata

### Developing
If you are developing `hera_qm`, it is preferred that you do so in a fresh `conda`
environment. The following commands will install all relevant development packages::
Expand All @@ -37,9 +37,9 @@ environment. The following commands will install all relevant development packag
$ conda create -n hera_qm python=3
$ conda activate hera_qm
$ conda env update -n hera_qm -f environment.yml
$ pip install -e .
$ pip install -e .

This will install extra dependencies required for testing/development as well as the
This will install extra dependencies required for testing/development as well as the
standard ones.

### Running Tests
Expand Down
5 changes: 1 addition & 4 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ channels:
- defaults
- conda-forge
dependencies:
- nose
- numpy>=1.10
- pip
- astropy>=2.0
- astropy>=2.0.16
- h5py
- six
- pyuvdata
Expand All @@ -16,5 +15,3 @@ dependencies:
- pytest-cov
- pip:
- git+https://github.com/HERA-Team/hera_cal


10 changes: 9 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@
test=pytest

[tool:pytest]
addopts = --ignore=scripts
addopts = --ignore=scripts --cov=hera_qm --cov-config=.coveragerc

[pycodestyle]
ignore = E501,W503
filename = *.py
exclude = build/,docs/,.pytest_cache,.svn,CVS,.bzr,.hg,.git,__pycache__,dist/,scripts/,hera_qm.egg-info,hera_qm/data/

[pydocstyle]
convention = numpy
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from setuptools import setup
import os, sys
import os
import sys
import os.path as op
import json

sys.path.append('hera_qm')
import version
import version # noqa

data = [version.git_origin, version.git_hash, version.git_description, version.git_branch]
with open(op.join('hera_qm', 'GIT_INFO'), 'w') as outfile:
Expand Down Expand Up @@ -43,7 +44,7 @@ def package_files(package_dir, subdirectory):
'package_data': {'hera_qm': data_files},
'setup_requires': ['pytest-runner'],
'install_requires': [
'astropy>=2.0',
'astropy>=2.0.16',
'h5py',
'six',
'numpy>=1.10',
Expand Down

0 comments on commit 53b59ee

Please sign in to comment.