AstroHuntsman / huntsman-pocs

POCS on the Huntsman Telescope
MIT License
7 stars 8 forks source link

Fix nested-field observation #408

Closed danjampro closed 3 years ago

danjampro commented 3 years ago

The POCS scheduler requires all field objects to be astropy FixedTarget instances. This means observation.field should always return a huntsman.pocs.scheduler.field.Field object, rather than e.g. a huntsman.pocs.scheduler.field.CompoundField. This was problematic when creating nested CompoundField objects, as observation.field currently would return an instance of huntsman.pocs.scheduler.field.CompoundField.

Logic and docstrings updated accordingly. Do not merge until tested on Huntsman and new unit tests are added.

codecov[bot] commented 3 years ago

Codecov Report

Merging #408 (4d746e5) into develop (18cdc60) will increase coverage by 0.58%. The diff coverage is 100.00%.

:exclamation: Current head 4d746e5 differs from pull request most recent head 9b19995. Consider uploading reports for the commit 9b19995 to get more accurate results Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #408      +/-   ##
===========================================
+ Coverage    54.75%   55.34%   +0.58%     
===========================================
  Files           62       62              
  Lines         3689     3733      +44     
  Branches       380      386       +6     
===========================================
+ Hits          2020     2066      +46     
+ Misses        1583     1582       -1     
+ Partials        86       85       -1     
Impacted Files Coverage Δ
src/huntsman/pocs/scheduler/observation/base.py 74.49% <100.00%> (+2.03%) :arrow_up:
tests/test_scheduler.py 100.00% <100.00%> (ø)
src/huntsman/pocs/archive/archiver.py 90.65% <0.00%> (+1.86%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 18cdc60...9b19995. Read the comment docs.