Bugs found while adding type checking (#66), not yet fixed
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
This is a bundle of nine separate bugs, so pick one and work through it alone. Start with eumWrapper.eumGetNextEqvUnit in mikecore/eum.py, whose test is test_eumGetNextEqvUnit_first_unit in tests/test_eum.py. Run the test on the add-pyright branch, where the xfail marker is set. Done means the test passes with the marker removed and the other bugs are left unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
These bugs were found while adding type checking in #66 and left unfixed there, because fixing them changes behaviour that the types did not expose. Seven are pinned by strict xfail tests on that branch. Each test's reason gives the expected correct behaviour, and the test fails as an XPASS once the bug is fixed, so the marker must then be removed. Line links are to the add-pyright branch.
None of them is covered by an existing issue. #50 lists validation gaps (TODOs where the code raises or skips a check) and #47 the X/Y quantity in geographic projections; both are related but different.
Wrong result, no error
-
eumWrapper.eumGetNextEqvUnitreads the return code the wrong way round (eum.py:1846). The native call returns 1 when it finds a unit and 0 at the end of the list, but the wrapper treatsrc != 0as failure. SoeumGetNextEqvUnit(eumUmeter, eumUUnitUndefined)returns(False, eumUUnitUndefined, "")although the native call foundmeter. This also affects master. Raised by @ecomodeller on #66. Tests:test_eumGetNextEqvUnit_first_unitandtest_eumGetNextEqvUnit_after_last_unit(tests/test_eum.py). -
DfsuBuilder.SetElementIdsnever stores the ids (DfsuBuilder.py:270). It checks their count and returns, so the file gets the default ids 1, 2, … with no warning.SetNodeIdsstores its ids. Test:test_element_ids_are_written(tests/test_dfsu_builder.py). -
MeshBuilder.SetNodesrounds z to float32 (MeshBuilder.py:57). A mesh built from double z values, such as one read withMeshFile.ReadMesh, is written with z rounded to about 7 digits. Mesh files store z as doubles, and x and y are kept as doubles. Test:test_MeshBuilder_keeps_z_precision(tests/test_mesh.py). -
Dfs0ToAsciiassumes the time axis is in seconds (Dfs0ToAscii.py:56).ReadItemTimeStepNextreturns times in the time axis unit, so with a 10-minute step the second row is stamped00:00:10instead of00:10:00. Its own TODO notes the unit is not always seconds. Correct: convert with the time axis'sToSeconds. Test:test_Dfs0ToAscii_writes_calendar_times_in_minutes(tests/test_miketools.py). -
DfsFile.ReadStaticItem(0)returns the first static item (DfsFile.py:937). It doesn't check the item number or the return code ofdfsFindItemStatic, so item 0 returns the first item, withItemNumber0. Static item numbers start at 1. Correct: raiseValueErrorbelow 1, as__DynamicItemInfoReadAndCreatedoes for dynamic items. Test:test_read_static_item_zero(tests/test_dfs_basic.py). -
DfsFile.ReadItemTimeStepNextandReadItemTimeStepignorereshape(DfsFile.py:1003). They accept the argument but onlyDfs123Filereshapes, soreshape=Trueon a genericDfsFilesilently returns flat data. Either reshape or drop the parameter. No test yet.
Fails later, or with no message
- A reused
DfsDynamicItemBuilderreturns a blank item (DfsBuilder.py:684).GetDynamicItemInforeplacesItemInfowith a blankDfsDynamicItemInfobut leaves the builder's "is set" flagsTrue. A second call then passesValidateand returns an item with no name, quantity or value type, which fails only when added to a file. Its comment says it means to store a clone so the builder can be reused. Test:test_dynamic_item_builder_can_be_reused(tests/test_dfsbuilder.py). -
DfsuBuildercan't createDfsuSpectral0D(DfsuBuilder.py:467).Validateaccepts the type, butSetupBuilderhas no branch for it and raises a bareExceptionwith no message.DfsuFilereads a Spectral0D file as data type 2001 with a 6-valueMIKE_FMblock[nodes, elements, 2, 0, frequencies, directions]. Correct: the builder writes that, orValidaterejects the type with a clear message. Test:test_spectral_0d_file_has_one_spectrum(tests/test_dfsu_builder.py).
Checks that never run
-
DfsBuilder.SetDeleteValue*never check the build stage (DfsBuilder.py:128). Five setters readself.__CheckBuildStage1without calling it (lines 128, 137, 148, 157, 166), so they can be called at any stage. No test yet. -
DfsBuilder.Validatechecks the encode keys with the wrong index (DfsBuilder.py:283). The loop variable isjbut the check readsxKey[i],yKey[i]andzKey[i](iis the item index), so a compressed file is checked against one key per item instead of all keys. No test yet.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- Python
- Star
- 5
- Fork
- 1
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không 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/mikecore-python
-
Four test assertions carried over from the C# suite are still commented outCó thể đã có người làm @ryan-kipawa đã nhận 15 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
DHI/mikecore-python#49 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
DHI/mikecore-python#59 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
New submesh feature (2027) makes all dfsu fail!Có thể đã có người làm @ryan-kipawa đã nhận 14 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
DHI/mikecore-python#54 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Remaining TODOs in production code: platform notes, licensing questions, and one likely-stale markerĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
DHI/mikecore-python#51 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
DHI/mikecore-python#50 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của DHI/mikecore-python
Issue tương tự
-
[Bug]: LangGraph Store sync put bypasses namespace validationCó thể đã có người làm @ktz03 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
volcengine/OpenViking#6050 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunkCó thể đã có người làm @rodricksz4h5 đã nhận hôm nay. Đang mởarea/streaming comp/gateway P2 type/security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NousResearch/hermes-agent#138245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS stepCó thể đã có người làm @github-actions đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
correction metadata
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 68/100
acl-org/acl-anthology#10378 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom nameCó thể đã có người làm @12YYCCYY16 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
prowler-cloud/prowler#13033 ·
Maintainer thường phản hồi trong vòng 1 ngày