From: Martin Quinson Date: Mon, 6 Aug 2018 16:56:22 +0000 (+0200) Subject: doc: current state of the future generation documentation X-Git-Tag: v3_21~261^2~1^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4c1a73ad4fd3003be7637d001ed6b12c1258eb35 doc: current state of the future generation documentation and try to rebuild it on framagit --- 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 0000000000..5cb5fa93f9 Binary files /dev/null and b/docs/source/images/extlink.png differ diff --git a/docs/source/images/extlink.svg b/docs/source/images/extlink.svg new file mode 100644 index 0000000000..f882e193bd --- /dev/null +++ b/docs/source/images/extlink.svg @@ -0,0 +1,62 @@ + + + + + + + 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