Skip to content
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

import bytes2human directly from stdatamodels #8325

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Mar 1, 2024

resample uses bytes2human from jwst.lib.basic_utils which imports this function from stdatamodels.jwst.library.basic_utils.

This PR updates the import to get bytes2human from stdatamodels directly and removes bytes2human and deprecate_class from basic_utils. These are internal functions that don't occur in basic_utils.__all__ or the docs. A follow-up PR will deprecate and eventually remove deprecate_class from stdatamodels.

Checklist for maintainers

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • Make sure the JIRA ticket is resolved properly

@braingram braingram marked this pull request as ready for review March 1, 2024 20:17
@braingram braingram requested a review from a team as a code owner March 1, 2024 20:17
@braingram
Copy link
Collaborator Author

Regression tests showed 2 unrelated errors:
https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1256/

[stable-deps] test_nirspec_missing_msa_fail – jwst.regtest.test_nirspec_exceptions4s
[stable-deps] test_nirspec_missing_msa_nofail – jwst.regtest.test_nirspec_exceptions

both related to missing log message likely due to stpipe logging

@nden
Copy link
Collaborator

nden commented Mar 3, 2024

romancal has a copy of this function. Move it to stcal?

@braingram
Copy link
Collaborator Author

romancal has a copy of this function. Move it to stcal?

(another) great idea :)

I opened an issue for stcal: spacetelescope/stcal#246

Once bytes2human is added to stcal a follow-up PR for jwst can update the import to use the function from stcal.

@hbushouse hbushouse merged commit dcc464f into spacetelescope:master Mar 5, 2024
26 checks passed
@braingram braingram deleted the basic_utils branch March 5, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants