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

Create task_config member variable upon initialization #30

Merged
merged 8 commits into from
Jun 7, 2024

Conversation

DavidNew-NOAA
Copy link
Contributor

@DavidNew-NOAA DavidNew-NOAA commented Jun 7, 2024

Description

This PR creates the task_config member variable in the Task __init__ function. Normally it is created upon initialization of a child subclasses of Task, but since it is expected to exist for every application of the Task class I've seen so far, it's better to create it at initialization.

This PR also eliminates runtime_config, since it's mostly redundant and renames the config member variable with a leading underscores to emphasize that they should be treated as private.

This PR is a companion to Global Workflow PR #2654 which replaces any reference to config or runtime_config member variables with task_config.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • pynorms
  • pytests
  • GDASApp j-job tests
  • Cycling experiment on Orion with Global Workflow

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes need updates to the documentation. I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • Any dependent changes have been merged and published

Copy link

codecov bot commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 48.17%. Comparing base (8406bee) to head (d68b1ed).
Report is 1 commits behind head on develop.

Current head d68b1ed differs from pull request most recent head c710e9f

Please upload reports for the commit c710e9f to get more accurate results.

Files Patch % Lines
src/wxflow/task.py 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #30      +/-   ##
===========================================
+ Coverage    47.93%   48.17%   +0.23%     
===========================================
  Files           18       18              
  Lines         1650     1642       -8     
  Branches       335      334       -1     
===========================================
  Hits           791      791              
+ Misses         799      791       -8     
  Partials        60       60              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DavidNew-NOAA DavidNew-NOAA marked this pull request as ready for review June 7, 2024 18:00
src/wxflow/task.py Outdated Show resolved Hide resolved
@aerorahul aerorahul merged commit 8566ea3 into NOAA-EMC:develop Jun 7, 2024
7 checks passed
aerorahul pushed a commit to NOAA-EMC/global-workflow that referenced this pull request Jul 1, 2024
…2700)

This PR updates the `gdas.cd` hash to bring in new JCB conventions.
Resolves #2699

From #2654
This PR will move much of the staging code that take place in the python
initialization subroutines of the variational and ensemble DA jobs into
Jinja2-templated YAML files to be passed into the wxflow file handler.
Much of the staging has already been done this way, but this PR simply
expands that strategy.

The old Python routines that were doing this staging are now removed.
This is part of a broader refactoring of the pygfs tasking.

wxflow PR [#30](NOAA-EMC/wxflow#30) is a
companion to this PR.

Co-authored-by: danholdaway <danholdaway@users.noreply.github.com>
Co-authored-by: DavidNew-NOAA <david.new@noaa.gov>
Co-authored-by: DavidNew-NOAA <134300700+DavidNew-NOAA@users.noreply.github.com>
Co-authored-by: Dan Holdaway <27729500+danholdaway@users.noreply.github.com>
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.

None yet

2 participants