-
Notifications
You must be signed in to change notification settings - Fork 280
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
Internally import from unyt #2597
Conversation
f045c0c
to
a279693
Compare
a279693
to
ce7fafc
Compare
65f7832
to
e9eef27
Compare
This is the one proposal originally part of YTEP0037 that didn't reach consensus. It is not considered part of that YTEP any more. |
2785b3b
to
f551dd3
Compare
c06952d
to
185bc70
Compare
@yt-fido test this please |
fc11d3a
to
dde36d4
Compare
74f3faa
to
051174c
Compare
051174c
to
a8397a4
Compare
…Quantity as aliases, and stop using them internally
a8397a4
to
dcdac6e
Compare
@@ -3,7 +3,7 @@ | |||
hooks: | |||
- id: flake8 | |||
- repo: https://github.com/timothycrosley/isort | |||
rev: '' | |||
rev: '5.1.4' |
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.
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.
I'm having a hard time finding it, but we retained the display_ytarray
stuff, right?
you mean this ? Line 74 in 9138a0a
Yup, still there. This PR removes nothing, its one and only purpose is to replace indirect imports by direct ones. |
For reviewers of this PR -- Here's a discussion we had about internally importing from unyt in the code styling ytep (links to the first comment in a thread): |
I have some thoughts about doing this; I will weigh in when I get back early Sept. |
Note that this project https://github.com/sqlalchemyorg/zimports Can be used to perform this change in a semi-automated way by
|
If I'm ever reattempting this again, I'd rather start fresh. It's dishearthing to see how many conflicts this has been accumulating in less than a year. |
PR Summary
Quoting
CONTRIBUTING.rst
I think this principle could and should be applied to
unyt
, which we currently wrap underyt.units
.Directly importing from
unyt
instead of the wrapper would reduce the overhead of this wrapper: it's easier to learn the origin of a function/class if we avoid layered import. This should reduce the maintenance burden of the wrapper as well, though the primary goal is to make definitions easier to discover from everywhere else inyt/
highlight points
yt.units
(and its children) in any way, so as not to break any downstream code.