-
Notifications
You must be signed in to change notification settings - Fork 6
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
Parse config files with input envars #35
Parse config files with input envars #35
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #35 +/- ##
===========================================
+ Coverage 48.23% 49.93% +1.70%
===========================================
Files 18 18
Lines 1644 1650 +6
Branches 335 337 +2
===========================================
+ Hits 793 824 +31
+ Misses 791 765 -26
- Partials 60 61 +1 ☔ View full report in Codecov by Sentry. |
Is that really appropriate for a method that is supposed to just source a shell script and return the set variables as a dictionary. This PR extends that from parsing/sourcing shell scripts and adding additional variables to that dictionary. IMO that should be done after the sourcing and adding/updating the envvars. |
@aerorahul I agree with your assessment on the capability. However, modifying the variables after sourcing is not enough for the global-workflow resources. They depend on knowing the I see one possible solution: An option that seems viable but is not: |
After offline discussion with @aerorahul, found a solution in the global-workflow to handle this case. Closing. |
After testing of another option, this was found to be the favorable one. Reopening. |
Pytests were run on WCOSS2 successfully. |
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.
Looks good.
Description
This allows the preconditioned sourcing of scripts based on optional environmental variables passed to the
parse_config
method within theConfiguration
class. A new test is added for the feature.This is a required feature for NOAA-EMC/global-workflow#2693 to be able to source configs with
RUN
specified in order to getRUN
-specific resources.Type of change
How Has This Been Tested?
Created an xml with global-workflow branch https://github.com/DavidHuber-NOAA/global-workflow/tree/feature/simplify_res
Checklist