Deltares / Deltares/imod-python
reduce number of string literals in imod.mf6
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 41
- Forks
- 12
- Avg merge
- 21h 8m
- Merged PRs (30d)
- 1
Description
In GitLab by @luitjansl on Jul 14, 2023, 11:43
many names for dimensions (x, y, z, layer, nmax_cellid, ...) are repeated as string literals in many places in the imod.mf6 codebase.
The same goes for mandatory names for dataarrays (idomain, ...) or packages (dis, disv).
We can reduce the amount of string literals by defining the name of these things in a separate source file and importing the names from there. This would make format changes easier, and it makes it possible for an IDE to easily find all occurrences. And to make a distinction between code and comments when searching for it.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by searching the imod.mf6 codebase for repeated string literals naming dimensions, mandatory dataarrays such as idomain, and packages such as dis and disv. Define the shared names in a separate source file and replace the repeated literals, then verify that the names are centralized without changing their required values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100