Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Clean up ``util`` module, move internal utilities to ``imod.common.utilities``

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
tooling

Research direction

Start by reading imod.util and the listed modules: dims, expand_repetitions, imports, nested_dict, regrid, time, and path, then search their usages. Determine which developer utilities belong in imod.common.utilities while keeping the public namespaces for functions that are still API; done means internal utilities are relocated without breaking those namespaces.

Written by the indexing model from the issue text.

Description

refactor

The util module is a legacy utility module, also containing some convenience functions that are public API. These are still used every-so-often, and some of them are very useful (e.g. empty_2d).

Over the past years, we've created a lot more internal utility functions, which are grouped in imod.common.utilities, or imod.msw.utilities/imod.mf6.utilities if they are tailored to these kernels.

However, developer utilities have landed in imod.util, partly because I was being sloppy myself (possibly to work around some circular dependencies):

  • imod.util.dims
  • imod.util.expand_repetitions
  • imod.util.imports
  • imod.util.nested_dict

I think it is better to move these dev utilities into imod.common.utilities. Modules that can possible moved as well:

  • imod.util.regrid
  • imod.util.time
  • imod.util.path

Though these contain some minor parts of the public API, so the namespaces of these utils need to remain available.

Dominant language
Python
Stars
41
Forks
11
Avg merge
1d 9h
Merged PRs (30d)
6

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

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.

More from Deltares/imod-python

All issues in Deltares/imod-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.