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

QA Application Support #46

Merged
merged 2 commits into from
Feb 4, 2022
Merged

QA Application Support #46

merged 2 commits into from
Feb 4, 2022

Conversation

collinss-jpl
Copy link
Collaborator

This PR updates the base PGE functionality to support execution of an optional Quality Assurance (QA) application after the primary SAS executable has completed. Execution occurs similarly to SAS execution, but is optional based on a setting within the RunConfig.

@collinss-jpl collinss-jpl self-assigned this Jan 31, 2022
Copy link
Collaborator

@JimHofman JimHofman left a comment

Choose a reason for hiding this comment

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

Looks excellent. a couple of minor things.

src/opera/util/run_utils.py Show resolved Hide resolved
If the QA executable exists within the current environment, but is not
set with execute permissions for the current process.

"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Very clear docstring with just enough detail

"""
command_line = []

if executable_path := shutil.which(qa_program_path):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I looked at PEP 572 - Assignment Expression and under Syntax and semantics I found an example of a regex that is pretty similar to what is here.
I think it's a little clearer to say:
if (executable_path := shutil.which(qa_program_path)) is not None:

f"but does not have execute permissions.")
# Otherwise, qa_program_path might be a python module path
else:
command_line = ['python3', '-m', qa_program_path]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like the comments here.

Scott Collins added 2 commits February 4, 2022 11:05
QA application execution is performed similarly to the main SAS execution, but is optional based on how the RunConfig is defined
@collinss-jpl collinss-jpl force-pushed the 44_qa_application_support branch from 4190588 to 81cc242 Compare February 4, 2022 19:05
@collinss-jpl collinss-jpl merged commit c87e98f into main Feb 4, 2022
@collinss-jpl collinss-jpl deleted the 44_qa_application_support branch March 7, 2022 17:56
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