Skip to content
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

doxygenfile: only @file description #318

Closed
ax3l opened this issue Feb 20, 2017 · 17 comments · Fixed by #501 or #509
Closed

doxygenfile: only @file description #318

ax3l opened this issue Feb 20, 2017 · 17 comments · Fixed by #501 or #509
Assignees
Labels
code Source code enhancement Improvements, additions (also cosmetics)

Comments

@ax3l
Copy link
Contributor

ax3l commented Feb 20, 2017

Hi,

is there a way to select what is printed in doxygenfile:: besides :outline:?
Specifically for .. doxygenfile::, I would like to show

  • only the @file description
  • select: defined classes, typedefs, functions and/or enums
@ax3l
Copy link
Contributor Author

ax3l commented Mar 9, 2017

What I found so far:

file options are set in directive/file.py and filtered by those options in renderer/filter.py - FilterFactory

One question is also how to name an only @file description filter or to add specific no-... filters to remove selected output instead.

@ax3l
Copy link
Contributor Author

ax3l commented Apr 7, 2017

@michaeljones can you give me a hint if you support such an addition and how you would like to see it implemented? :)

@michaeljones
Copy link
Collaborator

Showing only the file description is a very reasonable request. In some ways it would make sense if that was the default which would bring it in line with the class directive (I believe.) We could then have a :members: field that could contain a list of what you want to display (or display everything if it is empty.)

I'm afraid I'm sufficiently out of the loop that I can't make any suggestions of the off of my head but I will attempt to dive into the code and get a better feel for it.

@michaeljones
Copy link
Collaborator

Thank you for your patience and for the ping.

@michaeljones
Copy link
Collaborator

Actually, it would be useful to know what you would like to see for the output if it was just the description. Currently Breathe does not output the file name or any kind suggestion that the target is a file and starts the output with the description. Would you want to see just the description or something more like:


file: MyFile.h

This is my file description and it goes on for a few sentences. Maybe.


ie. with some kind of 'header'.

@ax3l
Copy link
Contributor Author

ax3l commented Apr 13, 2017

thank you for the reply!

for the last point: yes, I think unifying it to behave closer as the class macro:

  • add the name of the file (as it adds the name of the class)
  • add members only on :members: (or maybe called :content: for a file)

would be useful.

Currently I always add the name of the file + the macro which kind of doubles the effort (but I do the same for classes still, since I want the names to show up in my sphinx toc).

ax3l added a commit to ax3l/picongpu that referenced this issue Jan 22, 2018
In the section that introduces the usage of .param files,
only the titles of the files shall be shown. This is currently
not possible, see breathe-doc/breathe#318

This PR applies a work-around for HTML to hide additional doxygen
information (does not fix the underlying issue and is issue still
exists in pdf & epub).
@vermeeren
Copy link
Collaborator

Based upon activity above I am pretty sure that this issue still exists, tagging it as such.

@vermeeren vermeeren added enhancement Improvements, additions (also cosmetics) code Source code labels May 21, 2018
@lshamis
Copy link
Contributor

lshamis commented Apr 8, 2020

Any updates on this?

@vermeeren
Copy link
Collaborator

Breathe has a shortage of contributors, so the only way to get this feature in the short term would be to write patches yourself.

@lshamis
Copy link
Contributor

lshamis commented Apr 9, 2020

@vermeeren can you give me some file/line pointers where things would need to get updated?

@vermeeren
Copy link
Collaborator

@lshamis I did some quick grepping. See breathe/directive/file.py:66 for a starting point, which then points to (one of) the create_project_info() in breathe/project.py, I think the one on line 243 is relevant.

From here on the best way is likely experimentation with modifications and seeing how that influences the result, there is unfortunately no proper technical documentation for Breathe's internals.

@lshamis
Copy link
Contributor

lshamis commented Apr 15, 2020

In #501 I added a :sections: options to the doxygenfile directive.
It takes a space separated list of sections as an argument, and renders only those sections, in the given order.

For example

.. doxygenfile:: nutshell.h
   :sections: briefdescription enum typedef

@ax3l For the @file description, you could use

.. doxygenfile:: nutshell.h
   :sections: detaileddescription

I think this covers most use cases. Thoughts?

@ax3l
Copy link
Contributor Author

ax3l commented Apr 16, 2020

Sounds awesome! I love it!

@vermeeren vermeeren linked a pull request Apr 17, 2020 that will close this issue
@vermeeren
Copy link
Collaborator

vermeeren commented Apr 18, 2020

If someone could check #501 (comment) and post some thoughts about that specific comment I would appreciate it, will make an upload after it is handled.

@vermeeren vermeeren self-assigned this Apr 18, 2020
@vermeeren
Copy link
Collaborator

Reopening until fully handled, see comments in #501.

@vermeeren vermeeren reopened this Apr 18, 2020
@vermeeren vermeeren linked a pull request Apr 18, 2020 that will close this issue
@vermeeren
Copy link
Collaborator

If some of you could review #509 and check if the doc makes sense to you I would appreciate it.

@vermeeren
Copy link
Collaborator

Breathe v4.16.0 has just been released containing the implementation of doxygen(auto)file section option and improved documentation for doxygen(auto)file in general. Unfortunately readthedocs sync is somehow broken, see #475. I added a screenshot below of the section option table. You can of course also make html in the Breathe repo yourself until doc deployments are fixed.

@alephzero thanks again for all the help for documentation improvements and checking everything is fine!

Screenshot_20200419_004436

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Source code enhancement Improvements, additions (also cosmetics)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants