Skip to content

Commit

Permalink
Restructure items in Doxygen documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnh committed May 14, 2024
1 parent c67897d commit 898ba7d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
28 changes: 18 additions & 10 deletions docs/build_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ def build_doxygen_page(name, items):
content += name + "\n" + "=" * len(name) + "\n"

for item in items:
directive = "doxygenclass" if item[0].isupper() else "doxygenfunction"
is_struct = any(c.lower() != c for c in item) and '(' not in item

directive = "doxygenstruct" if is_struct else "doxygenfunction"
content += f".. {directive}:: compas::{item}\n"

filename = f"api_cxx/{name}.rst"
Expand Down Expand Up @@ -69,12 +71,20 @@ def build_index_page(groups):
groups = {
"Data structures": [
"CudaContext",
"TissueParameterField",
#"TissueParameterField",
"TissueParameters",
],
"Jacobian computation": [
"compute_jacobian",
"compute_jacobian_hermitian",
"Sequences": [
"FISPSequence",
"pSSFPSequence",
("simulate_magnetization",[
"simulate_magnetization(const CudaContext&, TissueParameters, FISPSequence)",
"simulate_magnetization(const CudaContext&, TissueParameters, pSSFPSequence)",
]),
("simulate_magnetization_derivative",[
"simulate_magnetization_derivative(const CudaContext &, int, Array<cfloat, 2>, TissueParameters, FISPSequence, float)",
"simulate_magnetization_derivative(const CudaContext &, int, Array<cfloat, 2>, TissueParameters, pSSFPSequence, float)"
]),
],
"Trajectories": [
"Trajectory",
Expand All @@ -84,11 +94,9 @@ def build_index_page(groups):
"magnetization_to_signal",
"phase_encoding",
],
"Sequences": [
"FISPSequence",
"pSSFPSequence",
"simulate_magnetization",
"simulate_magnetization_derivative",
"Jacobian computation": [
"compute_jacobian",
"compute_jacobian_hermitian",
],
"Utilities": [
"compute_residual",
Expand Down
3 changes: 3 additions & 0 deletions docs/example.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Example
=======
TODO
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

Compas Toolkit <self>
install
example
api_cxx
Julia API <https://nlesc-compas.github.io/compas-toolkit/api_julia>
Github Repository <https://github.com/NLeSC-COMPAS/compas-toolkit>
Expand Down

0 comments on commit 898ba7d

Please sign in to comment.