Deltares / imod-python

🐍🧰 Make massive MODFLOW models
https://deltares.github.io/imod-python/
MIT License
16 stars 0 forks source link

Add iMOD Python version number to dumped toml file #1103

Open JoerivanEngelen opened 2 weeks ago

JoerivanEngelen commented 2 weeks ago

The Modflow6Simulation.dump method is at present a method to temporarily store Modflow 6 simulations inbetween scripts. For the version 1.0, we'd like this to be a replacement of the iMOD 5 databases, meaning at minimum we need to add the iMOD Python version number to the toml file.

Given that we expected that iMOD Python still is quite under some development after version 1.0, we need to do one of the following upon reading a toml with an older version:

  1. Throw warning that things might not work given that this is an older version.
  2. Throw error to force users to update their database.

I think starting with option 1 is the easiest to inform users. 2 requires more work, but might be a hard requirement when we make some very significant changes.

Upon reading a toml file with a newer version than the current iMOD Python, we can throw an error ushering people to update their iMOD Python. Just like pixi does.