Skip to content

Make shared path optional in ioda-dump#69

Merged
CoryMartin-NOAA merged 6 commits intodevelopfrom
copilot/make-shared-path-optional
Jan 21, 2026
Merged

Make shared path optional in ioda-dump#69
CoryMartin-NOAA merged 6 commits intodevelopfrom
copilot/make-shared-path-optional

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 21, 2026

The shared path configuration was required for all file types but only used for ODB files, forcing users processing NC/HDF5/BUFR files to supply unnecessary configuration.

Changes

  • Default value: Set shared path to "./" when not specified, with warning logged
  • Dead code removal: Eliminated redundant empty check (always has default now)
  • Documentation: Clarified shared path is optional and ODB-specific

Implementation

// Before: exception if not defined
if (fullConfig.has("shared path")) {
   fullConfig.get("shared path", sharedPath);
} else {
   throw eckit::Exception("Missing 'Shared Path' in YAML configuration");
}

// After: default with warning
if (fullConfig.has("shared path")) {
   fullConfig.get("shared path", sharedPath);
} else {
   sharedPath.push_back("./");
   oops::Log::warning() << "Shared Path not defined in YAML configuration, using default: './' " << std::endl;
}

ODB files will fail with clear file-not-found errors if mapping/query files don't exist at the default path.

Original prompt

This section details on the original issue you should resolve

<issue_title>Shared Path should be optional</issue_title>
<issue_description>

throw eckit::Exception("Missing 'Shared Path' in YAML configuration");

This is only used when you are reading BUFR or ODB files, so we should make it optional and not fail if the input YAML does not define it. Perhaps the default value can be ./ and instead of throwing an exception, a warning is printed out that says it is not defined and will assume the path is the runtime directory?</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits January 21, 2026 15:02
Co-authored-by: CoryMartin-NOAA <6354668+CoryMartin-NOAA@users.noreply.github.com>
Co-authored-by: CoryMartin-NOAA <6354668+CoryMartin-NOAA@users.noreply.github.com>
Co-authored-by: CoryMartin-NOAA <6354668+CoryMartin-NOAA@users.noreply.github.com>
Co-authored-by: CoryMartin-NOAA <6354668+CoryMartin-NOAA@users.noreply.github.com>
Copilot AI changed the title [WIP] Make shared path optional for reading BUFR or ODB files Make shared path optional in ioda-dump Jan 21, 2026
Copilot AI requested a review from CoryMartin-NOAA January 21, 2026 15:08
@CoryMartin-NOAA CoryMartin-NOAA marked this pull request as ready for review January 21, 2026 15:09
Copy link
Copy Markdown
Contributor

@HyundeokChoi-NOAA HyundeokChoi-NOAA left a comment

Choose a reason for hiding this comment

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

This looks good. The shared path isn’t required for netCDF files.

@CoryMartin-NOAA CoryMartin-NOAA merged commit 719f240 into develop Jan 21, 2026
1 check passed
@CoryMartin-NOAA CoryMartin-NOAA deleted the copilot/make-shared-path-optional branch January 21, 2026 16:18
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.

Shared Path should be optional

3 participants