From 3ed2b255f50d1de20103b79e3cca0e5e30e198d3 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Wed, 13 Apr 2016 13:06:14 +0100 Subject: [PATCH 1/7] Changing any more reference of pyasdf to asdf --- asdf/__init__.py | 2 +- asdf/_internal_init.py | 4 ++-- asdf/tags/transform/polynomial.py | 6 +++--- setup.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) 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/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/setup.py b/setup.py index 77436c97b..9bb944658 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ 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) From 1bdae69c7456e0c862617ff67c58140c2404f955 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Wed, 13 Apr 2016 13:06:45 +0100 Subject: [PATCH 2/7] Submodule update to follow the pyasdf --> asdf rename --- asdf-standard | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 8381bbe40295058863b3d393682138b574f76f9d Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Wed, 13 Apr 2016 16:42:14 +0100 Subject: [PATCH 3/7] remove adjust_compiler --- setup.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 9bb944658..66b6d34e2 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ 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')) From 49ec150b7cd60fa3e615af3eb56e561e106df093 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Wed, 13 Apr 2016 16:44:42 +0100 Subject: [PATCH 4/7] Adding asdf version number to test header, and reorder imports in conftest --- asdf/conftest.py | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) 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 From dd27a7628c0703ed72b4547cdbd6b8ecbbf321b3 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Wed, 13 Apr 2016 16:18:35 +0100 Subject: [PATCH 5/7] Update astropy-helpers to v1.1.2 --- ah_bootstrap.py | 2 +- astropy_helpers | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/astropy_helpers b/astropy_helpers index 161773fa7..d8f489014 160000 --- a/astropy_helpers +++ b/astropy_helpers @@ -1 +1 @@ -Subproject commit 161773fa72d916c498e0a2a513ecc24460244ac8 +Subproject commit d8f48901442e4056879c4249e73ecd7d04a28282 From 8c86f5d77067064d56188cfe23504ba8ec53aaa7 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Wed, 13 Apr 2016 18:38:45 +0100 Subject: [PATCH 6/7] Ignoring exception testing as it is different between py2 and py3 and doctest won't work for both --- docs/asdf/examples.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 6479d0c5564887b837b2f58b12eea6cf65ecaba2 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Thu, 14 Apr 2016 00:19:00 +0100 Subject: [PATCH 7/7] Fixing sphinx version to be <1.3.5 until issue #192 is solved. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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