Skip to content

Commit 78df4d9

Browse files
authored
Merge pull request #734 from spacetelescope/2.5.1x
2.5.1x
2 parents 29f897c + 6c4b11b commit 78df4d9

6 files changed

Lines changed: 48 additions & 10 deletions

File tree

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ matrix:
7070
# Test against prerelease versions of all dependencies
7171
- env: TOXENV='prerelease'
7272

73+
# Test against an installed asdf package
74+
- env: TOXENV='packaged'
75+
7376
# Try a run on OSX
7477
- os: osx
7578
env: TOXENV='py37-stable'

CHANGES.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2.6 (unreleased)
2+
------------------
3+
4+
- Add ``package`` property to extension metadata, and deprecate
5+
use of ``software``. [#728]
6+
7+
- AsdfDeprecationWarning now subclasses DeprecationWarning. [#710]
8+
9+
2.5.1 (2020-01-07)
10+
------------------
11+
12+
- Fix bug in test causing failure when test suite is run against
13+
an installed asdf package. [#732]
14+
115
2.5.0 (2019-12-23)
216
------------------
317

asdf/tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,4 +428,4 @@ def test_get_default_resolver():
428428

429429
result = resolver('tag:stsci.edu:asdf/core/ndarray-1.0.0')
430430

431-
assert result.endswith("asdf-standard/schemas/stsci.edu/asdf/core/ndarray-1.0.0.yaml")
431+
assert result.endswith("/schemas/stsci.edu/asdf/core/ndarray-1.0.0.yaml")

asdf/tests/test_asdftypes.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ def types(self):
593593

594594
def test_extension_override(tmpdir):
595595

596-
gwcs = pytest.importorskip('gwcs', '0.9.0')
596+
gwcs = pytest.importorskip('gwcs', '0.12.0')
597597

598598
from asdf.extension import default_extensions
599599
default_extensions.reset()
@@ -603,19 +603,19 @@ def test_extension_override(tmpdir):
603603

604604
with asdf.AsdfFile() as aa:
605605
wti = aa.type_index._write_type_indices[version]
606-
assert wti.from_custom_type(gwcs.WCS) is gwcs.tags.WCSType
606+
assert wti.from_custom_type(gwcs.WCS) is gwcs.tags.wcs.WCSType
607607
aa.tree['wcs'] = gwcs.WCS(output_frame='icrs')
608608
aa.write_to(tmpfile)
609609

610610
with open(tmpfile, 'rb') as ff:
611611
contents = str(ff.read())
612-
assert gwcs.tags.WCSType.yaml_tag in contents
612+
assert gwcs.tags.wcs.WCSType.yaml_tag in contents
613613

614614

615615
def test_extension_override_subclass(tmpdir):
616616

617-
gwcs = pytest.importorskip('gwcs', '0.9.0')
618-
astropy = pytest.importorskip('astropy', '3.0.0')
617+
gwcs = pytest.importorskip('gwcs', '0.12.0')
618+
astropy = pytest.importorskip('astropy', '4.0.0')
619619
from astropy.modeling import models
620620

621621
from asdf.extension import default_extensions
@@ -629,16 +629,16 @@ class SubclassWCS(gwcs.WCS):
629629

630630
with asdf.AsdfFile() as aa:
631631
wti = aa.type_index._write_type_indices[version]
632-
assert wti.from_custom_type(gwcs.WCS) is gwcs.tags.WCSType
633-
assert wti.from_custom_type(SubclassWCS) is gwcs.tags.WCSType
632+
assert wti.from_custom_type(gwcs.WCS) is gwcs.tags.wcs.WCSType
633+
assert wti.from_custom_type(SubclassWCS) is gwcs.tags.wcs.WCSType
634634
# The duplication here is deliberate: make sure that nothing has changed
635-
assert wti.from_custom_type(gwcs.WCS) is gwcs.tags.WCSType
635+
assert wti.from_custom_type(gwcs.WCS) is gwcs.tags.wcs.WCSType
636636
aa.tree['wcs'] = SubclassWCS(output_frame='icrs')
637637
aa.write_to(tmpfile)
638638

639639
with open(tmpfile, 'rb') as ff:
640640
contents = str(ff.read())
641-
assert gwcs.tags.WCSType.yaml_tag in contents
641+
assert gwcs.tags.wcs.WCSType.yaml_tag in contents
642642

643643

644644
def test_tag_without_schema(tmpdir):

docs/asdf/changes.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
Changes
55
*******
66

7+
What's New in ASDF 2.5.1?
8+
=========================
9+
10+
The ASDF Standard is at v1.4.0.
11+
12+
Changes include:
13+
14+
- Fix bug in test causing failure when test suite is run against
15+
an installed asdf package.
16+
717
What's New in ASDF 2.5.0?
818
=========================
919

tox.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ commands=
3333
basepython= python3.7
3434
pip_pre= true
3535

36+
[testenv:packaged]
37+
basepython= python3.7
38+
# The default tox working directory is in .tox in the source directory. If we
39+
# execute pytest from there, it will discover tox.ini in the source directory
40+
# and load the asdf module from the unpackaged sourcee, which is not what we
41+
# want. The home directory does not have a tox.ini in any of its ancestors,
42+
# so this will allow us to test the installed package.
43+
changedir= {homedir}
44+
commands=
45+
pytest --pyargs asdf
46+
3647
[testenv:egg_info]
3748
deps=
3849
conda_deps=

0 commit comments

Comments
 (0)