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

Refactor heat.py into a subpackage #129

Merged
merged 3 commits into from
Nov 2, 2022
Merged

Conversation

jzuhone
Copy link
Collaborator

@jzuhone jzuhone commented Oct 4, 2022

Description

heat.py currently contains all of the classes which model heating inputs. Currently, this file is quite bloated, containing all currently used classes, as well as some which are no longer used.

This PR refactors this structure, while leaving the API intact, by changing heat.py into a heat subpackage. The files under heat are now:

  • base.py: base heating classes
  • generic.py: generic heating classes (this could be merged into the one above potentially)
  • solar.py: all of the solar heating classes
  • earth.py: the earthshine in the ACIS radiator FOV code
  • electronics.py: heating from electronics boxes

I also put deprecated classes into a new file, deprecated.py, under the component subpackage.

This PR also:

  • Removes the DpaSolarHeat copy of the SolarHeatHrc class
  • Removes from future import print_function call at the top of heat.py

Interface impacts

Since this is just code reorganization under the hood, but all imports from the xija API should be the same, there should be no interface impacts.

Testing

Unit tests

  • Mac

Independent check of unit tests by @taldcroft

  • Mac

Functional tests

xija_gui_fit and acis_thermal_check tests pass.

@taldcroft
Copy link
Member

@jzuhone - I added a test we should have had long ago which runs every model in chandra_models. With this test in place I'm good with this PR once you do functional tests, without having really checked the refactor details.

@taldcroft
Copy link
Member

@jzuhone - this is just waiting for those quick functional tests. Let's get this in then I can do the black format PR for xija. 😄

@jzuhone
Copy link
Collaborator Author

jzuhone commented Nov 2, 2022

Hi @taldcroft I ran the functional tests and all looks good.

Copy link
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

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

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants