diff --git a/.travis.yml b/.travis.yml index f2de0cc6d..6b0598ae9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,8 +36,10 @@ matrix: # Check for sphinx doc build warnings - we do this first because it # may run for a long time + # Sphinx version is temporarily fix to be <1.3.5, until #192 is + # resolved - python: 2.7 - env: SETUP_CMD='build_sphinx -w' + env: SETUP_CMD='build_sphinx -w' SPHINX_VERSION='<1.3.5' # Try older numpy versions - python: 2.7 diff --git a/ah_bootstrap.py b/ah_bootstrap.py index 7e145e3d0..0dc50071b 100644 --- a/ah_bootstrap.py +++ b/ah_bootstrap.py @@ -409,7 +409,7 @@ def get_local_file_dist(self): def get_index_dist(self): if not self.download: log.warn('Downloading {0!r} disabled.'.format(DIST_NAME)) - return False + return None log.warn( "Downloading {0!r}; run setup.py with the --offline option to " diff --git a/asdf-standard b/asdf-standard index 4ceda981a..3e11acc1a 160000 --- a/asdf-standard +++ b/asdf-standard @@ -1 +1 @@ -Subproject commit 4ceda981a72db5fc262e694f7ac7a3e8a3ad3e2f +Subproject commit 3e11acc1a99454f6f88eded4e5c7555eb6e7f917 diff --git a/asdf/__init__.py b/asdf/__init__.py index 018112f11..cc062f95c 100644 --- a/asdf/__init__.py +++ b/asdf/__init__.py @@ -14,7 +14,7 @@ from ._internal_init import * # ---------------------------------------------------------------------------- -if _PYASDF_SETUP_ is False: +if _ASDF_SETUP_ is False: __all__ = ['AsdfFile', 'AsdfType', 'AsdfExtension', 'Stream', 'open', 'test', 'commands', 'ValidationError'] diff --git a/asdf/_internal_init.py b/asdf/_internal_init.py index a1aacb63c..1c80c1556 100644 --- a/asdf/_internal_init.py +++ b/asdf/_internal_init.py @@ -7,14 +7,14 @@ # this indicates whether or not we are in the package's setup.py try: - _PYASDF_SETUP_ + _ASDF_SETUP_ except NameError: from sys import version_info if version_info[0] >= 3: import builtins else: import __builtin__ as builtins - builtins._PYASDF_SETUP_ = False + builtins._ASDF_SETUP_ = False try: from .version import version as __version__ diff --git a/asdf/conftest.py b/asdf/conftest.py index 9ca8533e1..04a972675 100644 --- a/asdf/conftest.py +++ b/asdf/conftest.py @@ -9,11 +9,31 @@ from astropy.tests.pytest_plugins import * -## Uncomment the following line to treat all DeprecationWarnings as -## exceptions +import multiprocessing +import os +import shutil +import tempfile + +import pytest + +import six + +from .extern.RangeHTTPServer import RangeHTTPRequestHandler + +# This is to figure out the affiliated package version, rather than +# using Astropy's +from . import version + +packagename = os.path.basename(os.path.dirname(__file__)) +TESTED_VERSIONS[packagename] = version.version + + +# Uncomment the following line to treat all DeprecationWarnings as +# exceptions enable_deprecations_as_exceptions() try: + PYTEST_HEADER_MODULES['Astropy'] = 'astropy' PYTEST_HEADER_MODULES['jsonschema'] = 'jsonschema' PYTEST_HEADER_MODULES['pyyaml'] = 'yaml' PYTEST_HEADER_MODULES['six'] = 'six' @@ -24,16 +44,6 @@ pass -import multiprocessing -import os -import shutil -import tempfile - -import pytest - -import six - -from .extern.RangeHTTPServer import RangeHTTPRequestHandler def run_server(queue, tmpdir, handler_class): # pragma: no cover diff --git a/asdf/tags/transform/polynomial.py b/asdf/tags/transform/polynomial.py index 34e9a40ab..15e98069a 100644 --- a/asdf/tags/transform/polynomial.py +++ b/asdf/tags/transform/polynomial.py @@ -25,7 +25,7 @@ def from_tree_transform(cls, node, ctx): offset = node['offset'] if not np.isscalar(offset): raise NotImplementedError( - "Pyasdf currently only supports scalar inputs to Shift transform.") + "Asdf currently only supports scalar inputs to Shift transform.") return modeling.models.Shift(offset) @@ -56,7 +56,7 @@ def from_tree_transform(cls, node, ctx): factor = node['factor'] if not np.isscalar(factor): raise NotImplementedError( - "Pyasdf currently only supports scalar inputs to Scale transform.") + "Asdf currently only supports scalar inputs to Scale transform.") return modeling.models.Scale(factor) @@ -106,7 +106,7 @@ def from_tree_transform(cls, node, ctx): model = modeling.models.Polynomial2D(degree, **coeffs) else: raise NotImplementedError( - "Pyasdf currently only supports 1D or 2D polynomial transform.") + "Asdf currently only supports 1D or 2D polynomial transform.") return model @classmethod diff --git a/astropy_helpers b/astropy_helpers index 161773fa7..d8f489014 160000 --- a/astropy_helpers +++ b/astropy_helpers @@ -1 +1 @@ -Subproject commit 161773fa72d916c498e0a2a513ecc24460244ac8 +Subproject commit d8f48901442e4056879c4249e73ecd7d04a28282 diff --git a/docs/asdf/examples.rst b/docs/asdf/examples.rst index 8b845cf5f..f9133c5a3 100644 --- a/docs/asdf/examples.rst +++ b/docs/asdf/examples.rst @@ -69,7 +69,7 @@ will complain:: >>> from asdf import AsdfFile >>> tree = {'data': 'Not an array'} - >>> AsdfFile(tree) + >>> AsdfFile(tree) # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValidationError: mismatched tags, wanted @@ -86,7 +86,7 @@ intermediate state:: >>> ff.tree['data'] = 'Not an array' >>> # The ASDF file is now invalid, but asdf will tell us when >>> # we write it out. - >>> ff.write_to('test.asdf') + >>> ff.write_to('test.asdf') # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ValidationError: mismatched tags, wanted diff --git a/setup.py b/setup.py index 77436c97b..66b6d34e2 100755 --- a/setup.py +++ b/setup.py @@ -13,10 +13,10 @@ import builtins else: import __builtin__ as builtins -builtins._PYASDF_SETUP_ = True +builtins._ASDF_SETUP_ = True from astropy_helpers.setup_helpers import ( - register_commands, adjust_compiler, get_debug_option, get_package_info) + 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 @@ -64,10 +64,6 @@ def _null_validate(self): # modify distutils' behavior. cmdclassd = register_commands('asdf', VERSION, RELEASE) -# Adjust the compiler in case the default on this platform is to use a -# broken one. -adjust_compiler('asdf') - # Freeze build information in version.py generate_version_py('asdf', VERSION, RELEASE, get_debug_option('asdf'))