From 37c17634ea54f0a0f3fd1d09ee6e620f3d13747e Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 6 Aug 2018 18:56:22 +0200 Subject: [PATCH] doc: current state of the future generation documentation and try to rebuild it on framagit --- .gitlab-ci.yml | 8 ++- docs/source/conf.py | 20 +++++- docs/source/images/extlink.png | Bin 0 -> 416 bytes docs/source/images/extlink.svg | 62 ++++++++++++++++++ docs/source/index.rst | 18 ++++- .../s4u-app-masterworkers-fun.cpp | 6 ++ 6 files changed, 109 insertions(+), 5 deletions(-) create mode 100644 docs/source/images/extlink.png create mode 100644 docs/source/images/extlink.svg diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1a005826f7..0085c43ae7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,13 @@ image: debian:testing-slim .build: &build script: - apt-get update - - apt-get install -y python3-sphinx doxygen python3-breathe python3-sphinx-rtd-theme + - apt-get install -y python3-sphinx doxygen python3-breathe python3-sphinx-rtd-theme pip3 + - apt-get install -y cmake doxygen libboost-all-dev libboost-dev + - pip3 install --no-deps exhale + - cmake -Denable_documentation=ON . + - make documentation + - mkdir docs/doxyoutput + - mv doc/xml docs/doxyoutput - cd docs - sphinx-build -M html source/ build/ - mv build/html ../public diff --git a/docs/source/conf.py b/docs/source/conf.py index ddca903e1a..e5bcf6c9b0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -43,11 +43,27 @@ extensions = [ 'sphinx.ext.mathjax', # 'sphinx.ext.ifconfig', 'breathe', + 'exhale', ] -breathe_projects = { 'simgrid': '../doc/xml' } +breathe_projects = { 'simgrid': '../../doc/xml' } breathe_default_project = "simgrid" - + +# Setup the exhale extension +exhale_args = { + # These arguments are required + "containmentFolder": "./api", + "rootFileName": "library_root.rst", + "rootFileTitle": "SimGrid Full API", + "doxygenStripFromPath": "..", + # Suggested optional arguments + "createTreeView": True, + # TIP: if using the sphinx-bootstrap-theme, you need + # "treeViewIsBootstrap": True, + "exhaleExecutesDoxygen": True, + "exhaleDoxygenStdin": "INPUT = ../../include" +} + # Add any paths that contain templates here, relative to this directory. # templates_path = ['_templates'] diff --git a/docs/source/images/extlink.png b/docs/source/images/extlink.png new file mode 100644 index 0000000000000000000000000000000000000000..5cb5fa93f9912ba6f34e49cd935ae9e95ff64309 GIT binary patch literal 416 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh0wlLOK8*rWEa{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4>Ra)Jf&o>r6 zR_VId!@Gy8@`^x>>Ws`gJ-pKvwN5VmdH-0#y3{3WU;n=L^SRWn2(E|)+pB-nIqohA zUAVA$WpQC`XvoP#6GqYJEXKC;SGst*PrD>8KPx=HXWOs7c`wB|zZxsO^lz^Rx>>cv zHKHUXu_V + + + + + + image/svg+xml + + + + + + + + + + diff --git a/docs/source/index.rst b/docs/source/index.rst index f20d9aefee..9b50a14aeb 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -4,13 +4,27 @@ Welcome to SimGrid's documentation! =================================== .. toctree:: - :maxdepth: 2 - :caption: Contents: + :maxdepth: 1 + :caption: Basic Use Cases: + + Simulating Algorithms + Simulating MPI Apps + +.. toctree:: + :maxdepth: 1 + :caption: Getting Started: What is SimGrid Installing SimGrid Start your Own Project +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: API Reference: + + API + S4U Indices and tables ================== diff --git a/examples/s4u/app-masterworkers/s4u-app-masterworkers-fun.cpp b/examples/s4u/app-masterworkers/s4u-app-masterworkers-fun.cpp index c90c96557a..0cfae30d86 100644 --- a/examples/s4u/app-masterworkers/s4u-app-masterworkers-fun.cpp +++ b/examples/s4u/app-masterworkers/s4u-app-masterworkers-fun.cpp @@ -7,6 +7,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_app_masterworker, "Messages specific for this example"); +// master-begin static void master(std::vector args) { xbt_assert(args.size() == 5, "The master function expects 4 arguments"); @@ -38,7 +39,9 @@ static void master(std::vector args) mailbox->put(new double(-1.0), 0); } } +// master-end +// worker-begin static void worker(std::vector args) { xbt_assert(args.size() == 2, "The worker expects a single argument"); @@ -60,7 +63,9 @@ static void worker(std::vector args) XBT_INFO("Exiting now."); } +// worker-end +// main-begin int main(int argc, char* argv[]) { simgrid::s4u::Engine e(&argc, argv); @@ -81,3 +86,4 @@ int main(int argc, char* argv[]) return 0; } +// main-end -- 2.20.1