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

Remove empty elements from comma-separated list #40

Merged

Conversation

WalterKolczynski-NOAA
Copy link
Contributor

@WalterKolczynski-NOAA WalterKolczynski-NOAA commented Jul 31, 2024

Description

Updates the list parsing in Configuration to remove empty strings from the comma-separated list. This will allow creating a single-element list by appending a , after the element, as well as just relax syntax on lists by ignore a trailing ,.

Refs: NOAA-EMC/global-workflow#2795

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • pynorms
  • pytests

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

Updates the list parsing in Configuration to remove empty strings
from the comma-separated list. This will allow creating a single-
element list by appending a `,` after the element.

Refs: NOAA-EMC/global-workflow#2795
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.12%. Comparing base (264e8f3) to head (7174ac4).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop      #40   +/-   ##
========================================
  Coverage    50.12%   50.12%           
========================================
  Files           18       18           
  Lines         1652     1652           
  Branches       339      339           
========================================
  Hits           828      828           
  Misses         765      765           
  Partials        59       59           

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

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aerorahul aerorahul merged commit e1ef697 into NOAA-EMC:develop Jul 31, 2024
9 checks passed
DavidHuber-NOAA pushed a commit to NOAA-EMC/global-workflow that referenced this pull request Aug 12, 2024
Adds the ability to run a forecast in segments instead of all at once.
To accomplish this, a new local `checkpnts` variable is introduced to
`config.base` to contain a comma-separated list of intermediate stopping
points for the forecast. This is combined with `FHMIN_GFS` and
`FHMAX_GFS` to create a comma-separated string `FCST_SEGMENTS` with all
the start/end points that is used by `config.fcst` and rocoto workflow.
Capability to parse these into python lists was added to wxflow in an
accompanying PR. If `checkpnts` is an empty string, this will result in
a single-segment forecast.

To accommodate the new segment metatasks that must be run serially, the
capability of `create_task()` was expanded to allow a dictionary key of
`is_serial`, which controls whether a metatask is parallel or serial
using pre-existing capability in rocoto. The default when not given is
parallel (i.e. most metatasks).

Resolves #2274
Refs NOAA-EMC/wxflow#39
Refs NOAA-EMC/wxflow#40
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.

2 participants