NOAA-EMC / wxflow

Tools for Weather Workflows
https://wxflow.readthedocs.io/en/latest
GNU Lesser General Public License v3.0
0 stars 7 forks source link

Resolving shell environment variables name space conflicts with parm #28

Closed TerrenceMcGuinness-NOAA closed 2 months ago

TerrenceMcGuinness-NOAA commented 3 months ago

Description

This PR updates the instantiation of the Configuration Class of wxflow in order to resolve the namespaces clashes between the environment variables in shell that launches setup_xml.py and the values used in config parm variables.

With this update the namespaces between the shell environment variables and the variables in parm files used by the Configuration Class are preserved. A Unit Test demonstrating this can be found here.

For example, if the environment variable ACCOUNT is set in the shell that setup_expt.py is launched from, it would would fail as that variable is also used in template of config.base. Correspondingly, if setup_xml.py was executed with ACCOUNT set in the shell it would populate the XML file with UNKOWN without erroring. With this update the value in the XML file would be set he value designated in the corresponding instantiated parm file config.base.

The Unit Tests specified below shows this failure does not occure and the updates are used in Test PR 2581

Type of change

How Has This Been Tested?

This PR Branch was incorporated into Global-Workflow PR 2581 Unit Tests using GitHub Actions. Here are the results of running the Unit Tests from GitHub Actions. PR 2581 also does full CI run throughs using this update in the Configuration Class.

Checklist

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 50.06%. Comparing base (5dad7dd) to head (5382a0e).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #28 +/- ## =========================================== + Coverage 48.23% 50.06% +1.82% =========================================== Files 18 18 Lines 1644 1648 +4 Branches 335 336 +1 =========================================== + Hits 793 825 +32 + Misses 791 763 -28 Partials 60 60 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

TerrenceMcGuinness-NOAA commented 3 months ago

please activate the tests that are marked to skip in the GH runner.

@aerorahul Done: Configuration Unit Tests now pass in GitHub Runners with the update to the bash shell in the Subprocess. Also I updated the approach that solves the primary name classing issue with feedback from these tests that is now also more strait forward than before. Please re-review these changes. Thnx. ~T.McG

aerorahul commented 2 months ago

Not required by author.