Skip to content

TST: Unit str compatibility with astropy 5.3 - #2077

Merged
pllim merged 1 commit into
spacetelescope:mainfrom
pllim:fix-astropy-dev-units-doctest
Mar 14, 2023
Merged

pllim merged 1 commit into
spacetelescope:mainfrom
pllim:fix-astropy-dev-units-doctest

Conversation

@pllim

@pllim pllim commented Mar 13, 2023 •

Copy link
Copy Markdown
Contributor

Description

This pull request is to address upstream changes made by astropy/astropy#14439 so our dev job passes again.

Fix #2076

Blocked by:

Change log entry

  • Is a change log needed? If yes, is it added to CHANGES.rst? If you want to avoid merge conflicts,
    list the proposed change log here for review and add to CHANGES.rst before merge. If no, maintainer
    should add a no-changelog-entry-needed label.

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

because str now reordered.
@pllim pllim added testing trivial Only needs one approval instead of two no-changelog-entry-needed changelog bot directive backport-v3.3.x labels Mar 13, 2023
@pllim pllim added this to the 3.3.2 milestone Mar 13, 2023
@codecov

codecov Bot commented Mar 13, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 91.89% and project coverage change: -0.02 ⚠️

Comparison is base (d799959) 92.13% compared to head (beb4ff7) 92.12%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2077      +/-   ##
==========================================
- Coverage   92.13%   92.12%   -0.02%     
==========================================
  Files         140      140              
  Lines       15431    15444      +13     
==========================================
+ Hits        14218    14228      +10     
- Misses       1213     1216       +3     
Impacted Files Coverage Δ
...aviz/configs/cubeviz/plugins/tests/test_parsers.py 97.95% <80.00%> (-2.05%) ⬇️
jdaviz/configs/imviz/plugins/viewers.py 91.13% <100.00%> (ø)
jdaviz/configs/imviz/tests/test_line_profile_xy.py 100.00% <100.00%> (ø)
jdaviz/configs/imviz/tests/test_parser.py 100.00% <100.00%> (ø)
jdaviz/models/physical_models.py 91.74% <100.00%> (+0.07%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pllim

pllim commented Mar 13, 2023

Copy link
Copy Markdown
Contributor Author

Tsk tsk dev failure now caused by ASDF but we cannot get rid of it until #2052 is merged.

Comment thread jdaviz/models/physical_models.py Resolved
@pllim

pllim commented Mar 14, 2023

Copy link
Copy Markdown
Contributor Author

I need these gone so I can ponder #2052 properly, so I am just going to merge it.

@pllim
pllim merged commit 60bb7e9 into spacetelescope:main Mar 14, 2023
@pllim
pllim deleted the fix-astropy-dev-units-doctest branch March 14, 2023 17:31
@lumberbot-app

This comment was marked as resolved.

pllim added a commit to pllim/jdaviz that referenced this pull request Mar 14, 2023
…ts-doctest

TST: Unit str compatibility with astropy 5.3
(cherry picked from commit 60bb7e9)
Comment on lines +52 to +55
if ASTROPY_LT_5_3:
flux_unit_str = "erg / (Angstrom cm2 s)"
else:
flux_unit_str = "erg / (Angstrom s cm2)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this be useful moved to the top of the test or even somewhere that can be shared across tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. While they are the same now, nothing stops us from using data of different units for those tests going forward. It is not a requirement that those tests must all share the same flux unit. Just a coincidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cubeviz no-changelog-entry-needed changelog bot directive testing trivial Only needs one approval instead of two

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TST: Failures due to astropy unit string reorder

2 participants