info don't show value for bad __str__ #1748
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
if
__str__
fails duringasdf.info
or returns multiple lines then don't show the value.This fixes the current roman_datamodels downstream job which is failing due to a wcs which contains no transforms which causes gwcs to fail a
__str__
call.A PR is open to fix the
__str__
issue in gwcs: spacetelescope/gwcs#489However even with the above fix the
WCS.__str__
result is a multi-line string which breaksinfo
formatting. To deal with this, this PR also checks the__str__
output for multiple lines and in that case discards the__str__
result.To provide a few examples using a tree containing
gwcs.WCS(output_frame="icrs")
.Without the gwcs PR and with asdf main, asdf.info returns:
With the above gwcs PR with asdf 3.0.1 (the latest release), asdf.info returns:
With the above gwcs PR and asdf main, asdf.info returns (note the break in formatting)
With (or without) the above gwcs PR and with this PR, asdf.info returns:
Note that with this PR time formatting is still preserved (so the issue #1686) fixed by #1687 is still fixed:
Finally, this PR fixes the changelog error where #1687 is listed under the wrong version (see the changelog for 3.0.x).
The weldx downstream error is unrelated (and caused by a new pandas).
Checklist: