Skip to content

Minor QOL changes to translate test infrastructure#176

Merged
FlorianDeconinck merged 3 commits into
NOAA-GFDL:developfrom
CharlesKrop:qol_changes
Aug 24, 2025
Merged

Minor QOL changes to translate test infrastructure#176
FlorianDeconinck merged 3 commits into
NOAA-GFDL:developfrom
CharlesKrop:qol_changes

Conversation

@CharlesKrop
Copy link
Copy Markdown
Collaborator

@CharlesKrop CharlesKrop commented Jun 27, 2025

A few minor changes to test_translate.py:

  • Introduction of a new feature to override the default in/out netcdf names. Use: self.override_input_netcdf_name = "FILE_NAME" and self.override_output_netcdf_name = "FILE_NAME". The new file must me in the same folder as the default file.

  • Added a new error to prevent accidental overwrites of self.outputs, which the translate test infrastructure expects to be unassigned.

Copy link
Copy Markdown
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

Please had something in the README in ndsl/testing/README.md

Copy link
Copy Markdown
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

LGTM

@FlorianDeconinck FlorianDeconinck requested a review from oelbert June 30, 2025 13:10
@FlorianDeconinck
Copy link
Copy Markdown
Collaborator

Ping @oelbert for cross-review and awareness

Copy link
Copy Markdown
Collaborator

@oelbert oelbert left a comment

Choose a reason for hiding this comment

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

I'm not sure what the warnings on the input/output data overrides are for. Are there specific issues we want to warn users of, or some edge cases that haven't been tested?

)
input_data = dataset_to_dict(out_data)
ndsl_log.warning(
f"You are loading {case.testobj.override_input_netcdf_name} as a custom input file! Here be dragons."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What is the warning for here? Are there specific issues users should be aware of?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Just to remind people that they are using non-standard options and to proceed with caution.

@FlorianDeconinck FlorianDeconinck added this pull request to the merge queue Aug 24, 2025
Merged via the queue into NOAA-GFDL:develop with commit f34f98d Aug 24, 2025
5 checks passed
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.

3 participants