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

RFE: Add Doxygen Github Pages #366

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

drakenclimber
Copy link
Member

@drakenclimber drakenclimber commented Jan 14, 2022

This patchset automatically generates Doxygen documentation and writes it to a github branch. Github supports a feature called pages where a branch is displayed as HTML, and I'm using that to then render the Doxygen output.

Here's what it looks like on my personal libseccomp repo:
https://drakenclimber.github.io/libseccomp/index.html

A couple more comments:

  • I'm only generating Doxygen for the main branch. If we wanted to generate Doxygen for the release branches as well, we could publish each branch to a subfolder. Then we could make a simple index page
  • I added a simple introduction to seccomp.h.in so that the start page isn't empty. Definitely room for improvement here

@drakenclimber
Copy link
Member Author

This could close issue #195

@drakenclimber drakenclimber linked an issue Jan 14, 2022 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Jan 14, 2022

Coverage Status

Coverage remained the same at 89.601% when pulling f2548f2 on drakenclimber:issues/doxygen into 51b50f9 on seccomp:main.

.gitignore Outdated Show resolved Hide resolved
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM(nb) except for a nit about .gitignore.

Copy link
Member

@pcmoore pcmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @drakenclimber, this is a really nice addition! I made a new suggestions, but nothing serious.

include/seccomp.h.in Outdated Show resolved Hide resolved
* @defgroup APIs
* @{
*/

#define API __attribute__((visibility("default")))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this explicitly pull in the API macro? If so I think we can leave that out, the compiler/linker visibility attribute isn't something users/devs need to worry about, it's simply there to limit what symbols are visible in the shared library.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope.

It seemed like a logical grouping to combine all of the API methods into a Doxygen group. Once I had them in a group, it provided an easy way to link to them in Doxygen. Definitely open to other suggestions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay, my mistake.

Somewhat related, is there a way to hit the API macro from the Doxygen docs? It isn't really something a user/dev would need to worry about and I fear it could be misleading to some.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API macro is definitely accessible from Doxygen. A user can view it either by going to Files -> Globals -> Macros or by searching for API directly.

https://drakenclimber.github.io/libseccomp/doxygen/wip/doxygen/globals_defs_a.html#index_a

https://drakenclimber.github.io/libseccomp/doxygen/wip/doxygen/group__APIs.html#gad8ce4efaa307683d3d763b37b4711c53

Thoughts?

README.md Outdated Show resolved Hide resolved
include/seccomp.h.in Outdated Show resolved Hide resolved
Add a Doxygen Github Action and the requisite Doxygen
config file to generate Doxygen documentation.  Documentation
is only generated for the "main" branch and is available here:

	https://seccomp.github.io/libseccomp/

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Add a Doxygen introduction to seccomp.h.in and add an
API section to api.c.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Copy link
Member

@pcmoore pcmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really just that one question regarding hiding the API macro, but I'm good with this either way. I'll refrain from merging this due to that question, but if there is no good answer go ahead and merge it @drakenclimber.

Acked-by: Paul Moore <paul@paul-moore.com>

* @defgroup APIs
* @{
*/

#define API __attribute__((visibility("default")))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay, my mistake.

Somewhat related, is there a way to hit the API macro from the Doxygen docs? It isn't really something a user/dev would need to worry about and I fear it could be misleading to some.

@drakenclimber
Copy link
Member Author

Really just that one question regarding hiding the API macro, but I'm good with this either way. I'll refrain from merging this due to that question, but if there is no good answer go ahead and merge it @drakenclimber.

I would really prefer to resolve the question over the API stuff before we merge it. The only thing worse than missing documentation is wrong/misleading documentation :)

@pcmoore
Copy link
Member

pcmoore commented Feb 1, 2022

I would really prefer to resolve the question over the API stuff before we merge it. The only thing worse than missing documentation is wrong/misleading documentation :)

Fair enough :)

FWIW, I found these suggestions while quickly googling the issue:

@pcmoore
Copy link
Member

pcmoore commented Jan 7, 2024

In an effort to get v2.6.0 out sooner than later, I'm going to suggest we push this out to v2.7.0; if you have any concerns or objections please drop a comment.

@pcmoore pcmoore modified the milestones: v2.6.0, v2.7.0 Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REF: setup libseccomp documentation on Read the Docs
4 participants