-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Autodoxygen source option not known #83
Comments
Hi scopatz, Thank you reporting this. Sorry that it seem to be broken. I'm just getting my set up back together and I should be able to check this out soon. I am sorry for the trouble. I'm not sure what would have gone wrong. Michael |
Thanks for looking into it @michaeljones |
@michaeljones I'm also facing a similar issue.
Is this fixed yet? |
Hi, This hasn't been fixed yet but I am finally in place to start looking into it. I'll let you know in the next few days how I get on. Sorry for the hold up, I've been moving countries and travelling a little in between so it has been a while since I've had a decent development set up. Michael |
Hi So @sushant-hiray, your issue is because the documentation is wrong. My bad. The rst directive is actually called @scopatz are you still experiencing a problem with this? The latest master is working fine for me if I do a build of the docs and go to the example page. The commit that you have referenced (b30dee9) is from before some of the major work on the autodoxygenindex directive and is long before the current 1.2 tag. Could you take another look? Sorry for the confusion. Thanks, |
Hi, Thanks, |
Thanks @michaeljones, you are correct that I mistakenly seemed to be on an older version of the code. Thanks! Feel free to close if you wish. I am now experiencing an issue where multiple uses of autodoxygenindex will all appear with the same value, even if they are pointed at different files. You can see this if you looks at https://github.com/pyne/pyne. I can open up another issue once I track this down. |
Ah, thank you for letting me know. Shame about the bug with the auto stuff. I'll try to have a look at reproducing it and seeing what it going on. Let me know if you find anything. Cheers, |
Will do :) |
Hey, So, I haven't tested anything yet, but it struck me last night that you might want a different source for each autooxygenindex directive usage. Currently they all refer to
then
Unfortunately this means that in your Breathe config you'll need multiple entries in the This seems a little irrational as a design but I think my plan was that if we introduced more I imagine what you really want in this case is some kind of Does that make sense? Bit of a ramble, I'm afraid. Michael |
Hey, Still there hasn't been any change. So all the files contain the same html output. I agree that a much better option, we are trying to get is Regards, |
Thank you for the input. I'll try to have a look into it. Michael |
Hi @michaeljones! I suspected that |
Thanks, though it seems that Sushant has tried that and not been very lucky. I'll try to set up an example tomorrow and look into it more closely. The code might be doing the grouping in the background in another way and getting confused. I'd hope my suggestion would work and I'll try to fix it if it doesn't, but then, yeah, it makes sense to have a look at an Cheers, Michael |
Unfortuanetly, I can confirm now that this did not work. It looks like there are no quick shortcuts. |
I've just pushed a branch called If you guys could check it out and let me know if it works for you (I've tested with a simple set up) then I'll merge and release something. Cheers for all the help, |
Hello @michaeljones, this works like a dream with the different source trick described above! It has the same problems as before if you have the same source. I am using the following in my conf.py that you may want to refernce in the docs as an example: # C++ Autodocumentation Flags
breathe_projects = {"pyne": None,}
breathe_default_project = 'pyne'
breathe_domain_by_extension = {"h": "cpp",}
breathe_projects_source = {"pyne": '../cpp',}
for p in os.listdir(breathe_projects_source['pyne']):
p, _ = os.path.splitext(p)
breathe_projects['pyne_' + p] = breathe_projects['pyne']
breathe_projects_source['pyne_' + p] = breathe_projects_source['pyne'] This can be used with: .. autodoxygenindex:: data.h
:source: pyne_data Obviously people might need to replace 'pyne' and their own files, but it is a pretty clean strategy. |
Thanks again for this by the way! This is right in time for a PyNE release :). |
Cheers for the update. Much appreciated and I'm glad it is working. I've actually just pushed an
ie. You don't have to provide a different source for every instance. I would welcome feedback if you get the chance to test it out. Thanks again for persevering with Breathe! |
Hi @michaeljones! Thanks, I tried this out and it almost works. For the (last?) file everything seems great - here data.h. However for all other webpages, the html contains warnings of the following form:
It seems like when multiple files are used the pyne xml file is being deleted or over written. To be clear, I have the following setup: material.rst Materials -- ``libpyne_material``
=================================
.. autodoxygenfile:: material.h
:source: pyne data.rst Nuclear Data -- ``libpyne_data``
=====================================
.. autodoxygenfile:: data.h
:source: pyne |
Thanks for testing it out and sorry for not catching that. I didn't realise that the Transform functionality was run separately on each file by Sphinx. My "more complex" test was two directives in the same file. I'll try to find a way to make it work across all the files. I'll let you know if I get anywhere. Thank you for your time. Michael |
Thanks for persevering! |
I'm afraid I cannot see a clear way forward with the current Sphinx API and events system. I have registered an issue with the Sphinx devs to see if I can get any help:
I'll post on the sphinx-dev mailing list as well and we'll see how we get on. Cheers, |
Thanks! I upvoted the issue! |
Hey, I've not really heard much feedback from the Sphinx guys and looking at the Sphinx source code I really can't see an appropriate place to put the hooks we need. Perhaps someone with more experience will be able to tell but for the moment it looks a little bleak. An alternative is that we provide more information up front; instead of Breathe having to discover the source files required for doxygen from the rst documents, we could provide a configuration variable that lists all the required source files by project. Then you'd have something like:
Or something similar. Then breathe can know what files to process with doxygen up front and we get around this issue. Is that tolerable? You still have Breathe looking after the doxygen call and file management. Cheers, |
Hi @michaeljones. That is totally acceptable to me! Sorry for not getting back for so long. (PyCon happened |
Hi @scopatz, Cheers for getting back to me. Hope you enjoyed PyCon! I'm afraid I've been fairly busy as well but I've just pushed some changes to the autofile branch which hopefully will work well with this new config based approach. In the end, I've gone with a config value of:
I've updated the documentation on that branch to reflect the changes. I would greatly appreciate it if you have a chance to give it a go. I've tried to test the various combinations but there is nothing like a proper project to give it a go with. Cheers, |
Hi, The docs are here:
I'm going to close this ticket but I'm very happy to open up more for other more specific issues and additional features. Cheers! |
Thanks @michaeljones! |
Could you please verify this is still working? It seems that it is broken at my side.
|
Was this fixed? I'm getting the same error:
|
@leimao @SooluThomas The option is called Edit: see also for example the doc https://breathe.readthedocs.io/en/latest/autofile.html#autodoxygenfile-example |
As of the current master v1.2 (b30dee9), I am now seeing a lof of breakage with the autodoxygenindex directive:
I don't know when this snuck in, but now breathe doesn't work at all with automatic tools.
The text was updated successfully, but these errors were encountered: