Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MESA import behavior #981

Open
GijsVermarien opened this issue Sep 6, 2023 · 2 comments
Open

MESA import behavior #981

GijsVermarien opened this issue Sep 6, 2023 · 2 comments

Comments

@GijsVermarien
Copy link
Contributor

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...

@rieder
Copy link
Member

rieder commented Sep 7, 2023

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.

@GijsVermarien
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants