Skip to content
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

feat: render ipypopout content in jupyter notebook and lab #805

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maartenbreddels
Copy link
Contributor

Instead of having to rely on voila to display widgets in a popout window, solara itself now can render it. This allows project to drop the dependency on voila.

Copy link
Collaborator

@iisakkirotko iisakkirotko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only minor comments, otherwise looks good!

# tornado probably already does this, but just to be sure we don't serve files outside of the directory
# and that we are consistent with starlette and flask
if not path_is_child_of(Path(abspath), Path(self.root)):
raise PermissionError(f"Trying to read from outside of cache directory: {abspath} is not a subdir of {self.root}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this still allow someone to find what files exist outside a given root directory? Not sure if that is problematic in this case.

abspath = os.path.abspath(os.path.join(root, path))
for root in self.roots[1:]:
abspath = os.path.abspath(os.path.join(root, path))
# return early if someone tries to access a file outside of the directory
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I follow what this comment is trying to say.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that was a leftover comment, I'll remove it. Thanks

Instead of having to rely on voila to display widgets in a popout
window, solara itself now can render it. This allows project to
drop the dependency on voila.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants