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

Move Camera into the settings module #252

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

mwcraig
Copy link
Contributor

@mwcraig mwcraig commented Jan 10, 2024

This PR doesn't change any functionality, it simply moves the Camera object from core.py into settings/models.py, and moves the more generic astropy/pydantic stuff into settings/astropy_pydantic.py. Having all the pydantic-related stuff inone place makes a little more sense to me, and perhaps reduces (a tiny bit) the pain of updating to pydantic 2.

@codecov-commenter
Copy link

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (e45b2fa) 55.87% compared to head (f0c5939) 55.90%.
Report is 6 commits behind head on main.

Files Patch % Lines
stellarphot/gui_tools/comparison_functions.py 0.00% 4 Missing ⚠️
stellarphot/settings/astropy_pydantic.py 92.59% 4 Missing ⚠️
stellarphot/core.py 62.50% 3 Missing ⚠️
stellarphot/utils/magnitude_transforms.py 0.00% 3 Missing ⚠️
stellarphot/io/aij.py 0.00% 2 Missing ⚠️
stellarphot/photometry/profiles.py 0.00% 2 Missing ⚠️
stellarphot/transit_fitting/gui.py 0.00% 2 Missing ⚠️
stellarphot/photometry/photometry.py 66.66% 1 Missing ⚠️
stellarphot/settings/models.py 97.61% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #252      +/-   ##
==========================================
+ Coverage   55.87%   55.90%   +0.02%     
==========================================
  Files          24       25       +1     
  Lines        2960     2962       +2     
==========================================
+ Hits         1654     1656       +2     
  Misses       1306     1306              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@JuanCab JuanCab left a comment

Choose a reason for hiding this comment

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

No concerns, I approve this.

Examples
--------
>>> from astropy import units as u
>>> from stellarphot.settings import Camera
Copy link
Contributor

Choose a reason for hiding this comment

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

Good, you caught this change (of course the tests would not pass without it).

Copy link
Contributor

Choose a reason for hiding this comment

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

I confirmed the functions didn't appear to change in their migration.

Copy link
Contributor

Choose a reason for hiding this comment

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

Confirmed Camera model didn't appear to change in migration except as needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Confirmed tests appear to have migrated intact.

@mwcraig mwcraig merged commit 887ad16 into feder-observatory:main Jan 11, 2024
9 checks passed
@mwcraig mwcraig deleted the rearrange-settings branch February 8, 2024 15:26
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.

3 participants