-
Notifications
You must be signed in to change notification settings - Fork 9
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
gh-501: change imports to be directly from glass
#512
Conversation
from glass.grf._core import corr, dcorr, icorr | ||
from glass.grf import corr, dcorr, icorr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one has to remain from glass.grf
syntax as otherwise we run into a circular import
Fields = Sequence[grf.Transformation] | ||
Fields = Sequence[glass.grf.Transformation] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was incorrect before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me!
Thanks for doing all those changes! I hadn't really thought about use of |
I don't really mind. I think there are benefits of both. The way I've done it means that you are using the library as an external user would. So in a sense it's another check that On the other hand, having full path imports means that at a glance you know exactly where something is coming from. This is why I in general prefer @Saransh-cpp do you have any views of which style we should use here? |
I like Also, all the popular conventions in the Python ecosystem are always of the form numpy.array
plt.plot
pd.DataFrame
... |
Ok, then let's always use |
Description
Changes the code throughout to use
import glass
rather thanfrom glass import
where possible. This is possible via the__all__
statements in__init__.py
. I have also done this forglass.grf
.Closes: #501
Changelog entry
Checks