Skip to content

Commit

Permalink
Merge pull request #194 from bsipocz/fixing_rename_remnants
Browse files Browse the repository at this point in the history
Fixing rename remnants
  • Loading branch information
nden authored Jun 15, 2016
2 parents f93bb0b + 6479d0c commit b8a7ad6
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 30 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ah_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
2 changes: 1 addition & 1 deletion asdf-standard
2 changes: 1 addition & 1 deletion asdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
4 changes: 2 additions & 2 deletions asdf/_internal_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
34 changes: 22 additions & 12 deletions asdf/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions asdf/tags/transform/polynomial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/asdf/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 2 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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'))
Expand Down

0 comments on commit b8a7ad6

Please sign in to comment.