diff --git a/.travis.yml b/.travis.yml index dbb1b8ca..65fc1b39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 diff --git a/README.md b/README.md index 80d16f96..abfde052 100644 --- a/README.md +++ b/README.md @@ -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:: @@ -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 diff --git a/environment.yml b/environment.yml index c6842cc8..44395943 100644 --- a/environment.yml +++ b/environment.yml @@ -3,10 +3,9 @@ channels: - defaults - conda-forge dependencies: - - nose - numpy>=1.10 - pip - - astropy>=2.0 + - astropy>=2.0.16 - h5py - six - pyuvdata @@ -16,5 +15,3 @@ dependencies: - pytest-cov - pip: - git+https://github.com/HERA-Team/hera_cal - - diff --git a/setup.cfg b/setup.cfg index c6bfb182..4274b292 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/setup.py b/setup.py index 7a5e65af..b27fc473 100644 --- a/setup.py +++ b/setup.py @@ -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: @@ -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',