Why `expand_transient_auxiliary_variables`

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
data

調査の方向性

まず expand_transient_auxiliary_variables 関数とその docstring を読み、次にデータセットの処理とファイル書き込みの際にどこで呼び出されるかを追跡します。濃度や塩分などの補助変数がどのように表現されているか、また writer が展開された DataArrays に依存しているかを確認します。目的と複製の動作が解決され、更新が予期せず乖離することのない状態になれば完了です。

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

説明

I'm having trouble seeing the use of expand_transient_auxiliary_variables as a function. I don't like what it's doing either: it's duplicating data in the Datasets.

Also note that the docstring is totally unhelpful in telling me why this is required:

def expand_transient_auxiliary_variables(package: IPackage) -> None:
    """
    Splits an auxiliary dataarray of the kind that could potentially be
    time-dependent (with one or more auxiliary variable dimension) into
    dataarrays per auxiliary variable dimension. For example a concentration
    auxiliary variable in a flow package will have a species dimension, and will
    be split in several dataarrays- one for each species.
    """

The only thing I can imagine is that it might simplify the file writing, since those methods generally take a DataArray too? Or something?

Anyway, the duplication of data is in my view such a bad choice that it's worth having a slightly more complicated writer. A user may update either concentration or salinity and get unexpected results. This is unacceptable.

主要言語
Python
スター
41
フォーク
12
平均マージ
2日 8時間
マージ済み PR(30日)
13

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

Deltares/imod-python のほかの issue

Deltares/imod-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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