-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecate asdf.tests.helpers #1440
deprecate asdf.tests.helpers #1440
Conversation
If this is the case, please open PRs on Also, have you checked the if the new warnings are raised in the rest of the downstream tests? The three packages you list here are simply the ones which turn warnings into errors. I would like to cover off these changes in the rest of the downstream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After an offline conversation with @braingram, it was explained that his analysis indicates that they only downstream uses of asdf.tests.helpers
were in astropy
, specutils
, and asdf-astropy
which already have solution paths planned.
Given this analysis, I retract my previous comments (aside from removing the single suppression from the downstream tox).
These changes look good to me otherwise.
asdf.tests.helpers is being deprecated in: asdf-format/asdf#1440
asdf.tests.helpers will be deprecated: asdf-format/asdf#1440 The uses in specutils are limited to assert_roundtrip_tree A similar roundtrip_object exists in asdf.testing.helpers which serializes then deserializes an object (without asserting equality). This commit replaces the uses of assert_roundtrip_tree with roundtrip_object and uses the equality comparison built into the custom asdf types implemented in this module to check for equality. These equality comparisons are the same checks that were used internally by assert_roundtrip_tree.
Fixes #1363 |
@WilliamJamieson I opened PRs: I converted them both to draft in case we'd like to rename testing.helpers. I'm inclined to leave it as is but don't feel strongly. If you'd like to change the name I don't have any objection. |
* change asdf.tests.helpers to asdf.testing.helpers asdf.tests.helpers will be deprecated: asdf-format/asdf#1440 The uses in specutils are limited to assert_roundtrip_tree A similar roundtrip_object exists in asdf.testing.helpers which serializes then deserializes an object (without asserting equality). This commit replaces the uses of assert_roundtrip_tree with roundtrip_object and uses the equality comparison built into the custom asdf types implemented in this module to check for equality. These equality comparisons are the same checks that were used internally by assert_roundtrip_tree. * fix codestyle and typo in xfailed test * add comment with github link to xfailed SpectralAxis test
The current users of asdf.tests.helpers (outside this repo) are (with 1 example from each):
The uses in the deprecated astropy.io.misc.asdf are ignored.
specutils uses
assert_roundtrip_tree
to test that object serialization then deserialization results in an equivalent object.asdf.testing.roundtrip_object
can be used but requires either using theassert_equal
class method defined on the spectra, implementation of an equality operator or a similar test to verify that the deserialized object is 'equal' (it currently relies on a feature ofassert_roundtrip_tree
which checks for theassert_equal
class method of the custom type).asdf-astropy uses
yaml_to_asdf
. An alternative, drop in replacement exists inasdf.testing.helpers
.