Skip to content

Conversation

@sloede
Copy link
Member

@sloede sloede commented Jul 10, 2023

To generate the docs, go to docs/doxygen and run doxygen without any arguments. You can then view the result by opening the file docs/doxygen/build/html/index.html in your browswer.

This is just a very early draft after playing around some (too much) time with Doxygen 🙄 One particular challenge is the fact that we have to document APIs in two languages (actually three, if you include Julia), and that some function names are identical. I believe that this similarity is the reason why, e.g., the documentation for the Fortran interface might not show up properly (or maybe it just doesn't support Fortran interfaces).

Instead of using Documenter.jl for the main docs and Doxygen for the C/Fortran API, we could also consider to use Doxygen only for the C part and using something like FORD for the Fortran part.

Anyhow, this is as far as I'm going to take it with docs. @bgeihe feel free to adopt this PR, add to it, or just close it again if you don't like it - I just didn't want to get the time I put into this go to waste entirely :-)

The following things one would have to do if willing to make this PR work:

  • Figure out how to properly document the Fortran API
  • Auto-generate the docs as part of the call to Documenter.jl and put the result in a subdirectory
  • Link to C/Fortran API from main docs

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #52 (4cd16ff) into main (5ba6bf2) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main      #52   +/-   ##
=======================================
  Coverage   70.12%   70.12%           
=======================================
  Files           5        5           
  Lines         164      164           
=======================================
  Hits          115      115           
  Misses         49       49           
Flag Coverage Δ
unittests 70.12% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/trixi.c 65.88% <0.00%> (ø)
src/trixi.f90 71.42% <ø> (ø)

@sloede
Copy link
Member Author

sloede commented Jul 13, 2023

Preview the docs here: https://trixi-framework.github.io/libtrixi/previews/PR52

Go to "Reference" ➡️ "C/Fortran", where you will find a link to the doxygen-generated docs: https://trixi-framework.github.io/libtrixi/c-fortran-api

EDIT: The direct link to the C/Fortran API docs will not work anymore since we use proper subdirectories now.

@benegee
Copy link
Collaborator

benegee commented Jul 13, 2023

I would like to check the output of moxygen, but I can do this in a separate PR as well.

@sloede
Copy link
Member Author

sloede commented Jul 13, 2023

I would like to check the output of moxygen, but I can do this in a separate PR as well.

The current state of the PR is that everything seems to work as it should, including the placement of the C/Fortran API into the proper folder such that it respects the versioning of Documenter.jl.

I thus recommend we go ahead and merge this PR in its current state (after a review by you, of course). All improvements can then be iterated on in a new PR.

@sloede sloede marked this pull request as ready for review July 13, 2023 09:23
@sloede sloede requested a review from benegee July 13, 2023 09:24
@sloede sloede enabled auto-merge (squash) July 13, 2023 09:29
@sloede sloede changed the title [WIP] Generate C/Fortran API docs with Doxygen Generate C/Fortran API docs with Doxygen Jul 13, 2023
@sloede sloede merged commit a5cea7b into main Jul 13, 2023
@sloede sloede deleted the msl/add-doxygen branch July 13, 2023 09:43
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.

3 participants