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

UW-269 Extend set_config.py tool to "export" variables. #272

Closed
NaureenBharwaniNOAA opened this issue Aug 3, 2023 · 1 comment
Closed

Comments

@NaureenBharwaniNOAA
Copy link
Contributor

NaureenBharwaniNOAA commented Aug 3, 2023

Description

We will need to interface between a new YAML-configured App, and the j-jobs/ex-scripts (collectively referred to as run scripts) currently written mostly in bash. We will need to be able run a command line tool in bash that "exports" the variables in a given section of our YAML or INI file.

These sections will need to be "flat" and we will want to ensure we have namespace protection. Run scripts will need access to variables from multiple sections of an experiment config file, but it is an NCO restriction that we shouldn't export all variables for an experiment at run time. That's a good practice in general to ensure namespace protection.

So, here we will want a tool that exports all the key/value pairs in given sections to the shell in which it is invoked. An interface that looks something like is sufficient.

export_variables.py -c /path/to/experiment.yaml --sections run_fcst workflow user

What it does, then is loads the config, finds those sections, and ensures that the variables are available in the shell.

This need not necessarily be an extension of the set_config tool.

Requirements

Acceptance Criteria

  • Introduces the functionality to export variables from a config file to the existing shell.
  • Must support INI and YAML input, at minimum.
  • Shall provide tests that ensure environment variables are set in the shell that this script is called from.
  • Shall include any relevant unit tests.

Contractual Requirements

4.5.6. Support the design, development and deployment of a Unified Workflow (UWF) for the UFS, associated tools, and documentation for multiple cloud and on-premise HPC environments, as well as delivering the UWF integration plan.

Due - Support activities, existing Confluence page and user manual updates reflecting community needs, as approved by EPT. - Online and MS Word Report via email

PRS:

  • An integration plan to integrate the UWF toolkit into UFS Apps and configurations, including but not limited to, SRW, HAFS, global workflow, and land DA. Key stakeholder inputs shall be captured.
  • Support scheduling, handling and managing a database for dataflow, configuration of applications, tasks and functional tools. Provides an overarching framework for applications to be configured and executed.
  • Up-to-date documentation.
  • Online documentation linked to EPIC and UFS document databases.
@christinaholtNOAA
Copy link
Contributor

Fixed by PR #280

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

No branches or pull requests

2 participants