hainegroup / oceanspy

A Python package to facilitate ocean model data analysis and visualization.
https://oceanspy.readthedocs.io
MIT License
101 stars 32 forks source link

remove unnecessary definitions on yaml file #417

Closed Mikejmnez closed 7 months ago

Mikejmnez commented 7 months ago

Description

Intake is going through some changes. These have brought to light some unnecessary definitions within .yaml files that are causing issues with the newer version of intake. See #415

The propose change allows to go from, for example :

old behavior

plugins:
  source:
  - module: intake_xarray
sources:
  # ===========================
  # get_started
  grd_get_started:
    description: Grid of get_started
    driver: netcdf
    model: MITGCM
    args:
      urlpath: /home/idies/workspace/OceanCirculation/exp_ASR/grid.nc
      xarray_kwargs:
        engine: netcdf4
        drop_variables: ['RC', 'RF', 'RU', 'RL']

to NEW BEHAVIOR

sources:

  # ===========================
  # get_started
  grd_get_started:
    description: Grid of get_started
    driver: netcdf
    model: MITGCM
    args:
      urlpath: /home/idies/workspace/OceanCirculation/exp_ASR/grid.nc
      xarray_kwargs:
        engine: netcdf4
        drop_variables: ['RC', 'RF', 'RU', 'RL']

This change is backwards compatible with intake versions 0.7, which is the current version installed on Sciserver Oceanography environment, and the current version being pinned right now.

Without the proposed change above, intake version 2.0 cannot open the yaml file.

What am I proposing

The fix is very simple but involves 2 steps for all tests in CI to pass.

1) I need to first modify the file: .oceanspy/main/sciserver_catalogs/catalog_xarray.yaml, locally and then remotely with its own PR. OceanSpy reads this file from GH associated with the previous / most recent PR HERE.

2) Change local files. Unpin intake a separate PR.

If i don't do step 1) first, step 2) will show fail CI test which will be missleading.

FYI: OceanSpy code is not changing at all.