-
Notifications
You must be signed in to change notification settings - Fork 17
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
Wrong path picked up when execution occurs through script not in same directory #28
Comments
Does it work if you do |
It's a bit tricky to do with Anyway, I did a bit more digging and found that if I execute Note that I have this work-around: https://github.com/eth-vaw-glaciology/GlacioTeaching.jl/blob/ce04d95629c73df2f3d23337a1a9aaba93770239/src/GlacioTeaching.jl#L14 |
I now updated the linked repo. The script which shows the issue is now Also, the script is now more realistic with https://github.com/mauro3/NBinclude-issue-tmp.jl/blob/caeb185732acaee10ddf99c7e7e39f4b56e3c1fd/scripts/lit-script-include.jl#L3-L4 being used for notebook creation and https://github.com/mauro3/NBinclude-issue-tmp.jl/blob/caeb185732acaee10ddf99c7e7e39f4b56e3c1fd/scripts/lit-script-include.jl#L6 otherwise. |
When you do I'm a little confused about whether one of these behaviors is not happening in your case, or if it is happening but you want a different behavior. |
When generating and evaluating notebooks with https://github.com/fredrikekre/Literate.jl via a scrip which is not in the output directory, then
@nbinclude
generates a path which contains the path of the Literate script and not the path of the notebook-directory. I'm pretty sure that this is a NBInclude issue, but happy to move to Literate.jl if that is not the case.To reproduce I setup a repo: https://github.com/mauro3/NBinclude-issue-tmp.jl
After cloning that repo, reproduce with:
Backtrace:
What happens:
notebooks
for this example, see https://github.com/fredrikekre/Literate.jl/blob/60c08dc23e3f6dc6fb2ae04571f9f6e8a0c6d2fa/src/Literate.jl#L743@nbinclude
call, at https://github.com/stevengj/NBInclude.jl/blob/d1cff61be648d2f8400f3eb4bc0509f622917088/src/NBInclude.jl#L65 the bug occurs. Thepath
variable changes from "00.jl" to ".../literate-nbinclude/00.jl". I'm not sure whatBase._include_dependency(m, path)
is supposed to do but here it should return ".../literate-nbinclude/notebooks/00.jl"The text was updated successfully, but these errors were encountered: