-
Notifications
You must be signed in to change notification settings - Fork 1
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
Now processes a full continuity (science + vehicle commands) load as … #22
Conversation
…vehicle only if commanded
@@ -329,7 +339,7 @@ def get_CR_bs_cmds(self, oflsdir): | |||
into the master list. | |||
|
|||
""" | |||
backstop_file_path = globfile(os.path.join(oflsdir, 'CR[0-9]*.backstop')) |
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.
Did you mean to change this?
|
||
#---------------------- NORMAL ---------------------------------------- | ||
# If the PRESENT (i.e. NOT Continuity) load type is "normal" then grab | ||
# the continuity command set and concatenate those commands to the start of | ||
# the Master List. | ||
if present_load_type.upper() == 'NORMAL': | ||
if (present_load_type.upper() == 'NORMAL') or\ |
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.
Shorter version of this:
if (present_load_type.upper() == 'NORMAL') or\ | |
if present_load_type.upper() in ['NORMAL', 'VO_NORMAL']: |
@@ -516,8 +536,9 @@ def Assemble_History(self, ofls_dir, tbegin, interrupt=False): | |||
# the continuity command set, trim the command set to exclude those | |||
# Commands discarded by the TOO cut, concatenate the remaining | |||
# continuity commands to the start of the Master List. | |||
elif present_load_type.upper() == 'TOO': | |||
self.logger.debug('Processing TOO at date: %s' % (scs107_date)) | |||
elif (present_load_type.upper() == 'TOO') or \ |
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.
elif (present_load_type.upper() == 'TOO') or \ | |
elif present_load_type.upper() in ['TOO', 'VO_TOO']: |
@@ -595,9 +617,10 @@ def Assemble_History(self, ofls_dir, tbegin, interrupt=False): | |||
# - Trim those before the SCS-107 time and any after the Review Load start time | |||
# - Concat to master_list and sort | |||
# | |||
elif present_load_type.upper() == 'SCS-107': | |||
elif (present_load_type.upper() == 'SCS-107') or \ |
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.
elif (present_load_type.upper() == 'SCS-107') or \ | |
elif present_load_type.upper() in ['SCS-107', 'VO_SCS-107']: |
@@ -270,7 +279,8 @@ def get_continuity_file_info(self, oflsdir): | |||
|
|||
# If the review load type is not "Normal", grab the interrupt time | |||
# or set the interrupt time to "None" | |||
if review_load_type.upper() != "NORMAL": | |||
if (review_load_type.upper() != 'NORMAL') and \ |
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.
if (review_load_type.upper() != 'NORMAL') and \ | |
if review_load_type.upper() in ['NORMAL', 'VO_NORMAL']: |
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.
Also, I think you meant or
here and not and
?
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.
No in this case I mean AND:
Of the 4 types of loads: Normal, TOO, SCS-1078 and Full Stop, Normal is the only one that does NOT have an interrupt time in the second line of the ACIS-Continuity.txt file. All the others have an interrupt time.
So if this is not a Normal nor VO_normal then one should read the time. Otherwise set it to None.
Now it could be made shorter by writing:
if review_load_type.upper() in ['NORMAL', 'VO_NORMAL']:
set it to None
else:
Capture the time.
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 just a bit confused about how review_load_type.upper()
could be both "NORMAL"
and "VO_NORMAL"
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.
Sorry, didn't see the !=
, my brain is not working today
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.
@Gregg140 looks fine, just some stylistic questions mainly
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.
So long as the [0-9] replacement John flagged is intensional, then looks fine to me!
…vehicle only if commanded
Description
Proccess "vo_" prefix to the continuity load types when they appear in the ACIS-Continuity.txt
file. Must be installed in concert with the lr PR.
Testing
Fixes #