Auxiliary variables are marked `aux` in one place and `auxiliary` in another
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 76/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 58
- Fork
- 9
- Merge trung bình
- 28 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DHI/modelskill
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DHI/modelskill#720 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
DHI/modelskill#628 ·
-
Follow-ups after network module integrationCó thể đã có người làm @jpalm3r đã nhận 14 ngày trước. Đang mởenhancement
DHI/modelskill#718 · 1 người được giao ·
-
Vertical: z sign convention is guessed in plots and ignored in matchingCó thể đã có người làm @otzi5300 đã nhận 22 ngày trước. Đang mởbug
DHI/modelskill#715 · 1 người được giao ·
-
An already-validated Dataset silently discards x, y, item and the other constructor argumentsĐang mởbug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
DHI/modelskill#713 ·
Tất cả issue của DHI/modelskill
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
common-workflow-language/cwl-utils#477 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add dependabotĐang mởfeat
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 72/100
open-nudge/opentemplate#204 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
github-stale-ci-pr-closer: KV state is double-wrapped, never persists, and hits the depth-32 limitCó thể đã có người làm @VascoSch92 đã nhận hôm nay. Đang mởpriority:medium ready-for-dev
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
OpenHands/extensions#781 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
curriculum documentation quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
githubnext/gh-aw-workshop#4638 ·
Maintainer thường phản hồi trong vòng 1 ngày