Unify the netCDF and Zarr cube-building loops, and the mesh format dispatch

オープン
#7,353 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

Read iris.fileformats.netcdf.loader.load_cubes, iris.fileformats.zarr.loader.load_cubes, and iris.fileformats.netcdf.ugrid_load.load_meshes, then review section 5 of docs/superpowers/specs/2026-09-21-zarr-io-design.md. Compare the shared loader bodies and the mesh format dispatch; use the existing loader tests to check both formats. Done when the shared loop is unified, the dispatch is removed, and both load_cubes signatures remain unchanged.

索引モデルが issue の本文から書いたものです。

説明

Agentic Type: Tech Debt

(posted by Claude Opus)

iris.fileformats.netcdf.loader.load_cubes and iris.fileformats.zarr.loader.load_cubes now have the same body. They differ only in how the dataset is opened: one builds a NetCDFDataset, the other a ZarrDataset, and everything after that — the CF reader, the mesh handling, the cube loop, the callback — is the same code written twice.

iris.fileformats.netcdf.ugrid_load.load_meshes carries a third copy of the problem, as a format dispatch that compares the handler against nc_loader.load_cubes and _load_zarr to decide what to open. That comparison is the only reason a netCDF-named module names Zarr at all; the mesh code it shares with the Zarr loader names no format whatsoever. A TODO in that function points here.

Unifying the loop would remove the dispatch with it. Neither load_cubes signature moves, so this is internal.

Raised at the merge-back of the native Zarr programme rather than when it was found, so that nobody started on it while that programme's pull requests were in flight and depending on each other. Found by @pp-mo reviewing https://github.com/SciTools/iris/pull/7336. See section 5 of docs/superpowers/specs/2026-09-21-zarr-io-design.md.

主要言語
Python
スター
730
フォーク
323
平均マージ
3日 21時間
マージ済み PR(30日)
16

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SciTools/iris のほかの issue

SciTools/iris の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。