-
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
Support for literalinclude
#105
Comments
Thanks for the suggestion! Initially, I think it should be possible. I'll have a look at how it works and post back. |
Hi again, thanks for being patient. |
Oh, you know what, it already works with the So you'd have:
|
Hey, thanks for the prompt reply! I tried that out for our documentation, and it sort of works. Our use case is probably a bit complex, as it also involves using the I've pushed up what I have to this PR, and the page that I modified is built here. I got the first two links to work, but subsequent ones failed:
The numpy and Is there a good way to debug why the extension failed to resolve those references? There's also a warning of |
Okay, I'll try to help! But the parsing shouldn't have to do with concats or anything. This looks like a linking bug, since the class does have the methods documented and you do indeed concatenate the examples. But we do demonstrate similar functionality on our RTD front page :D And I tested locally that the concatenation has nothing to do with it. So is the class somehow special? Does the example link if it's as one piece? BTW, the "missing pygeo" error is probably because the site is missing a module anchor from |
Thanks for your help---please don't feel obligated to answer my questions since I know everyone who's working on FOSS is just doing this on their free time :) The examples still don't work if I put everything together, so now I'm suspecting that it's something is wrong with the autodoc setup of I never really figured out how to use autodoc properly I think, say if I want separate documentation pages for different classes/modules under the package |
No worries! Knowing Sphinx there may be subtle differences between the two :D at least it can affect the naming (prefix), but the inventory entry, i.e. the anchor name seems to match. So I'm honestly not sure where to look next. Maybe you could set up a toy project with similar documentation. That could reproduce the issue! |
Is there a way to figure out what reference |
That could be useful debugging info! But for now this is the function responsible for hunting the type down. Maybe you can modify / debug it locally. I'll have a look at adding more info tomorrow! |
I included more debugging information in #106! You can use the git version until we release. I'll declare this issue done, since I'm pretty happy with how |
Thanks a lot for the quick responses! Happy to close this issue since |
Fair point! |
Even something quick like just adding a sentence or two in the basic example page should be good. That way, people who use the search function for it in the docs (as I did) would be able to find the info. I can also do this at some point but I'm fairly busy these days with my dissertation. |
I'm back after the weekend, so I'll take care of it then! |
Thanks for this extention! It looks super neat.
In our documentation, we mainly use
literainclude
blocks instead of having the code directly in the RST file, so that standalone Python scripts in the repo be run without needing to copy/paste. I was wondering if it's possible to support these blocks in addition to code blocks.The text was updated successfully, but these errors were encountered: