Deltares / Deltares/imod-python

Refactor ``clip_box`` logic to clarify inner workings

Open
#1,751 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

After speaking with @Manangka about #1744

The logic required for the clip_box method is now spread over several utilities. There is even some included in the imod/mf6/model.py, where it shouldn't be. Furthermore the data handling is convoluted now and it should be clarified in some way. I remember while working on #1744 that it took me a bit of time to find where and when processing steps took place and what was happening, which isn't a good sign.

The logic required is complex regardless, as there are quite some edge cases to handle, so we shouldn't expect such clarity that a new dev would understand every step at first glance, but some improvement is required.

What would help:

  1. Move functions in imod/mf6/model.py to clearer namespace
  2. Add description of algorithm to clarify inner workings
  3. Refactor clip_box logic, possibly add some objects for internal use

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

Read #1744 first, then trace the clip_box method and related utilities, including functions currently in imod/mf6/model.py. Map where processing occurs before deciding on clearer namespaces or internal objects; done means the logic is easier to follow, its algorithm is documented, and the listed responsibilities are reorganized.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.