Clean up ``util`` module, move internal utilities to ``imod.common.utilities``
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
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
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.dimsimod.util.expand_repetitionsimod.util.importsimod.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.regridimod.util.timeimod.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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Deltares/imod-python
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Deltares/imod-python#1843 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Deltares/imod-python#1684 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Deltares/imod-python#1923 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Deltares/imod-python#1911 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Deltares/imod-python#1910 ·
Maintainers usually reply within 1 day
All issues in Deltares/imod-python
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
letsencrypt/cp-cps#353 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
PedestrianDynamics/pyFDS-Evac#394 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DOI-USGS/pywatershed#421 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
python-pillow/Pillow#10087 · 1 comment ·
Maintainers usually reply within 1 day