From 789a651b5d5fb4e29893078114cade82414be2de Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Sun, 31 May 2015 15:13:45 +0200 Subject: [PATCH] Updated infrastructure files to package-template 1.0 --- .travis.yml | 9 +++------ MANIFEST.in | 7 ++++--- README.md | 2 ++ docs/conf.py | 2 +- reproject/_astropy_init.py | 4 ++-- reproject/conftest.py | 18 +++++++++++------- setup.py | 2 -- 7 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index d5e0171ad..faaaa3cf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,11 +22,9 @@ env: matrix: include: - # Do a coverage test in Python 2. This requires the latest - # development version of Astropy, which fixes some issues with - # coverage testing in affiliated packages. + # Do a coverage test in Python 2. - python: 2.7 - env: ASTROPY_VERSION=development SETUP_CMD='test --coverage' OPTIONAL_DEPS=true + env: SETUP_CMD='test --coverage' OPTIONAL_DEPS=true # Check for sphinx doc build warnings - we do this first because it # may run for a long time @@ -117,5 +115,4 @@ script: - python setup.py $SETUP_CMD after_success: - # Uncomment line below if coveralls.io is set up for this package. - - if [[ $SETUP_CMD == 'test --coverage' ]]; then coveralls; fi + - if [[ $SETUP_CMD == 'test --coverage' ]]; then coveralls --rcfile='reproject/tests/coveragerc'; fi diff --git a/MANIFEST.in b/MANIFEST.in index 69187695d..7337c1e9f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,17 +6,18 @@ include ez_setup.py include ah_bootstrap.py include setup.cfg +recursive-include *.pyx *.c *.pxd recursive-include docs * recursive-include licenses * recursive-include cextern * recursive-include scripts * -prune docs/_build prune build +prune docs/_build +prune docs/api recursive-include astropy_helpers * exclude astropy_helpers/.git exclude astropy_helpers/.gitignore -exclude *.pyc *.o -prune docs/api +global-exclude *.pyc *.o diff --git a/README.md b/README.md index 9f9b9451d..f7cceeaf7 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ For more information, including on how to install the package, see http://reproj ![screenshot](docs/images/index-4.png) +![Powered by Astropy Badge](http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat) + Note on license =============== diff --git a/docs/conf.py b/docs/conf.py index 009a3c26a..9160ebc3d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -139,7 +139,7 @@ ## -- Options for the edit_on_github extension ---------------------------------------- if eval(setup_cfg.get('edit_on_github')): - extensions += ['astropy.sphinx.ext.edit_on_github'] + extensions += ['astropy_helpers.sphinx.ext.edit_on_github'] versionmod = __import__(setup_cfg['package_name'] + '.version') edit_on_github_project = setup_cfg['github_project'] diff --git a/reproject/_astropy_init.py b/reproject/_astropy_init.py index f65338635..6d94a38bd 100644 --- a/reproject/_astropy_init.py +++ b/reproject/_astropy_init.py @@ -86,8 +86,8 @@ def test(package=None, test_path=None, args=None, plugins=None, open_files : bool, optional Fail when any tests leave files open. Off by default, because - this adds extra run time to the test suite. Works only on - platforms with a working ``lsof`` command. + this adds extra run time to the test suite. Requires the + `psutil `_ package. parallel : int, optional When provided, run the tests in parallel on the specified diff --git a/reproject/conftest.py b/reproject/conftest.py index 27f6981f6..26eaa557a 100644 --- a/reproject/conftest.py +++ b/reproject/conftest.py @@ -5,16 +5,13 @@ import os from astropy.tests.pytest_plugins import * -from . import version - - # Uncomment the following line to treat all DeprecationWarnings as # exceptions enable_deprecations_as_exceptions() -# Add astropy to test header information and remove unused packages. -# Pytest header customisation was introduced in astropy 1.0. - +# Uncomment and customize the following lines to add/remove entries +# from the list of packages for which version numbers are displayed +# when running the tests try: PYTEST_HEADER_MODULES['Astropy'] = 'astropy' del PYTEST_HEADER_MODULES['h5py'] @@ -22,8 +19,15 @@ except NameError: # needed to support Astropy < 1.0 pass +# Uncomment the following lines to display the version number of the +# package rather than the version number of Astropy in the top line when +# running the tests. +import os + +# This is to figure out the affiliated package version, rather than +# using Astropy's +from . import version -# This is to figure out reproject version, rather than using Astropy's try: packagename = os.path.basename(os.path.dirname(__file__)) TESTED_VERSIONS[packagename] = version.version diff --git a/setup.py b/setup.py index 05131bc21..6ded0a602 100755 --- a/setup.py +++ b/setup.py @@ -94,9 +94,7 @@ version=VERSION, description=DESCRIPTION, scripts=scripts, - requires=['astropy'], install_requires=['astropy'], - provides=[PACKAGENAME], author=AUTHOR, author_email=AUTHOR_EMAIL, license=LICENSE,