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
Update and deprecate top-level exports #1107
Conversation
Code Climate has analyzed commit 711a6de and detected 4 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
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.
Looks good as is, but there's a question that may result in either follow up work or bigger changes here.
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.
Looks good!
Could you update the PR title (or at least, the final commit message) to reference that it's also deprecating some of our top-level exports?
(For these things that are just changing imports, it's probably ok to just commit the code change by itself, without the rest of the slightly-different-randomness changes from rerunning the notebooks... as long as the notebook runs, of course.)
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 looks good to me, and the warnings seem to appear in Jupyter at least 👍
It may be good to validate with @PantelisElinas, who added both the calibration (#326) and ensemble (#343) code.
Hi @PantelisElinas I've added you as reviewer - for now this can wait in case you're available soon to check my assumption that the ensemble and calibration functions/classes don't need to be re-exported at the top-level, but I'll also eventually just go ahead with the merge if that's not the case. |
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.
It looks ok to me, if this is the way it should be.
P.
Classes and functions in Thanks for taking a look! |
This removes (with deprecation) several of the re-exported names previously available at the top level of the
stellargraph
hierarchy. Specifically:stellargraph.expected_calibration_error
stellargraph.calibration.expected_calibration_error
stellargraph.plot_reliability_diagram
stellargraph.calibration.plot_reliability_diagram
stellargraph.Ensemble
stellargraph.ensemble.Ensemble
stellargraph.BaggingEnsemble
stellargraph.ensemble.BaggingEnsemble
stellargraph.TemperatureCalibration
stellargraph.calibration.TemperatureCalibration
stellargraph.IsotonicCalibration
stellargraph.calibration.IsotonicCalibration
It also adds the remaining names to
__all__
, so that they're imported when one writesfrom stellargraph import *
and thus that is consistent with the names that are accessible asstellargraph.foo
(afterimport stellargraph
).See #714