diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml new file mode 100644 index 0000000000..eea3d42789 --- /dev/null +++ b/.github/workflows/ci_tests.yml @@ -0,0 +1,85 @@ +name: CI + +on: + push: + pull_request: + schedule: + # run every Monday at 5am UTC + - cron: '0 5 * * 1' + +env: + TOXARGS: '-v' + +jobs: + tests: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + include: + + - name: Code style checks + os: ubuntu-latest + python: 3.x + toxenv: codestyle + + - name: docs build + os: ubuntu-latest + python: 3.8 + toxenv: build_docs + + - name: oldest dependencies + os: ubuntu-latest + python: 3.6 + toxenv: py36-test-oldestdeps + + - name: astropy dev with all dependencies with coverage + os: ubuntu-latest + python: 3.9 + toxenv: py39-test-alldeps-devastropy-cov + + - name: Python 3.7 with all optional dependencies (MacOS X) + os: macos-latest + python: 3.7 + toxenv: py37-test-alldeps + + - name: Python 3.8 with mandatory dependencies (Windows) + os: windows-latest + python: 3.8 + toxenv: py38-test + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install Python dependencies + run: python -m pip install --upgrade tox codecov + - name: Run tests + run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} + - name: Upload coverage to codecov + if: ${{ contains(matrix.toxenv,'-cov') }} + uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml + + + egg_info: + name: egg_info with Python 3.7 + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Run egg_info + run: python setup.py egg_info diff --git a/.gitignore b/.gitignore index 9eff357c7f..254786eb63 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,7 @@ distribute-*.tar.gz .*.sw[op] *~ .svn +.tmp # Mac OSX .DS_Store diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e4d3001ed6..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,170 +0,0 @@ -# We set the language to c because the language ends up being -# irrelevant anyway and windows has a very limited support. -# Anyhow, we install Python ourselves using conda. -language: c - -os: - - linux - -# The apt packages below are needed for sphinx builds, which can no longer -# be installed with sudo apt-get. -addons: - apt: - packages: - - graphviz - -stages: - - name: Initial tests - - name: Test docs, astropy dev, and without optional dependencies - - name: Cron tests - if: type = cron - - name: Tests with other Python/Numpy versions - - name: Windows test - - name: Deploy - if: ((branch = master) AND type != pull_request AND type != cron) - - name: Remote data tests - if: type != pull_request - -env: - global: - # The following versions are the 'default' for tests, unless - # overridden underneath. They are defined here in order to save having - # to repeat them for all configurations. - - PYTHON_VERSION=3.7 - - MAIN_CMD='python setup.py' - - NUMPY_VERSION=stable - - ASTROPY_VERSION=stable - - CONDA_DEPENDENCIES='requests beautifulsoup4 html5lib keyring matplotlib jinja2 flask pyvo' - - CONDA_DEPENDENCIES_REMOTE='requests beautifulsoup4 html5lib keyring matplotlib jinja2 flask pyvo' - - PIP_DEPENDENCIES='https://github.com/keflavich/httpbin/archive/master.zip aplpy pyregion regions astropy_healpix mocpy>=0.5.2 pytest-dependency pytest-astropy pyvo' - - HTTP_BIN_CMD="import httpbin; httpbin.app.run()" - - RUN_HTTPBIN='python -c "$HTTP_BIN_CMD" & ACTIVE_HTTPBIN=True' - - SETUP_CMD='test' - - CONDA_CHANNELS='astropy' - - EVENT_TYPE='pull_request push' - - DEBUG=True - # astrometry.net API key - - secure: "al9u/QSQfrwNljdu8gYUaT9z4BxEL1FlE4ntsn6eqtN2Y0rurqll+gq46quYjtE6zgcpb0uYtGIubusJkp7ceE6IBGhQdsel4UY16VIqeEuQ3GpVDb4RiJgU51SAjbmXYV1dMAJnOm4Ra41WzxokStKRDdoRraAsae9zK3H6AnI=" - - -jobs: - - # Don't wait for allowed failures - fast_finish: true - - include: - # Testing remote-data when running builds on master or with - # cron. Starting these early as they take much longer to run. Using - # both short and long versions for remote-data to help test the - # astropy test command. - - os: linux - name: Remote data test with astropy dev, Python 3.7 - stage: Remote data tests - env: EVENT_TYPE='push cron' DEBUG=True ASTROPY_VERSION=dev - SETUP_CMD='test -R -V -a "--durations=50"' - CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_REMOTE - - - stage: Initial tests - name: egg info - env: PYTHON_VERSION=3.7 SETUP_CMD='egg_info' - - - os: osx - name: OSX from cron - stage: Cron tests - env: EVENT_TYPE='cron' - - - os: linux - stage: Initial tests - name: Python 3.7 and all dependencies - env: SETUP_CMD='test --coverage' - - # Check for sphinx doc build warnings - we do this first because it - # may run for a long time - - os: linux - name: Docs build - stage: Test docs, astropy dev, and without optional dependencies - env: SETUP_CMD='build_docs -w' PIP_DEPENDENCIES="$PIP_DEPENDENCIES sphinx-astropy" - - # Try all python versions and Numpy versions. Since we can assume - # that the Numpy developers have taken care of testing Numpy with - # different versions of Python, we can vary Python and Numpy - # versions at the same time. We don't expect any of these to fail in - # master for cron jobs. secretstorage is a keyring dependency, we - # need to pin the version number to make this job work. - # Test the oldest astropy version without optional dependencies. - # Reproject is listed as dependency to avoid upgrading astropy - - os: linux - name: Oldest dependencies - stage: Tests with other Python/Numpy versions - env: PYTHON_VERSION=3.6 NUMPY_VERSION=1.14 KEYRING_VERSION='<12.0' - ASTROPY_VERSION=3.1 DEBUG=True - PIP_DEPENDENCIES="`echo $PIP_DEPENDENCIES reproject==0.5 | sed 's/aplpy/aplpy<2.0/'`" - - os: linux - name: Python 3.6, np 1.15, astropy 3.2 - stage: Tests with other Python/Numpy versions - env: PYTHON_VERSION=3.6 NUMPY_VERSION=1.15 ASTROPY_VERSION=3.2 - - - os: linux - name: Python 3.7, astropy dev - stage: Test docs, astropy dev, and without optional dependencies - env: ASTROPY_VERSION=development EVENT_TYPE='pull_request' - - # Try with optional dependencies disabled - - os: linux - name: Python 3.8, mandatory dependencies only - stage: Test docs, astropy dev, and without optional dependencies - env: PYTHON_VERSION=3.8 - CONDA_DEPENDENCIES='requests beautifulsoup4 html5lib keyring pyvo' - PIP_DEPENDENCIES='https://github.com/keflavich/httpbin/archive/master.zip pytest-astropy' - NUMPY_VERSION=1.16 - - # Do a PEP8 test with pycodestyle - - os: linux - name: Code style - stage: Initial tests - env: MAIN_CMD='pycodestyle astroquery --count' - SETUP_CMD='' EVENT_TYPE='push pull_request' - - # Do the windows test at the end as installing takes a long time - - os: windows - name: Windows test - stage: Windows test - env: PYTHON_VERSION=3.7 SETUP_CMD='test' - - - stage: Deploy - git: - depth: False - env: SETUP_CMD='sdist' EVENT_TYPE='push' - deploy: - provider: pypi - username: astroquery - password: - secure: DtqyQkllGcWuKOVMsu9RWRiobeL8bdpMxwdSYpob4Cqj0D2hLLx3w50qr0qpDCFzioB3rXnhbtPKEzHB+4fTFT/Rjito32fFPUtee2Rw4SCe4YIlS0ksPOTmxkeoh2TQLIYcNPPoI7UpUX6uC65nzgCUTmZVoiCweQE+i5GhEBI= - on: - branch: master - before_install: if [[ ! -z $(echo $TRAVIS_COMMIT_MESSAGE | grep -E "\[nodeploy\]") ]]; then echo "Skipping deployment as indicated by commit message"; travis_terminate 0; fi - - allow_failures: - # Allow remote-data tests to fail. - - os: linux - name: Remote data test with astropy dev, Python 3.7 - stage: Remote data tests - env: EVENT_TYPE='push cron' DEBUG=True ASTROPY_VERSION=dev - SETUP_CMD='test -R -V -a "--durations=50"' - CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_REMOTE - -install: - - git clone git://github.com/astropy/ci-helpers.git - - source ci-helpers/travis/setup_conda.sh - - # https://github.com/travis-ci/travis-ci/issues/8982#issuecomment-354357640 - - if [ $TRAVIS_OS_NAME != windows ]; then python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"; fi - -script: - - $RUN_HTTPBIN - - $MAIN_CMD $SETUP_CMD - -after_success: - - if [[ $SETUP_CMD == 'test --coverage' ]]; then - codecov; - fi diff --git a/MANIFEST.in b/MANIFEST.in index 32a67bad05..14c3eb9595 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,7 +6,9 @@ include astroquery/CITATION include astroquery/splatalogue/data/* include ah_bootstrap.py +include setup.py include setup.cfg +include pyproject.toml recursive-include astroquery *.py recursive-include docs * diff --git a/README.rst b/README.rst index 084182163e..94bee4b327 100644 --- a/README.rst +++ b/README.rst @@ -39,7 +39,7 @@ Installation and Requirements ----------------------------- Astroquery works with Python 3.6 or later. -As an `astropy`_ affiliate, astroquery requires `astropy`_ version 3.1 or later. +As an `astropy`_ affiliate, astroquery requires `astropy`_ version 3.1.2 or later. astroquery uses the `requests `_ module to communicate with the internet. `BeautifulSoup diff --git a/astroquery/__init__.py b/astroquery/__init__.py index 2d4b649094..072ff8d136 100644 --- a/astroquery/__init__.py +++ b/astroquery/__init__.py @@ -27,3 +27,15 @@ def _get_bibtex(): __citation__ = __bibtex__ = _get_bibtex() + + +try: + from .version import version as __version__ +except ImportError: + # TODO: Issue a warning using the logging framework + __version__ = '' +try: + from .version import githash as __githash__ +except ImportError: + # TODO: Issue a warning using the logging framework + __githash__ = '' diff --git a/astroquery/alma/core.py b/astroquery/alma/core.py index 4b87c1055a..0080ffadfc 100644 --- a/astroquery/alma/core.py +++ b/astroquery/alma/core.py @@ -453,7 +453,8 @@ def _get_dataarchive_url(self): response.raise_for_status() # Jan 2017: we have to force https because the archive doesn't # tell us it needs https. - self.dataarchive_url = response.url.replace("/asax/","").replace("/aq/","").replace("http://", "https://") + self.dataarchive_url = response.url.replace( + "/asax/", "").replace("/aq/", "").replace("http://", "https://") else: self.dataarchive_url = self.archive_url elif self.dataarchive_url in ('http://almascience.org', diff --git a/astroquery/mast/cutouts.py b/astroquery/mast/cutouts.py index c2bebbdd46..29df098a1a 100644 --- a/astroquery/mast/cutouts.py +++ b/astroquery/mast/cutouts.py @@ -91,6 +91,7 @@ def _parse_cutout_size(size): return {"x": x, "y": y, "units": units} + class TesscutClass(MastQueryWithLogin): """ MAST TESS FFI cutout query class. diff --git a/astroquery/tests/setup_package.py b/astroquery/tests/setup_package.py index c22054b9c4..83d3bcc1bf 100644 --- a/astroquery/tests/setup_package.py +++ b/astroquery/tests/setup_package.py @@ -3,4 +3,4 @@ def get_package_data(): return { - _ASTROPY_PACKAGE_NAME_ + '.tests': ['coveragerc']} + 'astroquery.tests': ['coveragerc']} diff --git a/astroquery/vo_conesearch/validator/tests/test_inpect.py b/astroquery/vo_conesearch/validator/tests/test_inpect.py index ab7a89ca91..359fe246f9 100644 --- a/astroquery/vo_conesearch/validator/tests/test_inpect.py +++ b/astroquery/vo_conesearch/validator/tests/test_inpect.py @@ -5,7 +5,16 @@ import os # ASTROPY -from astropy.utils.data import _find_pkg_data_path, get_pkg_data_filename +import astropy +from astropy.utils.data import get_pkg_data_filename +from astropy.utils.introspection import minversion + +ASTROPY_LT_4_3 = not minversion(astropy, '4.3') + +if ASTROPY_LT_4_3: + from astropy.utils.data import _find_pkg_data_path as get_pkg_data_path +else: + from astropy.utils.data import get_pkg_data_path # LOCAL from .. import inspect @@ -18,7 +27,7 @@ class TestConeSearchResults: """Inspection of ``TestConeSearchValidation`` results.""" def setup_class(self): self.datadir = 'data' - test_vos_path = _find_pkg_data_path(self.datadir) + os.sep + test_vos_path = get_pkg_data_path(self.datadir) + os.sep # Convert to a proper file:// URL--on *NIXen this is not necessary but # Windows paths will blow up if we don't do this. diff --git a/docs/conf.py b/docs/conf.py index 36233cb4a4..041d343c1e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,13 +40,9 @@ # Load all of the global Astropy configuration from astropy_helpers.sphinx.conf import * -from six.moves import urllib +import urllib -# Get configuration information from setup.cfg -try: - from ConfigParser import ConfigParser -except ImportError: - from configparser import ConfigParser +from configparser import ConfigParser conf = ConfigParser() conf.read([os.path.join(os.path.dirname(__file__), '..', 'setup.cfg')]) @@ -85,7 +81,7 @@ # -- Project information ------------------------------------------------------ # This does not *have* to match the package name, but typically does -project = setup_cfg['package_name'] +project = setup_cfg['name'] author = setup_cfg['author'] copyright = '{0}, {1}'.format( datetime.datetime.now().year, setup_cfg['author']) @@ -94,8 +90,8 @@ # |version| and |release|, also used in various other places throughout the # built documents. -__import__(setup_cfg['package_name']) -package = sys.modules[setup_cfg['package_name']] +__import__(project) +package = sys.modules[project] # The short X.Y version. version = package.__version__.split('-', 1)[0] diff --git a/docs/gallery-examples/example10_mast.py b/docs/gallery-examples/example10_mast.py index be489bfd4e..04458c306a 100644 --- a/docs/gallery-examples/example10_mast.py +++ b/docs/gallery-examples/example10_mast.py @@ -3,11 +3,14 @@ ++++++++++ Retrieve Hubble archival data of M83 and make a figure """ -from astroquery.mast import Mast, Observations + +from astropy.io import fits from astropy.visualization import make_lupton_rgb, ImageNormalize import matplotlib.pyplot as plt import reproject +from astroquery.mast import Observations + result = Observations.query_object('M83') selected_bands = result[(result['obs_collection'] == 'HST') & (result['instrument_name'] == 'WFC3/UVIS') & diff --git a/docs/index.rst b/docs/index.rst index 2c38439614..ebb8bdf87b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -73,7 +73,7 @@ Astroquery works with Python 3.6 or later. The following packages are required for astroquery installation & use: * `numpy `_ >= 1.14 -* `astropy `__ (>=3.1) +* `astropy `__ (>=3.1.2) * `pyVO`_ (>=1.1) * `requests `_ * `keyring `_ diff --git a/pyproject.toml b/pyproject.toml index 9987957245..9157953052 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,3 +2,16 @@ [tool.astropy-bot.changelog_checker] filename = "CHANGES.rst" + +# astroquery still uses astropy-helpers +# but we include pyproject.toml here so that python -m build can +# work out of the box. In setup.py, we manually ensure that +# astropy_helpers can be imported as an additional build time +# dependency. + +[build-system] +requires = ["setuptools", + "wheel", + "numpy", + "astropy"] +build-backend = 'setuptools.build_meta' \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index dd5d7e9f74..be828be622 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,11 +25,11 @@ remote_data_strict = true auto_use = True [metadata] -package_name = astroquery +name = astroquery +version = 0.4.2.dev description = Functions and classes to access online astronomical data resources -long_description = +# FIXME long_description = author = Adam Ginsburg -author_email = license = BSD url = http://astropy.org/astroquery edit_on_github = False @@ -101,3 +101,40 @@ ignore = E226,E402,W503 exclude = _astropy_init.py,version.py [entry_points] + +[options] +install_requires= + numpy + astropy>=3.1.2 + requests>=2.4.3 + beautifulsoup4>=4.3.2 + html5lib>=0.999 + keyring>=4.0 + pyvo>=1.1 + six +tests_require = pytest-astropy + +[options.extras_require] +test= + pytest-astropy + matplotlib + jinja2 + flask + pytest-dependency + httpbin @ https://github.com/keflavich/httpbin/archive/master.zip +docs= + sphinx-astropy +all= + mocpy>=0.5.2 + astropy-healpix + boto3 + regions +# aplpy is not py39 compatible (it requires shapely that doesn't compile +# pyregion is not py39 compatible +all_lt_39= + mocpy>=0.5.2 + regions + pyregion + astropy-healpix + aplpy + boto3 diff --git a/setup.py b/setup.py index a2d8a540e3..1336edda11 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst -import glob import os import sys @@ -9,133 +8,11 @@ sys.path.insert(0, os.path.dirname(__file__)) import ah_bootstrap -from setuptools import setup -#A dirty hack to get around some early import/configurations ambiguities -if sys.version_info[0] >= 3: - import builtins -else: - import __builtin__ as builtins -builtins._ASTROPY_SETUP_ = True - -from astropy_helpers.setup_helpers import ( - register_commands, get_debug_option, get_package_info) -from astropy_helpers.git_helpers import get_git_devstr -from astropy_helpers.version_helpers import generate_version_py - - -# Get some values from the setup.cfg -try: - from ConfigParser import ConfigParser -except ImportError: - from configparser import ConfigParser - -conf = ConfigParser() -conf.read(['setup.cfg']) -metadata = dict(conf.items('metadata')) - -PACKAGENAME = metadata.get('package_name', 'packagename') -DESCRIPTION = metadata.get('description', 'Astropy affiliated package') -AUTHOR = metadata.get('author', '') -AUTHOR_EMAIL = metadata.get('author_email', '') -LICENSE = metadata.get('license', 'unknown') -URL = metadata.get('url', 'http://astropy.org') - -# Get the long description from the package's docstring -__import__(PACKAGENAME) -package = sys.modules[PACKAGENAME] -LONG_DESCRIPTION = package.__doc__ - -# Store the package name in a built-in variable so it's easy -# to get from other parts of the setup infrastructure -builtins._ASTROPY_PACKAGE_NAME_ = PACKAGENAME - -# VERSION should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386) -VERSION = '0.4.2.dev' - -# Indicates if this version is a release version -RELEASE = 'dev' not in VERSION - -if not RELEASE: - VERSION += get_git_devstr(False) +import builtins -# Populate the dict of setup command overrides; this should be done before -# invoking any other functionality from distutils since it can potentially -# modify distutils' behavior. -cmdclassd = register_commands(PACKAGENAME, VERSION, RELEASE) - -# Freeze build information in version.py -generate_version_py(PACKAGENAME, VERSION, RELEASE, - get_debug_option(PACKAGENAME)) - -# Treat everything in scripts except README.rst as a script to be installed -scripts = [fname for fname in glob.glob(os.path.join('scripts', '*')) - if os.path.basename(fname) != 'README.rst'] - - -# Get configuration information from all of the various subpackages. -# See the docstring for setup_helpers.update_package_files for more -# details. -package_info = get_package_info() - -# Add the project-global data -package_info['package_data'].setdefault(PACKAGENAME, []) -package_info['package_data'][PACKAGENAME].append('data/*') - -# These lines are only needed if astroquery acquires command line scripts -# # Define entry points for command-line scripts -# entry_points = {} -# entry_points = {'console_scripts': []} - -# Currently the only entry points installed by Astropy are hooks to -# zest.releaser for doing Astropy's releases -entry_points = {} -for hook in [('prereleaser', 'middle'), ('releaser', 'middle'), - ('postreleaser', 'before'), ('postreleaser', 'middle')]: - hook_ep = 'zest.releaser.' + '.'.join(hook) - hook_name = 'astroquery.release.' + '.'.join(hook) - hook_func = 'astropy.utils.release:' + '_'.join(hook) - entry_points[hook_ep] = ['%s = %s' % (hook_name, hook_func)] - -entry_point_list = conf.items('entry_points') -for entry_point in entry_point_list: - entry_points['console_scripts'].append('{0} = {1}'.format(entry_point[0], - entry_point[1])) - -# Include all .c files, recursively, including those generated by -# Cython, since we can not do this in MANIFEST.in with a "dynamic" -# directory name. -c_files = [] -for root, dirs, files in os.walk(PACKAGENAME): - for filename in files: - if filename.endswith('.c'): - c_files.append( - os.path.join( - os.path.relpath(root, PACKAGENAME), filename)) -package_info['package_data'][PACKAGENAME].extend(c_files) - -required_packages = ['numpy', 'astropy>=3.1', 'requests>=2.4.3', 'keyring>=4.0', - 'beautifulsoup4>=4.3.2', 'html5lib>=0.999', 'six', 'pyvo>=1.1'] +builtins._ASTROPY_SETUP_ = True -extras_require = { - 'test': ['pytest-astropy', 'photutils', 'scipy'] -} +from astropy_helpers.setup_helpers import setup -setup(name=PACKAGENAME, - version=VERSION, - description=DESCRIPTION, - scripts=scripts, - requires=['numpy', 'astropy', 'requests', 'keyring', 'beautifulsoup4', - 'html5lib', 'six', 'pyvo'], - install_requires=required_packages, - include_package_data=True, - provides=[PACKAGENAME], - license=LICENSE, - cmdclass=cmdclassd, - zip_safe=False, - use_2to3=False, - entry_points=entry_points, - extras_require=extras_require, - tests_require=['pytest-astropy'], - **package_info -) +setup() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000000..565d84016b --- /dev/null +++ b/tox.ini @@ -0,0 +1,65 @@ +[tox] +envlist = + py{36,37,38,39}-test{,-alldeps,-oldestdeps}{,-devastropy}{,-cov} + codestyle + build_docs +requires = + setuptools >= 30.3.0 + pip >= 19.3.1 + tox-pypi-filter >= 0.12 +isolated_build = true + + +[testenv] + +# The following option combined with the use of the tox-pypi-filter above allows +# project-wide pinning of dependencies, e.g. if new versions of pytest do not +# work correctly with pytest-astropy plugins. Most of the time the pinnings file +# should be empty. +pypi_filter = https://raw.githubusercontent.com/astropy/ci-helpers/master/pip_pinnings.txt + +# Pass through the following environment variables which are needed for the CI +passenv = HOME WINDIR CI + +# Run the tests in a temporary directory to make sure that we don't import +# astropy from the source tree +changedir = .tmp/{envname} + +description = run tests + +deps = + devastropy: git+https://github.com/astropy/astropy.git#egg=astropy + +# TODO: Add more versions to oldestdeps + oldestdeps: astropy==3.1 + +extras = + test + !py39-alldeps: all_lt_39 + py39-alldeps: all + +commands = + pip freeze +# FIXME: there are too many failures from the docs example gallery ignore docs for now +# !cov: pytest {toxinidir}/astroquery {toxinidir}/docs + !cov: pytest {toxinidir}/astroquery + cov: pytest {toxinidir}/astroquery --cov {toxinidir}/astroquery + cov: coverage xml -o {toxinidir}/coverage.xml + +[testenv:codestyle] +changedir = {toxinidir} +skip_install = true +description = check code style +deps = pycodestyle +commands = pycodestyle astroquery --count + + +[testenv:build_docs] +changedir = +description = Building the narrative and API docs +extras = docs +requires = + sphinx +commands = + pip freeze + python setup.py build_sphinx -W