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

Just a question about sys.path.insert in example notebooks #42

Open
misolietavec opened this issue Oct 28, 2023 · 5 comments
Open

Just a question about sys.path.insert in example notebooks #42

misolietavec opened this issue Oct 28, 2023 · 5 comments

Comments

@misolietavec
Copy link

Why sys.path.insert(0, os.path.abspath('./..')) ?

@nir
Copy link
Owner

nir commented Oct 28, 2023

this runs the demos with the library source code that came with them, regardless of the version actually installed.

@misolietavec
Copy link
Author

misolietavec commented Oct 28, 2023 via email

@nir
Copy link
Owner

nir commented Oct 29, 2023

the point is that if you downloaded or pulled the repository in order to run jupylet examples in it, then these examples are guaranteed to be synchronized with that code base with which they were downloaded or pulled.

@misolietavec
Copy link
Author

My concern about links outside of examples is that I plan to use jupylet in educational environment with jupyterhub. I think, directory examples should be self-contained and the synchronization between jupylet installation and examples is the responsibility of system administrator. For example, link to ../docs/_static/audio/tb303.5.ogg in shadertoy_demo.py is probably not the best choice, maybe all audio samples could be moved to examples/sounds ?

@nir
Copy link
Owner

nir commented Oct 29, 2023

if you plan to use it in a stable "static" environment with a particular jupylet revision that you can control, then I think the best would be to just remove that sys.path.append(...) line since you can expect the installed revision of jupylet to match the revision of the examples folder.

I would be interested to learn more about your plan to use it in an educational environment since that was one of my hopes for the project. can you elaborate on that either in a "Discussions" thread or directly to my email [email protected]

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

No branches or pull requests

2 participants