-
Notifications
You must be signed in to change notification settings - Fork 140
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
RFC: Use doxygen for generating API docs #29
Conversation
Forgot to mention that I didn't integrate anything into the build system for now. |
Cool! This is probably a case of "he who implements it gets to decide what tool to use," but this looks not bad at all. Would breathe allow us to host everything on readthedocs? Judging by http://cppformat.readthedocs.org/en/stable/ as an example, that does look a lot nicer than the doxygen default. |
I'm quite used to doxygen, so I wouldn't mind. I would make a few small changes: @@ -242,7 +242,7 @@ TCL_SUBST =
# members will be omitted, etc.
# The default value is: NO.
-OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_FOR_C = YES
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
# Python sources only. Doxygen will then generate output that is more tailored
@@ -793,7 +793,7 @@ RECURSIVE = NO
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE = NEWS.md lump.md
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded |
Maybe the Thanks for doing this; improving the documentation was the last thing I wanted to do before releasing utf8proc-1.2, and I agree that Doxygen is the natural choice here. There is no particular reason to stick with the original commenting style of utf8proc, since we are now the upstream — it would be better to use whatever is conventional for Doxygen. |
* STABLE: prohibits combining characters which would violate | ||
* the unicode versioning stability | ||
* | ||
* @param buffer the sequence of unicode characters to reencode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the (native-endian UTF-32) unicode codepoints to re-encode
Thanks for the comments. I've tried to address the suggestions in the additional commits. I kept the changes separate so that they can easily be included or dropped in a final squashed commit. Regarding the enum's it really cleans up the docs a lot. I had to use a typedef for the categories to not conflict with the |
} utf8proc_category_t; | ||
|
||
/** Bidirectional character classes. */ | ||
enum utf8proc_bidi_class { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typedef enum { .... } utf8proc_bidi_class_t
for consistency?
Great, can you update your doc page so that we can see what it looks like? |
@stevengj It's updated. |
@@ -12,6 +12,7 @@ | |||
data/*.txt | |||
data/*.ttf | |||
data/*.sfd | |||
/docs/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the docs
directory for? The generated docs? I'm not sure we should distribute those in the tarball as opposed to just posting them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Distributions prefer shipping docs with packages rather than only online. That's required some work in Julia, so if it works here please keep them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It goes with this line in Doxyfile
:
+OUTPUT_DIRECTORY = docs
It contains docs/html
, docs/man
etc.
Looks good, can you squash the commits for merging? |
RFC: Use doxygen for generating API docs
Now, the next steps:
|
No idea about the second point, but as regards GitHub-generated tarballs, I think they're best avoided. Usually, projects have a I'm not saying this is very high priority, but that's what I see as a good practice. |
Once we've added a `make docs` and `make dist`, we can look into
configuring Travis to build release assets and upload them to GitHub:
http://docs.travis-ci.com/user/deployment/releases/
As for posting docs to readthedocs I can look into it. It looks we need to
install a webhook to notify ReadTheDocs and then add some configuration
files to run Doxygen and Sphinx:
https://docs.readthedocs.org/en/latest/webhooks.html#github
https://breathe.readthedocs.org/en/latest/readthedocs.html
|
Hi,
To address issue #26, I've started working on converting the header file so doxygen can be used to generate API docs. It's not complete yet, hence the "RFC" prefix. I would however like to know if the general direction is good. A couple of things to consider:
#define
statements. If it is preferable, the comments could go before and simply reference the symbols they document.@return
and@param
are used, although it requires that the comments are restructured.You can see the docs here: http://jonas.nitro.dk/utf8proc/html/index.html
With the important part being: http://jonas.nitro.dk/utf8proc/html/utf8proc_8h.html
I've also briefly looked at whether to use Sphinx for generating docs through the breathe plugin. This might allow us to create better looking docs. I don't know if that would be of interest, else I also found a way to use bootstrap with doxygen to make it look more modern.
[ I'm considering using utf8proc in tig so I am very excited that you have taken over maintaining this great library. ]