Skip to content

Conversation

@dbaarda
Copy link
Member

@dbaarda dbaarda commented Aug 20, 2021

This improves the documentation so that Doxygen generates more complete documentation with diagrams, and also renders better and is more navigable as markdown docs on GitHub. It includes;

  1. Rename test data files from *.in to *.input and fix .gitattributes so Doxyfile.in is not considered binary.
  2. Rename cmake template from config.h.cmake to config.h.in for consistency.
  3. In Doxyfile.in turn on graphviz svg diargrams by setting HAVE_DOT = YES and DOT_IMAGE_FORMAT = svg. Change to PAPER_TYPE = a4 to remove obsolete 'a4wide' value. In github action check.yml install graphviz dependency.
  4. In CMakeLists.txt make the doc target run in the source dir and change Doxyfile.in to generate output into the binary dir for consistent docs using different build directories.
  5. Use markdown links instead of Doxygen \ref links for root markdown docs so they are navigable on GitHub but still render in Doxygen. Note the ubuntu_latest version of doxygen cannot yet use markdown links reliably enough to use them everywhere.
  6. Tidy the main README.md so that it is more useful as a front page on GitHub.
  7. Tidy all markdown doc titles and anchors to be more consistent and give nicer \ref links.
  8. Add Doxygen \file <foo>.h docstrings to all header and state-engine source files to include them in the Doxygen docs.
  9. Move doxygen docstrings from *.c files into their corresponding *.h files and tidy them a bit.
  10. Add a few missing \param docstrings to silence newer doxygen warnings.

Rename test input files, update test scripts, and update `.gitattributes` to
treat `.input` files as binary, not `.in` files.

This prevents cmake input templates ending in `.in` from being treated like
binary test data files. In particular `doc/Doxyfile.in`.
This makes the name more consistent with other cmake template files.
Set `HAVE_DOT = YES` and `DOT_IMAGE_FORMAT = svg`. FTR I compared and svg
diagrams are smaller than png as you would expect.
Make the doc target run in CMAKE_CURRENT_SOURCE_DIR and change `Doxyfile.in`
to generate output into `OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@`.

This ensures consistent doc filenames and references when using different
build directorys, without leaking the full path of where it was built. See
dbaarda added 12 commits August 23, 2021 22:57
Newer doxygen versions on Debian testing were complaining about this missing
argument docstring entry in librsync.h.
This mostly just reformats paragraphs but also uses markdown links for root
docs CONTRIBUTING.md, NEWS.md, and TODO.md instead of Doxygen `\ref` links.

The root docs don't have `{#anchor}` doxygen anchors which is a pre-requisite
for markdown links to work on the old ubuntu_latest version of Doxygen. Note
currently CONTRIBUTING.md does have an anchor, but I want to test that it
actually fails before removing it.
Currently this document is only referenced by a markdown link in README.md,
and for the old ubuntu_latest Doxygen version markdown links don't work if the
doc has an anchor.
This makes the anchor name more consistent with the filename. Also change the
title to be more consistent with the other usage doc rdiff.md.
This makes the anchor more consistent with the other docs.
This makes the anchor name consistent with the filename.
This makes the filename consistent with the doxygen anchor name.
This makes the title more consistent in the context of the other docs, and
avoids confusion around callbacks used for other current (or future) APIs.
This is more consistent with other document titles and makes neater `\ref`
links.
It seems a4wide is not supported in newer doxygen versions on Debian and is
giving a warning.
This also makes the doxygen `\ref` links a little nicer.
Move doxygen docs from `*.c` files to their corresponding `*.h` files if there
is one. Remove any "private" or "internal" markers from docs. It's already
clear the librsync.h is the only public interface, but the rest of the docs
are useful for understanding the code so we still want to generate them.
@dbaarda
Copy link
Member Author

dbaarda commented Aug 24, 2021

I'm happy with this now, and am going to merge it now.

@dbaarda dbaarda merged commit 95585d1 into librsync:master Aug 24, 2021
@dbaarda dbaarda deleted the dev/docs1 branch August 24, 2021 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant