-
Notifications
You must be signed in to change notification settings - Fork 49
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
Updates to current_time #684
Conversation
wtgee
commented
Oct 7, 2018
•
edited
Loading
edited
- Behavior change Increment by one second after reading value. Helps with test problems due to colliding filenames coming from the camera simulator. Also slightly more "realistic"
- Docs updates
* Increment by one second after reading value. * Docs updates
Codecov Report
@@ Coverage Diff @@
## develop #684 +/- ##
===========================================
+ Coverage 77.86% 77.86% +<.01%
===========================================
Files 61 61
Lines 5073 5069 -4
Branches 694 695 +1
===========================================
- Hits 3950 3947 -3
+ Misses 914 912 -2
- Partials 209 210 +1
Continue to review full report at Codecov.
|
@@ -148,6 +148,10 @@ class PocsShell(Cmd): | |||
"""Setup and initialize a POCS instance.""" | |||
simulator = listify(arg[0].split()) | |||
|
|||
if 'POCSTIME' in os.environ: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious what motivated this addition? Not asking for a change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the PR description: "Helps with test problems due to colliding filenames coming from the camera simulator. Also slightly more 'realistic'"
@@ -184,14 +184,14 @@ def test_standard_headers(observatory): | |||
'latitude': 19.54, | |||
'longitude': -155.58, | |||
'moon_fraction': 0.7880103086091879, | |||
'moon_separation': 156.1607340087774, | |||
'moon_separation': 148.34401, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem unrelated to the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, not sure what is going on here. Commit message was: "@wtgee Changing moon values for this test. Not sure why needed "
pocs/utils/__init__.py
Outdated
@@ -49,6 +63,8 @@ def current_time(flatten=False, datetime=False, pretty=False): | |||
|
|||
if pocs_time is not None and pocs_time > '': | |||
_time = Time(os.getenv('POCSTIME')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why repeat the call to getenv, rather than use the pocs_time
variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too much copy/paste, too little thinking. :)