-
Notifications
You must be signed in to change notification settings - Fork 15
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
Use absolute path to set .ipynb file as dependency #14
base: master
Are you sure you want to change the base?
Conversation
I'm actually not sure whether absolute paths are "officially supported" by Sphinx. Maybe it would be better to fix the relative paths? Feel free to close this PR and replace it with one that fixes the relative paths. |
I'm not sure if I follow what the bug is. Would you mind giving a bit more detail? |
Sure. I didn't look too closely into this anyway, so it might be good to take a closer look: When adding this to the def _env_updated(app, env):
for docname in env.found_docs:
print('dependencies for', docname)
for dep in env.dependencies[docname]:
print(' ', dep) ... and then adding the following to the app.connect('env-updated', _env_updated) ... and running Sphinx on the
The problem is the path However, what I didn't know before, there seems to already be a correct path for the notebook: I don't know why there are two different paths for the same notebook, but I know that one of them is wrong, which I think is the cause for the issue I got: mgeier/sphinx-last-updated-by-git#26. Some of the other dependencies seem to be duplicated as well, but that's probably a separate issue. |
Any news on this? |
Ping? |
I can really see that this will change anything: Currently the code uses path = utils.relative_path(None, abs_path) When |
I don't know about that, but my example clearly shows that there are (invalid) relative paths. Can you reproduce this? |
Getting the relative path seems to be broken, but Sphinx seems to be fine with absolute paths as well.
With a bit of luck, this fixes mgeier/sphinx-last-updated-by-git#26.