amuse icon indicating copy to clipboard operation
amuse copied to clipboard

MESA import behavior

Open GijsVermarien opened this issue 2 years ago • 2 comments

Since we are discussing the installation of MESA (see #980) , can we discuss how to handle the case where MESA successfully installed only one version? Now this will result in import errors, but I think from an user perspective installing one of the codes is a success, if they had an opinion on which MESA they need exactly they would have specified an exact version, and we can then throw them an error.

My proposal is to build try except clauses that check if at least ONE mesa code is installed, then load that one, maybe throwing a warning in the process.

Happy to make a PR if we converge on what we want to be the default behavior...

GijsVermarien avatar Sep 06 '23 19:09 GijsVermarien

Mesa 15140 and 2208 are really quite different - we're only keeping amuse.community.mesa as a convenience. I recommend using explicit imports - e.g. from amuse.community.mesa_15140 import mesa. But sure, if only that version is installed and a user wants to use it via amuse.community.mesa, that should work.

rieder avatar Sep 07 '23 09:09 rieder

Created a small proof of concept: https://github.com/GijsVermarien/amuse/tree/changes_mesa_imports

GijsVermarien avatar Sep 07 '23 13:09 GijsVermarien