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

Now processes a full continuity (science + vehicle commands) load as … #22

Merged
merged 1 commit into from
Jan 29, 2022

Conversation

Gregg140
Copy link
Contributor

…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

  • [ x] Passes unit tests on linux (at least one required)
  • [x ] Functional testing

Fixes #

@Gregg140 Gregg140 requested review from jzuhone and jazan12 January 21, 2022 20:44
@@ -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'))
Copy link
Member

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\
Copy link
Member

Choose a reason for hiding this comment

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

Shorter version of this:

Suggested change
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 \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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 \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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 \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (review_load_type.upper() != 'NORMAL') and \
if review_load_type.upper() in ['NORMAL', 'VO_NORMAL']:

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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"

Copy link
Member

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

Copy link
Member

@jzuhone jzuhone left a 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

Copy link

@jazan12 jazan12 left a 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!

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