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

Default to rereading the fields file #488

Merged
merged 9 commits into from
Apr 12, 2018

Conversation

wtgee
Copy link
Member

@wtgee wtgee commented Feb 16, 2018

It's annoying and inconvenient to have to shut down POCS just to read new targets. This changes the default to always reread the target file before scheduling from the scheduling state.

Closes #344

@wtgee wtgee requested a review from jamessynge February 16, 2018 02:40
@codecov
Copy link

codecov bot commented Feb 16, 2018

Codecov Report

Merging #488 into develop will decrease coverage by 2.65%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #488      +/-   ##
===========================================
- Coverage    70.48%   67.83%   -2.66%     
===========================================
  Files           62       62              
  Lines         5418     5419       +1     
  Branches       751      752       +1     
===========================================
- Hits          3819     3676     -143     
- Misses        1392     1544     +152     
+ Partials       207      199       -8
Impacted Files Coverage Δ
pocs/observatory.py 71.15% <ø> (-10.72%) ⬇️
pocs/scheduler/dispatch.py 98.03% <ø> (ø) ⬆️
pocs/state/states/default/scheduling.py 56.52% <0%> (-13.05%) ⬇️
pocs/scheduler/scheduler.py 95.04% <100%> (-0.96%) ⬇️
pocs/state/states/default/pointing.py 14.28% <0%> (-65.31%) ⬇️
pocs/state/states/default/slewing.py 7.69% <0%> (-53.85%) ⬇️
pocs/state/states/default/analyzing.py 6.25% <0%> (-50%) ⬇️
pocs/state/states/default/observing.py 16.66% <0%> (-50%) ⬇️
pocs/state/states/default/tracking.py 66.66% <0%> (-16.67%) ⬇️
... and 12 more

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 064762f...05f2017. Read the comment docs.

@@ -30,6 +30,8 @@ def get_observation(self, time=None, show_all=False, reread_fields_file=False):
defaults to time called
show_all (bool, optional): Return all valid observations along with
merit value, defaults to False to only get top value
reread_fields_file (bool, optional): If the fields file should be reread
Copy link
Contributor

Choose a reason for hiding this comment

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

And the reason for not making the change here in the params list (i.e. default =True).

@wtgee
Copy link
Member Author

wtgee commented Feb 20, 2018

@jamessynge I changed this to a config option, which fixed the tests (coverage went down 2.5% the other way). Let me know what you think of this setup. Thanks.

wtgee added 3 commits April 3, 2018 11:18
and print a message.

This is necessary for when just the priority (or other attribute) of
an observation is changed.
@wtgee wtgee merged commit 2d8120d into panoptes:develop Apr 12, 2018
@wtgee wtgee deleted the default-reread-fields branch April 12, 2018 01:42
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