You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way that we do python import * in both 3ML and astromodels is very bad practice as it can lead to namespace collisions. We need to eventually clean this up which will mean that we will have to fix up the docs (and our own scripts).
This will be especially important when we work with packages like gammapy because they may use the same model name and it could cause all kinds of strange bugs.
I have started working on this in a branch, but I think this is a breaking change so something for like a minor version bump.
for example. Of course, someone could always go through and import everything if they like, but it makes controlling names a lot easier. We would have something similar for 3ML
The structure is probably something we should discuss, but it would also give us a chance to think about all these startup warning etc. We could make it all more local and stop freaking people out when it loads. I have some ideas, but it would be better to gather our use cases.
The way that we do
python import *
in both 3ML and astromodels is very bad practice as it can lead to namespace collisions. We need to eventually clean this up which will mean that we will have to fix up the docs (and our own scripts).This will be especially important when we work with packages like
gammapy
because they may use the same model name and it could cause all kinds of strange bugs.I have started working on this in a branch, but I think this is a breaking change so something for like a minor version bump.
It would look something like this:
for example. Of course, someone could always go through and import everything if they like, but it makes controlling names a lot easier. We would have something similar for 3ML
Thoughts?
The text was updated successfully, but these errors were encountered: