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

DM-42636: Use class methods for Instrument constructors #402

Merged
merged 7 commits into from
Feb 29, 2024
Merged

Conversation

timj
Copy link
Member

@timj timj commented Feb 1, 2024

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.61%. Comparing base (14962cd) to head (185cd8d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #402      +/-   ##
==========================================
+ Coverage   82.45%   82.61%   +0.15%     
==========================================
  Files          91       91              
  Lines       10501    10519      +18     
  Branches     1989     1993       +4     
==========================================
+ Hits         8659     8690      +31     
+ Misses       1488     1476      -12     
+ Partials      354      353       -1     

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

Copy link
Member

@TallJimbo TallJimbo left a comment

Choose a reason for hiding this comment

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

Changes look good, but I wonder if they'd be better in the obs_base Instrument subclass, to make pipe_base assume our dimension universe a bit less.

python/lsst/pipe/base/_instrument.py Outdated Show resolved Hide resolved
@timj timj force-pushed the tickets/DM-42636 branch 3 times, most recently from f85f418 to c443ded Compare February 27, 2024 18:55
python/lsst/pipe/base/_instrument.py Outdated Show resolved Hide resolved
@timj timj force-pushed the tickets/DM-42636 branch 2 times, most recently from 1ae8e23 to 17da00c Compare February 28, 2024 22:01
@timj timj changed the title DM-42636: Add Instrument.group_name_to_group_id() DM-42636: Use class methods for Instrument constructors Feb 28, 2024
timj added 3 commits February 28, 2024 15:22
This means that if you call InstrumentSubClass.from_string() the
return value is now checked to make sure it is a subclass
of InstrumentSubClass and not generically Instrument.
@timj timj merged commit ec6dfec into main Feb 29, 2024
13 checks passed
@timj timj deleted the tickets/DM-42636 branch February 29, 2024 21:46
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