Auxiliary variables are marked `aux` in one place and `auxiliary` in another
まだ誰も着手していません。
評価
調査の方向性
Start with _validate_dataset in src/modelskill/timeseries/_timeseries.py:134, then compare its kind handling with _include_attributes in _point.py:178, _aux_vars at _timeseries.py:279, and Comparer.aux_names in _comparison.py:693-700. Reproduce the hand-built dataset example and verify that one spelling is used consistently, with auxiliary variables appearing in _aux_vars, repr, and comparison names without changing to_dataframe() behavior.
索引モデルが issue の本文から書いたものです。
説明
An auxiliary variable is marked "aux" in one place and "auxiliary" in another, and the two readers disagree about which counts.
Writers:
_include_attributeswrites"aux"for every selected aux item —src/modelskill/timeseries/_point.py:178_validate_datasetdefaults any variable with nokindto"auxiliary"—src/modelskill/timeseries/_timeseries.py:134
Readers:
TimeSeries._aux_varsmatches"aux"only —_timeseries.py:279, viafilter_by_attrs(kind="aux")Comparer.aux_namesmatches anything that is not observation or model —src/modelskill/comparison/_comparison.py:693-700, with the comment# we don't require the kind attribute to be "auxiliary"to_dataframe()keeps every data variable regardless of kind
A variable marked "auxiliary" is therefore invisible to _aux_vars and to __repr__, while still appearing as a column:
ts = TimeSeries(ds) # ds carries an extra variable with no kind
ts.data["extra"].attrs["kind"] # 'auxiliary'
ts._aux_vars # [] <- not seen
list(ts.to_dataframe().columns) # ['WL', 'extra'] <- but present
"Auxiliary" in repr(ts) # False <- and unreported
Scope
Everything built through the normal parse path gets "aux", because _parse_point_input selects values and aux items and marks the aux ones itself. The "auxiliary" default only fires for a dataset that reaches _validate_dataset carrying a variable nothing claimed — a hand-built dataset, or one assembled outside the parse functions. That is why no test has caught it.
Suggested fix
Pick one spelling and use it in both writers and all three readers. "aux" is the one the parse path produces and the one _aux_vars already expects, so _validate_dataset:134 is the smaller change. Whichever is chosen, Comparer.aux_names can then match it directly instead of matching by exclusion, and the comment at _comparison.py:695 can go.
- 主要言語
- Python
- スター
- 58
- フォーク
- 9
- 平均マージ
- 28分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DHI/modelskill のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DHI/modelskill#720 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
DHI/modelskill#628 ·
-
Follow-ups after network module integration対応中かも @jpalm3r が 14 日前に担当しました。 オープンenhancement
DHI/modelskill#718 · 担当者 1 名 ·
-
Vertical: z sign convention is guessed in plots and ignored in matching対応中かも @otzi5300 が 22 日前に担当しました。 オープンbug
DHI/modelskill#715 · 担当者 1 名 ·
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
DHI/modelskill#713 ·
似ている issue
-
Questions crashes on a real SQuAD2 no-answer prediction対応中かも @HuaTNA が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
GST is read as Gulf Standard Time (UTC+4) instead of Guam Standard Time (UTC+10)対応中かも @yang00333 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DOI-USGS/dataretrieval-python#454 ·
メンテナーはふだん 4 日以内に返信
-
area:core-platform effort:S priority:P3 status:in-review type:test
難易度 2/5 1時間未満 初心者へのやさしさ 80/100
randomparity/kdive#3246 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Requantification library converts m/z to mass with the hydrogen-atom mass instead of the proton massオープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
nf-core/metaboigniter#130 ·
メンテナーはふだん 1 日以内に返信
-
netbox status: needs owner type: documentation
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
netbox-community/netbox#23412 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信