-
Notifications
You must be signed in to change notification settings - Fork 60
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
More API changes #69
Merged
Merged
More API changes #69
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wch
reviewed
Feb 8, 2022
wch
reviewed
Feb 8, 2022
wch
reviewed
Feb 8, 2022
wch
reviewed
Feb 8, 2022
wch
reviewed
Feb 8, 2022
…dule in the name; add MISSING_TYPE to public API; add more htmltools to shiny.ui package
…to pull all session dependent ui into another sub-package later on)
cpsievert
force-pushed
the
tidy-namespace
branch
from
February 9, 2022 15:32
dc2c685
to
059a0f2
Compare
…ly private, tweak shiny module naming
…make fileupload submodule private by pulling FileInfo type into types.py
cpsievert
force-pushed
the
tidy-namespace
branch
from
February 9, 2022 19:09
db9e34f
to
7e5abc9
Compare
cpsievert
commented
Feb 9, 2022
cpsievert
commented
Feb 9, 2022
…tive/reactcore submodules to reactive sub-package
wch
reviewed
Feb 10, 2022
wch
approved these changes
Feb 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up of sorts to #51
__all__
inshiny/__init__py
to better define whatfrom shiny import *
does:reactcore
, etc)2. In general, I think we should avoid listing submodules in__all__
and instead list either sub-packages (i.e.,ui
) or the the most important objects within submodules (e.g.,App
,render_plot
, etc).a. The "down-side" is that you have tofrom shiny import foo
to access a submodule, but by being explicit about it, it feels like a good thing considering (3):3. It seems very difficult for users to know what the "true" public-api for a submodule. It seems, by default, most dev environments will list all objects that don't have a_
prefix in that sub-module. For example, this is you get for a tab-completion experience on main right now when typing@reactive.[TAB]
Define
__all__
in every submodule (closes Need to define__all__
for each .py file #56)from shiny.foo import *
. It doesn't necessary discouragefrom shiny.foo import bar
(unlessbar
is imported from another submodule -- at least by default with pylance)_
prefix (there doesn't seem to be a way to say "this thing is internal to shiny, but fine to use across shiny's submodules", but I'd rather err on the side of discouraging users to use it)Moves all UI related functions (even "dynamic UI" things like notifications, progress, insert/remove) to the
ui
sub-package (see More API changes #69 (comment))