Deltares / Deltares/imod-python

imod.idf.open_dataset provides wrong amount of arguments in call to array_io.reading._load

Open
#406 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug has attachment
Dominant language
Python
Stars
41
Forks
12
Avg merge
21h 8m
Merged PRs (30d)
1

Description

In GitLab by @JoerivanEngelen on May 31, 2023, 17:26

This merge request introduced a function named _open and removed one argument from _load:

https://gitlab.com/deltares/imod/imod-python/-/commit/dfe2d0f9baea9b52e8000a3ec2419d620ac9e834

Unfortunately, this broke imod.idf.open_dataset as the call to _load had to be replaced with _open but did not.

This is the line to fix: https://gitlab.com/deltares/imod/imod-python/-/blob/master/imod/formats/idf.py#L504

Furthermore, there apparently is no test for open_dataset as all the tests passed.

Error thrown:

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at imod/formats/idf.py line 504 and inspect how imod.idf.open_dataset calls array_io.reading._load after the _open change. Add coverage for open_dataset, then run the relevant test suite and confirm the call completes without the argument-count error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.