modflowpy / flopy

A Python package to create, run, and post-process MODFLOW-based models.
https://flopy.readthedocs.io
Other
506 stars 306 forks source link

Consensus on mf-prefixed class names #2243

Open martclanor opened 2 months ago

martclanor commented 2 months ago

This concerns all class names prefixed with MF or Mf.

While poking around, I tried using MFSimulationList class, but that apparently doesn't exist because it is instead called MfSimulationList which I thought is a bit unexpected. So I checked to see where MF or Mf is used as a prefix and it seems like there is a pattern, but just almost.

Within flopy/mf6, everything is using MF (e.g. MFDataException, MFBlock, MFTransient, etc.), except for MfGrdFile, MfSimulationList and Mf6Splitter. Elsewhere, Mf is used (e.g. as found in flopy/mfusg and flopy/utils: MfUsg, MfList, Mf6Obs, etc.).

My questions:

  1. First of all, is this inconsistent at all, or did I maybe just miss a different intended pattern?
  2. If it's indeed inconsistent and if this is worth a clean-up, can I simply keep all the mf-prefixed classes in flopy/mf6 with MF?
  3. If not, how exactly do we go about this?
jlarsen-usgs commented 2 months ago

@martclanor

I think the difference in patterning comes from multiple people developing the code and not specifying a formal convention for MF vs. Mf prefix. I'm personally partial to Mf over MF, but I'd like to hear what others think prior to making any changes to the mf6 naming conventions.

wpbonelli commented 3 weeks ago

Echoing @jlarsen-usgs's call for comments here, so we can pick a convention and stick to it for the next major version release.

One thought: maybe we don't even need a prefix? These classes will be in the flopy.mf6 module already. The user could alias to disambiguate if needed.

langevin-usgs commented 3 weeks ago

@wpbonelli, I like your idea to remove the prefix. We might even build on that further for the mf6 packages. We could probably rethink the name space to better accommodate ModflowGwfevt, for example.