Skip to content

Conversation

@tomvothecoder
Copy link
Collaborator

@tomvothecoder tomvothecoder commented Oct 10, 2025

Description

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

If applicable:

  • New and existing unit tests pass with my changes (locally and CI/CD build)
  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have noted that this is a breaking change for a major release (fix or feature that would cause existing functionality to not work as expected)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the codebase to centralize legacy Xarray merge settings by introducing a LEGACY_XARRAY_MERGE_SETTINGS constant in the __init__.py module. This replaces repeated inline configuration of compat and join parameters across multiple files with a single source of truth.

  • Introduced LEGACY_XARRAY_MERGE_SETTINGS dictionary in e3sm_to_cmip/__init__.py to centralize Xarray legacy behavior settings
  • Replaced inline compat="no_conflicts" and join="outer" parameters with the new constant across four files
  • Added data_vars="all" to the legacy settings dictionary for consistency

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
e3sm_to_cmip/init.py Defines LEGACY_XARRAY_MERGE_SETTINGS constant with legacy Xarray merge parameters
e3sm_to_cmip/mpas.py Replaces inline legacy settings with LEGACY_XARRAY_MERGE_SETTINGS in two locations
e3sm_to_cmip/cmor_handlers/mpas_vars/pso.py Replaces inline legacy settings with LEGACY_XARRAY_MERGE_SETTINGS
e3sm_to_cmip/cmor_handlers/mpas_vars/pbo.py Replaces inline legacy settings with LEGACY_XARRAY_MERGE_SETTINGS
e3sm_to_cmip/cmor_handlers/handler.py Replaces inline legacy settings with LEGACY_XARRAY_MERGE_SETTINGS

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tomvothecoder tomvothecoder requested a review from Copilot October 10, 2025 23:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tomvothecoder tomvothecoder requested a review from Copilot October 10, 2025 23:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tomvothecoder tomvothecoder merged commit 7c7f400 into master Oct 10, 2025
6 checks passed
@tomvothecoder tomvothecoder self-assigned this Oct 10, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in E3SM to CMIP Development Oct 10, 2025
@tomvothecoder tomvothecoder added the bug Something isn't working label Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Development

Successfully merging this pull request may close these issues.

[Bug]: Preserve legacy Xarray behavior with data_vars="all"

2 participants