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. |
Description
This allows the preconditioned sourcing of scripts based on optional environmental variables passed to the
parse_configmethod within theConfigurationclass. 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
RUNspecified 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