-
Notifications
You must be signed in to change notification settings - Fork 9
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
Ignore missing dependencies #77
Conversation
Thanks for this PR! I'm willing to add something like this (maybe with a warning?), but not before having a look at the root cause. Doesn't that sound like a bug in Sphinx? I found two issues that sound related:
Those issues don't look very active, but maybe you can comment there or maybe you even have an idea how to fix this in Sphinx? |
Thank for the links, I'll give it a try. Regarding current PR, there could be more cases which can lead to the same issue. For example, some dependency may be generated by some external process, e.g. OpenAPI specification or some kind of example file. This change allows to avoid issues in such cases.
Added a warning. |
Yes, we should definitely handle such a case. I think a warning is the right thing to do, because users might not even be aware of the situation. Would you like to add a point in the "Caveats" section of the README about missing dependencies? |
If this not lead to issues, why mention that? |
I was mostly thinking about it as a way to document how to disable the warnings. If someone runs Sphinx with warnings turned into errors (with the |
Added a note to README |
Thanks a lot! |
May I request a release? |
I have a README file which includes image from
docs/_static
folder:https://github.com/MobileTeleSystems/onetl/blob/develop/README.rst?plain=1#L28
And I also include this file in
docs/index.rst
file of my documentation:https://github.com/MobileTeleSystems/onetl/blob/06b561a7a7e642893c1feb500109a83de741207c/docs/index.rst?plain=1#L1-L2
This leads to including file with path
docs/docs/_static
because Sphinx does resolve file paths only after the entire content is being included. Fortunately, Sphinx just ignores missing files, and I can use a small hack to include this image todocs/index.rst
(see file below).Unfortunately, this extension expects all the files from directives, like an image above, to exist. When
git ls-tree
receives a file which does not exist, it fails with a message like this:I've added a small check that dependency should exist, to avoid such an issue.