Skip to content

Fix logging in write_netcdf()#643

Merged
xylar merged 2 commits into
MPAS-Dev:masterfrom
xylar:fix-write-netcdf-logging
Jun 14, 2025
Merged

Fix logging in write_netcdf()#643
xylar merged 2 commits into
MPAS-Dev:masterfrom
xylar:fix-write-netcdf-logging

Conversation

@xylar
Copy link
Copy Markdown
Collaborator

@xylar xylar commented Jun 14, 2025

This pull request includes enhancements to the write_netcdf function and its associated tests, focusing on improved handling of arguments and logging functionality. The changes ensure compatibility with Path objects and integrate a logging context into the testing framework.

Enhancements to write_netcdf function:

  • conda_package/mpas_tools/io.py: Added a conversion step to ensure all arguments passed to the subprocess are strings, improving compatibility with Path objects.

Updates to test framework:

  • conda_package/tests/test_io.py: Modified test_write_netcdf_cdf5_format to use a logging context, passing the logger to the write_netcdf function for better traceability during testing and testing of logging capability.

@xylar xylar force-pushed the fix-write-netcdf-logging branch from eedde52 to 1687d78 Compare June 14, 2025 09:34
@xylar
Copy link
Copy Markdown
Collaborator Author

xylar commented Jun 14, 2025

Testing

I was able to run test with my polaris branch https://github.com/xylar/polaris/tree/add-cull-topo, whereas those runs failed without this fix.

@xylar xylar merged commit ae1f956 into MPAS-Dev:master Jun 14, 2025
6 checks passed
@xylar xylar deleted the fix-write-netcdf-logging branch June 14, 2025 14:15
xylar added a commit to xylar/polaris that referenced this pull request Jun 16, 2025
This version of MPAS-Tools has a bug fix
(MPAS-Dev/MPAS-Tools#643) that we need.
xylar added a commit to xylar/polaris that referenced this pull request Jun 16, 2025
This version of MPAS-Tools has a bug fix
(MPAS-Dev/MPAS-Tools#643) that we need.
xylar added a commit to xylar/polaris that referenced this pull request Jun 23, 2025
This version of MPAS-Tools has a bug fix
(MPAS-Dev/MPAS-Tools#643) that we need.
xylar added a commit to xylar/polaris that referenced this pull request Aug 14, 2025
This version of MPAS-Tools has a bug fix
(MPAS-Dev/MPAS-Tools#643) that we need.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant