diff --git a/.circleci/config.yml b/.circleci/config.yml index adab04c45e77ed1773873d2b68fdd49d1c2860a0..5c6c2a06aad8570f5ff5771c65e72e0ed534142e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -268,6 +268,23 @@ references: file: lcov/project_coverage.info flags: project when: always + setup_doc_dependencies: &setup_doc_dependencies + run: + name: Install Doc Dependencies + command: | + apk --no-cache add python3 + python3 -m ensurepip + pip3 install sphinx==1.7.5 docutils==0.14 sphinx_rtd_theme breathe==4.9.1 sphinxcontrib-plantuml + apk --no-cache add make + apk --no-cache add doxygen + apk --no-cache add graphviz + apk --no-cache add ttf-dejavu + apk --no-cache add openjdk8-jre + make_docs: &make_docs + run: + command: | + cd src/navigation2/sphinx_doc + make html commands: <<: *common_commands @@ -310,6 +327,14 @@ commands: steps: - *collect_overlay_coverage - *upload_overlay_coverage + install_doc_dependencies: + description: "Install documentation dependencies" + steps: + - *setup_doc_dependencies + build_docs: + description: "Build docs" + steps: + - *make_docs executors: debug_exec: @@ -330,6 +355,10 @@ executors: CACHE_NONCE: "Release" OVERLAY_MIXINS: "release ccache" UNDERLAY_MIXINS: "release ccache" + docs_exec: + docker: + - image: alpine:latest + working_directory: /opt/overlay_ws jobs: debug_build: &debug_build @@ -370,6 +399,16 @@ jobs: <<: *release_test environment: RMW_IMPLEMENTATION: "rmw_opensplice_cpp" + docs_build: + executor: docs_exec + steps: + - install_doc_dependencies + - *on_checkout + - build_docs + docs_publish: + executor: docs_exec + steps: + - run: echo 'TODO - This is where we would publish the docs.' workflows: version: 2 @@ -383,6 +422,13 @@ workflows: - release_test: requires: - release_build + - docs_build + - docs_publish: + requires: + - docs_build + filters: + branches: + only: master nightly: jobs: - debug_build diff --git a/.gitignore b/.gitignore index a86765af593c2ea3fe09be6e783dd3f741870579..173558e8c0e72a8729ff13a3d8b4b7cde6fb1627 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,5 @@ install # Python artifacts __pycache__/ *.py[cod] + +sphinx_doc/_build diff --git a/sphinx_doc/LICENSE b/sphinx_doc/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..62da4936b3b89284d85ef3ac0626243f7e6877ca --- /dev/null +++ b/sphinx_doc/LICENSE @@ -0,0 +1 @@ +Apache 2.0 diff --git a/sphinx_doc/Makefile b/sphinx_doc/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..2b396317461b780c35e702f273450b66c440922d --- /dev/null +++ b/sphinx_doc/Makefile @@ -0,0 +1,58 @@ +# Minimal makefile for Sphinx documentation +# + +ifeq ($(VERBOSE),1) + Q = +else + Q = @ +endif + +# You can set these variables from the command line. +SPHINXOPTS ?= -q +SPHINXBUILD = sphinx-build +SPHINXPROJ = "Navigation 2 Documentation" +SOURCEDIR = . +BUILDDIR = _build + +DOC_TAG ?= development +RELEASE ?= latest +PUBLISHDIR = /tmp/navigation2 + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @echo "" + @echo "make publish" + @echo " publish generated html to thesofproject.github.io site:" + @echo " specify RELEASE=name to publish as a tagged release version" + @echo " and placed in a version subfolder. Requires repo merge permission." + +.PHONY: help Makefile + +# Generate the doxygen xml (for Sphinx) and copy the doxygen html to the +# api folder for publishing along with the Sphinx-generated API docs. + +html: + $(Q)$(SPHINXBUILD) -t $(DOC_TAG) -b html -d $(BUILDDIR)/doctrees $(SOURCEDIR) $(BUILDDIR)/html $(SPHINXOPTS) $(O) + +# Remove generated content (Sphinx and doxygen) + +clean: + rm -fr $(BUILDDIR) + +# Copy material over to the GitHub pages staging repo +# along with a README + +publish: + #cd /tmp; git clone git@github.com:ros-planning/navigation2.git + cd $(PUBLISHDIR) && git checkout gh-pages + rm -fr $(PUBLISHDIR)/* + cp -r $(BUILDDIR)/html/* $(PUBLISHDIR) + cp scripts/.nojekyll $(PUBLISHDIR)/.nojekyll + cd $(PUBLISHDIR); git add -A; git commit -s -m "publish $(RELEASE)"; git push origin; + + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile doxy + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/sphinx_doc/README.md b/sphinx_doc/README.md new file mode 100644 index 0000000000000000000000000000000000000000..09c2c178b8ef6c8d8b9245c2f9c1000e2999b1f4 --- /dev/null +++ b/sphinx_doc/README.md @@ -0,0 +1,6 @@ +# Project Documentation + +This folder holds the source and configuration files used to generate the +Project documentation web site. + +Learn how to setup and generate documentation by reading the howtos diff --git a/sphinx_doc/_themes/otc_tcs_sphinx_theme/.gitignore b/sphinx_doc/_themes/otc_tcs_sphinx_theme/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..bee8a64b79a99590d5303307144172cfe824fbf7 --- /dev/null +++ b/sphinx_doc/_themes/otc_tcs_sphinx_theme/.gitignore @@ -0,0 +1 @@ +__pycache__ diff --git a/sphinx_doc/_themes/otc_tcs_sphinx_theme/layout.html b/sphinx_doc/_themes/otc_tcs_sphinx_theme/layout.html new file mode 100644 index 0000000000000000000000000000000000000000..1bdd7ce4602462e6ac68c33bbc606944f9ef25ca --- /dev/null +++ b/sphinx_doc/_themes/otc_tcs_sphinx_theme/layout.html @@ -0,0 +1,14 @@ +{% extends "sphinx_rtd_theme/layout.html" %} + +{% block extrahead %} + +<link rel="stylesheet" href="{{ pathto('_static/tcs_theme.css', 1) }}" type="text/css" /> + +{% endblock %} + + +{% block footer %} + +<script type="text/javascript" src="{{ pathto('_static/tcs_theme.js', 1) }}"></script> + +{% endblock %} diff --git a/sphinx_doc/_themes/otc_tcs_sphinx_theme/readme.rst b/sphinx_doc/_themes/otc_tcs_sphinx_theme/readme.rst new file mode 100644 index 0000000000000000000000000000000000000000..7f5f284f281cbdcb12768f2b9d36d5520e5f01f1 --- /dev/null +++ b/sphinx_doc/_themes/otc_tcs_sphinx_theme/readme.rst @@ -0,0 +1,23 @@ +OTC-TCS Sphinx Theme +#################### + +Built on top of the popular Read the Docs Sphinx theme, this theme +has a few small formatting/color improvements and implements collapsible +sections. It is in active development in order to support OTC and other +Intel organizations to publish high quality, consistent documentation +for open source projects. + +How to use it +************* + +#. Download or clone the repository +#. Create a ``_themes`` directory in main directory of your sphinx + documentation +#. Install sphinx_rtd_theme using pip: ``pip3 install sphinx_rtd_theme`` +#. copy ``otc_tcs_sphinx_theme`` directory into the new ``_themes`` directory +#. Add the following to your ``conf.py``: + + .. code-block:: python + + html_theme = 'otc_tcs_sphinx_theme' + html_theme_path = ['_themes'] diff --git a/sphinx_doc/_themes/otc_tcs_sphinx_theme/static/tcs_theme.css b/sphinx_doc/_themes/otc_tcs_sphinx_theme/static/tcs_theme.css new file mode 100644 index 0000000000000000000000000000000000000000..0b446786318fd58e51f305af4ac109033a983248 --- /dev/null +++ b/sphinx_doc/_themes/otc_tcs_sphinx_theme/static/tcs_theme.css @@ -0,0 +1,155 @@ +/* -- Extra CSS styles for content (RTD theme) ----------------------- */ + +/* make the page width fill the window */ +.wy-nav-content { + max-width: none; +} + +/* (temporarily) add an under development tagline to the bread crumb +.wy-breadcrumbs::after { + content: " (Content under development)"; + background-color: #FFFACD; + color: red; + font-weight: bold; +} +*/ + +/* code block highlight color in rtd changed to lime green, no no no */ + +.rst-content tt.literal, .rst-content code.literal, .highlight { + background: #f0f0f0; +} +.rst-content tt.literal, .rst-content code.literal { + color: #000000; +} + +/* Make the version number more visible */ +.wy-side-nav-search>div.version { + color: rgba(255,255,255,1); +} + +/* squish the space between a paragraph before a list */ +div > p + ul, div > p + ol { + margin-top: -20px; +} + +/* add some space before the figure caption */ +p.caption { + border-top: 1px solid; + margin-top: 1em; +} + +/* add a colon after the figure/table number (before the caption) */ +span.caption-number::after { + content: ": "; +} + +p.extrafooter { + text-align: right; + margin-top: -36px; +} + +table.align-center { + display: table !important; +} + + +.code-block-caption { + color: #000; + font: italic 85%/1 arial,sans-serif; + padding: 1em 0; + text-align: center; +} + +/* make .. hlist:: tables fill the page */ +table.hlist { + width: 95% !important; +} + +/* override rtd theme white-space no-wrap in table heading and content */ +th,td { + white-space: normal !important; +} + +/* tweak for doxygen-generated API headings (for RTD theme) */ +.rst-content dl.group>dt, .rst-content dl.group>dd>p { + display:none !important; +} +.rst-content dl.group { + margin: 0 0 12px 0px; +} +.rst-content dl.group>dd { + margin-left: 0 !important; +} +.rst-content p.breathe-sectiondef-title { + text-decoration: underline; /* for API sub-headings */ + font-size: 1.25rem; + font-weight: bold; + margin-bottom: 12px; +} + +.rst-content div.breathe-sectiondef { + padding-left: 0 !important; +} + +.clps1 { + font-size: 175%; +} + +.clps2 { + font-size: 150%; +} + +.clps3 { + font-size: 125%; +} + +.clps4 { + font-size: 115%; +} + +.clps5 { + font-size: 110%; +} + +.clps6 { + font-size: 100%; +} + +.collapsible { + margin-left: -10px; + background-color: #f1f1f1; + cursor: pointer; + padding: 18px 18px 18px 10px; + width: 100%; + border: none; + text-align: left; + outline: none; + font-weight: 700; + font-family: "Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif; +} + +.collapsible:hover { + background-color: #d8d8d8; +} + +.collapsible:after { + content: '\002B'; + font-weight: bold; + float: right; + margin-left: 5px; +} + +.active:after { + content: "\2212"; +} + +.content-collapse { + overflow: hidden; + transition: max-height 0.2s ease-out; +} + +.header__menu_list li { + display: inline; + margin-left: 20px; +} \ No newline at end of file diff --git a/sphinx_doc/_themes/otc_tcs_sphinx_theme/static/tcs_theme.js b/sphinx_doc/_themes/otc_tcs_sphinx_theme/static/tcs_theme.js new file mode 100644 index 0000000000000000000000000000000000000000..9064b9f77439a93b2f2d2185cd333e143516830a --- /dev/null +++ b/sphinx_doc/_themes/otc_tcs_sphinx_theme/static/tcs_theme.js @@ -0,0 +1,50 @@ +var i; +var contents = document.getElementsByClassName("content-collapse section"); + +for (i = 0; i < contents.length; i++) { + + //Make sure the "content-collapse section" class is occurring in <div> + if (contents[i].tagName.toLowerCase() == 'div') { + var element = contents[i].children[0]; + var element_type = element.tagName.toLowerCase(); + var span_id; + var spanElement; + + //if the next element is a span grab the id and skip to the header + if (element_type == 'span') { + span_id = element.id; + element.id = ""; + element = contents[i].children[1]; + element_type = element.tagName.toLowerCase(); + } + + var btn = document.createElement("BUTTON"); + //If it is a header capture which level and pass on to button + if (element_type.length == 2 && element_type[0] == 'h') { + var newClass = 'clps' + element_type[1]; + //collapses the section by default only if javascript is working + contents[i].style.maxHeight = 0; + //Build the button and define behavior + btn.className += " " + newClass; + btn.innerHTML = element.innerHTML; + btn.className += " collapsible"; + btn.id = span_id; + btn.addEventListener("click", function() { + this.classList.toggle("active"); + var content = this.nextElementSibling; + if (content.style.maxHeight != "0px"){ + content.style.maxHeight = 0; + } else { + content.style.maxHeight = content.scrollHeight + "px"; + } + }); + + //Add the button to the page and remove the header + contents[i].parentNode.insertBefore(btn, contents[i]); + contents[i].removeChild(element); + }else{ + //reset span id if it isn't followed by Hx element + spanElement.id = span_id; + } + } +} \ No newline at end of file diff --git a/sphinx_doc/_themes/otc_tcs_sphinx_theme/theme.conf b/sphinx_doc/_themes/otc_tcs_sphinx_theme/theme.conf new file mode 100644 index 0000000000000000000000000000000000000000..fc97c5522da9a0466851b6eb65e0aecdde48a3a3 --- /dev/null +++ b/sphinx_doc/_themes/otc_tcs_sphinx_theme/theme.conf @@ -0,0 +1,2 @@ +[theme] +inherit = sphinx_rtd_theme diff --git a/sphinx_doc/conf.py b/sphinx_doc/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..a220eec6f974ae5b475f2a841ca323587d66f8ee --- /dev/null +++ b/sphinx_doc/conf.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +# +# Project SOF documentation build configuration file, created by +# sphinx-quickstart on Wed Jan 10 20:51:29 2018. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('.')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['breathe', 'sphinx.ext.graphviz', 'sphinxcontrib.plantuml', 'sphinx.ext.extlinks'] + +graphviz_output_format='png' +graphviz_dot_args=[ + '-Nfontname="verdana"', + '-Gfontname="verdana"', + '-Efontname="verdana"'] + +plantuml = 'java -jar ' + os.path.join(os.path.abspath('.'), 'scripts/plantuml.jar') +plantuml_output_format = 'png' + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Navigation 2' +copyright = u'2019' +author = u'Various' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. + +version = release = "0.2.3" + +# +# The short X.Y version. +# version = u'0.1' +# The full version, including alpha/beta/rc tags. +# release = u'0.1' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build','_themes','scripts' ] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +try: + import sphinx_rtd_theme +except ImportError: + html_theme = 'alabaster' + # This is required for the alabaster theme + # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars + html_sidebars = { + '**': [ + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + ] + } + sys.stderr.write('Warning: sphinx_rtd_theme missing. Use pip to install it.\n') +else: + html_theme = "sphinx_rtd_theme" + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + html_theme_options = { + 'canonical_url': '', + 'analytics_id': '', + 'logo_only': False, + 'display_version': True, + 'prev_next_buttons_location': 'None', + # Toc options + 'collapse_navigation': False, + 'sticky_navigation': True, + 'navigation_depth': 4, + } + +html_theme_path = ['_themes'] +html_theme = 'otc_tcs_sphinx_theme' + +# Here's where we (manually) list the document versions maintained on +# the published doc website. On a daily basis we publish to the +# /latest folder but when releases are made, we publish to a /<relnum> +# folder (specified via RELEASE=name on the make command). + +if tags.has('release'): + current_version = version +else: + version = current_version = "latest" + +html_context = { + 'current_version': current_version, + 'versions': ( ("latest", "/latest/"), +# ("0.1-rc4", "/0.1-rc4/"), + ) + } + + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +html_logo = 'images/logo_white_200w.png' +html_favicon = 'images/favicon-48x48.png' + +numfig = True +#numfig_secnum_depth = (2) +numfig_format = {'figure': 'Figure %s', 'table': 'Table %s', 'code-block': 'Code Block %s'} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +#html_static_path = ['static'] + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +html_show_sphinx = False + +# If true, links to the reST sources are added to the pages. +html_show_sourcelink = False + +# If not '', a 'Last updated on:' timestamp is inserted at every page +# bottom, +# using the given strftime format. +html_last_updated_fmt = '%b %d, %Y' + +# -- Options for HTMLHelp output ------------------------------------------ + + +rst_epilog = """ +.. include:: /substitutions.txt +""" + + +breathe_projects = { + "SOF Project" : "doxygen/xml", +} +breathe_default_project = "SOF Project" +breathe_default_members = ('members', 'undoc-members', 'content-only') + +extlinks = {'projectfile': + ('https://github.com/ros-planning/navigation2/blob/master/%s', 'filepath ')} diff --git a/sphinx_doc/contribute/contribute_guidelines.rst b/sphinx_doc/contribute/contribute_guidelines.rst new file mode 100644 index 0000000000000000000000000000000000000000..c5cadf20a5a12dd22627d69cd927d896fe491517 --- /dev/null +++ b/sphinx_doc/contribute/contribute_guidelines.rst @@ -0,0 +1,113 @@ +.. _contribute_guidelines: + +Contribution Guidelines +####################### + +As an open-source project, we welcome and encourage the community to +submit patches directly to the |LPN|. In our collaborative open +source environment, standards and methods for submitting changes help +reduce the chaos that can result from an active development community. + +This document explains how to participate in project conversations, log +and track bugs and enhancement requests, and submit patches to the +project so your patch will be accepted quickly in the codebase. + +Licensing +********* + +Licensing is very important to open source projects. It helps ensure the +software continues to be available under the terms that the author +desired. + +Because much of the source code is ported from other ROS 1 projects, each +package has it's own license. Contributions should be made under the predominant +license of that package. Entirely new packages should be made available under +the `Apache 2.0 license <https://www.apache.org/licenses/LICENSE-2.0>`_. + +A license tells you what rights you have as a developer, as provided by +the copyright holder. It is important that the contributor fully +understands the licensing rights and agrees to them. Sometimes the +copyright holder isn't the contributor, such as when the contributor is +doing work on behalf of a company. + +.. _DCO: + +Developer Certification of Origin (DCO) +*************************************** + +To make a good faith effort to ensure licensing criteria are met, +|LPN| requires the Developer Certificate of Origin (DCO) process +to be followed. + +The DCO is an attestation attached to every contribution made by every +developer. In the commit message of the contribution, (described more +fully later in this document), the developer simply adds a +``Signed-off-by`` statement and thereby agrees to the DCO. + +When a developer submits a patch, it is a commitment that the +contributor has the right to submit the patch per the license. The DCO +agreement is shown below and at http://developercertificate.org/. + +.. code-block:: none + + Developer's Certificate of Origin 1.1 + + By making a contribution to this project, I certify that: + + (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + + (b) The contribution is based upon previous work that, to the + best of my knowledge, is covered under an appropriate open + source license and I have the right under that license to + submit that work with modifications, whether created in whole + or in part by me, under the same open source license (unless + I am permitted to submit under a different license), as + Indicated in the file; or + + (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + + (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including + all personal information I submit with it, including my + sign-off) is maintained indefinitely and may be redistributed + consistent with this project or the open source license(s) + involved. + +DCO Sign-Off Methods +==================== + +The DCO requires that a sign-off message, in the following format, +appears on each commit in the pull request:: + + Signed-off-by: Sofforus Jones <sjones@gmail.com> + +The DCO text can either be manually added to your commit body, or you can add +either ``-s`` or ``--signoff`` to your usual Git commit commands. If you forget +to add the sign-off you can also amend a previous commit with the sign-off by +running ``git commit --amend -s``. If you've pushed your changes to GitHub +already you'll need to force push your branch after this with ``git push -f``. + +.. note:: + The name and email address of the account you use to submit your PR must + match the name and email address on the ``Signed-off-by`` line in + your commit message. + +Prerequisites +************* + +As a contributor, you'll want to be familiar with any other web presence +owned by the project. This includes, how to configure, install, and use +it as explained on the `project website`_, and how to set up your +development environment as introduced in the project's :ref:`getting_started`. + +You should be familiar with common developer tools such as Git and +platforms such as GitHub. + +If you haven't already done so, you'll need to create a (free) GitHub account +on https://github.com and have Git tools available on your development system. + +Etc... diff --git a/sphinx_doc/contribute/doc_guidelines.rst b/sphinx_doc/contribute/doc_guidelines.rst new file mode 100644 index 0000000000000000000000000000000000000000..9d8d56d7cb19f97fbd8bb3d60d306ba99a613f00 --- /dev/null +++ b/sphinx_doc/contribute/doc_guidelines.rst @@ -0,0 +1,419 @@ +.. _doc_guidelines: + +Documentation Guidelines +######################## + +The |LPN| content is written using the `reStructuredText`_ markup +language (``.rst`` file extension) with Sphinx extensions, and processed +using Sphinx to create a formatted standalone website. Developers can +view this content either in its raw form as ``.rst`` markup files, or (with +Sphinx installed) they can build the documentation using the Makefile +(on Linux systems) to generate the HTML content. The HTML content can then +be viewed using a web browser. This same ``.rst`` content is also fed into +the `documentation site`_ website. + +You can read details about `reStructuredText`_ +and about `Sphinx extensions`_ from their respective websites. + +.. _Sphinx extensions: http://www.sphinx-doc.org/en/stable/contents.html +.. _reStructuredText: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html +.. _Sphinx Inline Markup: http://sphinx-doc.org/markup/inline.html#inline-markup + +This document provides a quick reference for commonly used reST and +Sphinx-defined directives and roles used to create the documentation +you're reading. + +Headings +******** + +Document sections are identified through their heading titles, +indicated with an underline below the title text. (While reST allows +use of both and overline and matching underline to indicate a heading, +we only use an underline indicator for headings.) For consistency in +our documentation, we define the order of characters used to indicated +the nested table of contents levels: + +* Use ``#`` for the Document title underline character +* Use ``*`` for the First sub-section heading level +* Use ``=`` for the Second sub-section heading level +* Use ``-`` for the Third sub-section heading level + +Additional heading level depth is discouraged. + +The heading underline must be at least as long as the title it's under. + +Here's an example of nested heading levels and the appropriate +underlines to use: + +.. code-block:: rest + + Document Title heading + ###################### + + Section 1.0 heading + ******************* + + Section 2.0 heading + ******************* + + Section 2.1 heading + =================== + + Section 2.1.1 heading + --------------------- + + Section 2.2 heading + =================== + + Section 3.0 heading + ******************* + +If there is a large amount of content that might not be applicable to all +users, use collapsible sections to hide information unless needed. + +.. rst-class:: content-collapse + +This is a collapsible section +============================= + +Use the toggle button (+/-) to hide and show the content as needed. Add the +following directive just before the section header to use this feature. + +.. code-block:: rest + + .. rst-class:: content-collapse + + This is a collapsible section + ============================= + +.. note:: + + This feature must only be used before a conventional Sphinx section + header. + +.. warning:: + + This feature is in active development and may change without warning. + +Content Highlighting +******************** + +Some common reST inline markup samples: + +* one asterisk: ``*text*`` for emphasis (*italics*), +* two asterisks: ``**text**`` for strong emphasis (**boldface**), and +* two backquotes: ````text```` for ``inline code`` samples. + +ReST rules for inline markup try to be forgiving to account for common +cases of using these marks. For example using an asterisk to indicate +multiplication, such as ``2 * (x + y)`` will not be interpreted as an +unterminated italics section. For inline markup, the characters between +the beginning and ending characters must not start or end with a space, +so ``*this is italics*`` ( *this is italics*) while ``* this isn't*`` +(* this isn't*). + +If asterisks or backquotes appear in running text and could be confused with +inline markup delimiters, you can eliminate the confusion by adding a +backslash (``\``) before it. + +Lists +***** + +For bullet lists, place an asterisk (``*``) or hyphen (``-``) at +the start of a paragraph and indent continuation lines with two +spaces. + +The first item in a list (or sublist) must have a blank line before it +and should be indented at the same level as the preceding paragraph +(and not indented itself). + +For numbered lists +start with a ``1.`` or ``a)`` for example, and continue with autonumbering by +using a ``#`` sign and a ``.`` or ``)`` as used in the first list item. +Indent continuation lines with spaces to align with the text of first +list item: + +.. code-block:: rest + + * This is a bulleted list. + * It has two items, the second + item and has more than one line of reST text. Additional lines + are indented to the first character of the + text of the bullet list. + + 1. This is a new numbered list. If there wasn't a blank line before it, + it would be a continuation of the previous list (or paragraph). + #. It has two items too. + + a) This is a numbered list using alphabetic list headings + #) It has three items (and uses autonumbering for the rest of the list) + #) Here's the third item. Use consistent punctuation on the list + number. + + #. This is an autonumbered list (default is to use numbers starting + with 1). + + #. This is a second-level list under the first item (also + autonumbered). Notice the indenting. + #. And a second item in the nested list. + #. And a second item back in the containing list. No blank line + needed, but it wouldn't hurt for readability. + +Definition lists (with a term and its definition) are a convenient way +to document a word or phrase with an explanation. For example this reST +content: + +.. code-block:: rest + + The Makefile has targets that include: + + html + Build the HTML output for the project + + clean + Remove all generated output, restoring the folders to a + clean state. + +Would be rendered as: + + The Makefile has targets that include: + + html + Build the HTML output for the project + + clean + Remove all generated output, restoring the folders to a + clean state. + +Multi-column lists +****************** + +If you have a long bullet list of items, where each item is short, +you can indicate the list items should be rendered in multiple columns +with a special ``hlist`` directive: + +.. code-block:: rest + + .. hlist:: + :columns: 3 + + * A list of + * short items + * that should be + * displayed + * horizontally + * so it doesn't + * use up so much + * space on + * the page + +This would be rendered as: + +.. hlist:: + :columns: 3 + + * A list of + * short items + * that should be + * displayed + * horizontally + * so it doesn't + * use up so much + * space on + * the page + +Note the optional ``:columns:`` parameter (default is two columns), and +all the list items are indented by three spaces. + +File names and Commands +*********************** + +Sphinx extends reST by supporting additional inline markup elements (called +"roles") used to tag text with special +meanings and allow style output formatting. (You can refer to the `Sphinx Inline Markup`_ +documentation for the full list). + +For example, there are roles for marking :file:`filenames` +(``:file:`name```) and command names such as :command:`make` +(``:command:`make```). You can also use the \`\`inline code\`\` +markup (double backticks) to indicate a ``filename``. + +Don't use items within a single backtick, for example ```word```. + +.. _internal-linking: + +Internal Cross-Reference Linking +******************************** + +ReST links are only supported within the current file using the +notation: + +.. code-block:: rest + + refer to the `internal-linking`_ page + +which renders as, + + refer to the `internal-linking`_ page + +Note the use of a trailing +underscore to indicate an outbound link. In this example, the label was +added immediately before a heading, so the text that's displayed is the +heading text itself. + +With Sphinx however, we can create +link-references to any tagged text within the project documentation. + +Target locations within documents are defined with a label directive: + + .. code-block:: rst + + .. _my label name: + +Note the leading underscore indicating an inbound link. +The content immediately following +this label is the target for a ``:ref:`my label name``` +reference from anywhere within the documentation set. +The label should be added immediately before a heading so there's a +natural phrase to show when referencing this label (e.g., the heading +text). + +This is the same directive used to +define a label that's a reference to a URL: + +.. code-block:: rest + + .. _Hypervisor Wikipedia Page: + https://en.wikipedia.org/wiki/Hypervisor + +To enable easy cross-page linking within the site, each file should have +a reference label before its title so it can +be referenced from another file. These reference labels must be unique +across the whole site, so generic names such as "samples" should be +avoided. For example the top of this document's ``.rst`` file is: + + +.. code-block:: rst + + .. _doc_guidelines: + + Documentation Guidelines + ######################## + +Other ``.rst`` documents can link to this document using the +``:ref:`doc_guidelines``` tag and it will show up as +:ref:`doc_guidelines`. This type of internal cross reference works +across multiple files, and the link text is obtained from the document +source so if the title changes, the link text will update as well. + +There may be times where you'd like to change the link text that's shown +in the generated document. In this case, you can add specify alternate +text using ``:ref:`alternate text <doc_guidelines>``` (renders as +:ref:`alternate text <doc_guidelines>`). + + +Non-ASCII Characters +******************** + +You can insert non-ASCII characters such as a Trademark symbol +(|trade|), by using the notation ``|trade|``. (It's also allowed to use +the UTF-8 characters directly.) Available replacement names are defined +in an include file used during the Sphinx processing of the reST files. +The names of these replacement characters are the same as used in HTML +entities used to insert characters in HTML, e.g., \™ and are +defined in the file ``sphinx_build/substitutions.txt`` as listed here: + +.. literalinclude:: ../substitutions.txt + :language: rst + +We've kept the substitutions list small but others can be added as +needed by submitting a change to the ``substitutions.txt`` file. + +Code and Command Examples +************************* + +Use the reST ``code-block`` directive to create a highlighted block of +fixed-width text, typically used for showing formatted code or console +commands and output. Smart syntax highlighting is also supported (using the +Pygments package). You can also directly specify the highlighting language. +For example: + +.. code-block:: rest + + .. code-block:: c + + struct _k_object { + char *name; + u8_t perms[CONFIG_MAX_THREAD_BYTES]; + u8_t type; + u8_t flags; + u32_t data; + } __packed; + +Note the blank line between the ``code-block`` directive and the first +line of the code-block body, and the body content is indented three +spaces (to the first non-white space of the directive name). + +This would be rendered as: + + .. code-block:: c + + struct _k_object { + char *name; + u8_t perms[CONFIG_MAX_THREAD_BYTES]; + u8_t type; + u8_t flags; + u32_t data; + } __packed; + + +You can specify other languages for the ``code-block`` directive, +including ``c``, ``python``, and ``rst``, and also ``console``, +``bash``, or ``shell``. If you want no syntax highlighting, use the +language ``none``, for example: + +.. code-block:: rest + + .. code-block:: none + + This would be a block of text styled with a background + and box, but with no syntax highlighting. + +Would display as: + + .. code-block:: none + + This would be a block of text styled with a background + and box, but with no syntax highlighting. + +There's a shorthand for writing code blocks too: end the introductory +paragraph with a double colon (``::``) and indent the code block content +by three spaces. On output, only one colon will be shown. The +highlighting package makes a best guess at the type of content in the +block and highlighting purposes. This can lead to some odd +highlighting in the generated output. + +Tabs, spaces, and indenting +*************************** + +Indenting is significant in reST file content, and using spaces is +preferred. Extra indenting can (unintentionally) change the way content +is rendered too. For lists and directives, indent the content text to +the first non-white space in the preceding line. For example: + +.. code-block:: rest + + * List item that spans multiple lines of text + showing where to indent the continuation line. + + 1. And for numbered list items, the continuation + line should align with the text of the line above. + + .. code-block:: + + The text within a directive block should align with the + first character of the directive name. + +Keep the line length for documentation less than 80 characters to make +it easier for reviewing in GitHub. Long lines because of URL references +are an allowed exception. diff --git a/sphinx_doc/contribute/index.rst b/sphinx_doc/contribute/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..196e9f09cde2409533df3e3d5ddaf2653c5bcc53 --- /dev/null +++ b/sphinx_doc/contribute/index.rst @@ -0,0 +1,13 @@ +.. _contribute: + +Contributing to the Project +########################### + +As an open-source project, we welcome and encourage the community to submit +patches for code, documentation, tests, and more, directly to the project. + +.. toctree:: + :maxdepth: 1 + + contribute_guidelines.rst + doc_guidelines.rst diff --git a/sphinx_doc/getting_started/index.rst b/sphinx_doc/getting_started/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..8779a82d05646212e3e5efb705c957c9d53d1142 --- /dev/null +++ b/sphinx_doc/getting_started/index.rst @@ -0,0 +1,7 @@ +.. _getting_started: + +Getting Started +############### + +This website is under construction. Please visit the `project repo`_ in the +meantime. diff --git a/sphinx_doc/howtos/docs/index.rst b/sphinx_doc/howtos/docs/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..287bcff68bef89353e47e1f7e7becc6a147a93db --- /dev/null +++ b/sphinx_doc/howtos/docs/index.rst @@ -0,0 +1,29 @@ +.. _docs_howtos: + +Documentation How-Tos +##################### + +This guide has everything you need to know to begin writing, building, and +deploying technical documentation using our Git/Sphinx/Read the Docs workflow. +Start by learning how to clone and build this template on your local system. + +Build Guide +=========== + +.. toctree:: + :maxdepth: 1 + + process/docbuild + process/docker-build + + +.. _technical-guides: + +Technical Guides +================ + +.. toctree:: + :maxdepth: 1 + :glob: + + tech/* diff --git a/sphinx_doc/howtos/docs/process/docbuild.rst b/sphinx_doc/howtos/docs/process/docbuild.rst new file mode 100644 index 0000000000000000000000000000000000000000..c6b13e5062f5c2fece9bec769935f4f7f32e9c58 --- /dev/null +++ b/sphinx_doc/howtos/docs/process/docbuild.rst @@ -0,0 +1,256 @@ +.. _doc_gen: + +Build the template locally +########################## + +These instructions will walk you through building the |PN| on your local +system. + +Documentation overview +********************** + +The |PN| Project content is written using the reStructuredText markup +language (.rst file extension) with Sphinx extensions, and processed +using Sphinx to create a formatted stand-alone website. Developers can +view this content either in its raw form as .rst markup files, or you +can generate the HTML content and view it with a web browser directly on +your workstation. + +You can read details about `reStructuredText`_, and `Sphinx`_ from +their respective websites. + +The project's documentation contains the following items: + +* ReStructuredText source files used to generate documentation found at the + `documentation site`_. All of the reStructuredText sources + are found in the `documentation repo`_. + +The reStructuredText files are processed by the Sphinx documentation system, +and make use of the breathe extension for including the doxygen-generated API +material. + +Set up the documentation working folders +**************************************** + +You'll need git installed to get the working folders set up: + +* For an Ubuntu development system use: + + .. code-block:: bash + + sudo apt-get install git + +* For a Fedora development system use + + .. code-block:: bash + + sudo dnf install git + +We use github.io for publishing the generated documentation. +Here's the recommended local folder setup for documentation contributions +and generation: + +.. code-block:: none + + projectname/ + doc-repo/ + +The parent folder ``projectname`` is there to make room for the +publishing area that will come later. It's best if the ``doc-repo`` +folder is an ssh clone of your personal fork of the upstream project +repos (though https clones work too): + +#. Use your browser to visit the `documentation repo`_ and make a + fork of the repo to your personal GitHub account. + + .. image:: images/fork-docs.png + +#. Copy the clone URL of the GitHub repo: + + .. image:: images/copy-clone-url.png + +#. At a command prompt, create the working folder and clone + the `documentation repo`_ to your local computer (and if you + have publishing rights, the `documentation site`_). If you don't have + publishing rights, you'll still be able to generate the docs locally, but + not publish them: + + .. code-block:: bash + + cd ~ + mkdir project-name && cd project-name + git clone git@github.com:<github-username>/<projectname>/<documentrepo>.git + +#. For the cloned local repos, tell git about the upstream repo: + + .. code-block:: bash + + cd doc-repo + git remote add upstream git@github.com:<projectname>/<document-repo>.git + +#. If you haven't done so already, be sure to configure git with your name + and email address for the signed-off-by line in your commit messages: + + .. code-block:: bash + + git config --global user.name "David Developer" + git config --global user.email "david.developer@company.com" + +.. _install_doc_gen: + +Installing the documentation tools +********************************** + +Our documentation processing has been tested to run with: + +* Python 3.6.3 +* Doxygen version 1.8.13 +* Sphinx version 1.7.5 +* Breathe version 4.9.1 +* docutils version 0.14 +* sphinx_rtd_theme version 0.4.0 + +The |PN| makes use of additional Sphinx extensions used for +creating drawings: + +* sphinxcontrib-plantuml +* sphinx.ext.graphviz (included with Sphinx) + +.. note:: The plantuml extension uses Java to render the uml drawing + syntax into an image. You'll need to have a Java runtime environment + (JRE) installed when generating documentation. + +Depending on your Linux version, install the needed tools: + +* For Ubuntu use: + + .. code-block:: bash + + sudo apt-get install doxygen python3-pip python3-wheel make default-jre + +* For Fedora use: + + .. code-block:: bash + + sudo dnf install doxygen python3-pip python3-wheel make default-jre + +And for either Linux environment, install the remaining python-based +tools: + +.. code-block:: bash + + cd ~/<projectname>/doc-repo + pip3 install --user -r scripts/requirements.txt + +And with that you're ready to generate the documentation. + +Documentation presentation theme +******************************** + +Sphinx supports easy customization of the generated documentation +appearance through the use of themes. Replace the theme files and do +another ``make html`` and the output layout and style is changed. +The ``read-the-docs`` theme is installed as part of the +``requirements.txt`` list above. + +Running the documentation processors +************************************ + +The doc-repo directory has all the .rst source files, extra tools, and Makefile for +generating a local copy of the technical documentation. + +.. code-block:: bash + + cd ~/<projectname>/doc-repo + make html + +Depending on your development system, it will take about 10 seconds to +collect and generate the HTML content. When done, you can view the HTML +output with your browser started at ``~/<projectname>/doc-repo/_build/html/index.html`` + +Publishing content +****************** + +If you have merge rights to the `documentation repo`_, you can update +the public project. + +You'll need to do a one-time clone of the upstream repo (we publish +directly to the upstream repo rather than to a personal forked copy): + +.. code-block:: bash + + cd ~/<projectname> + git clone git@github.com:<projectname>/<documentationrepo>.git + +Then, after you've verified the generated HTML from ``make html`` looks +good, you can push directly to the publishing site with: + +.. code-block:: bash + + make publish + +This will delete everything in the publishing repo's **latest** folder +(in case the new version has +deleted files) and push a copy of the newly-generated HTML content +directly to the GitHub pages publishing repo. The `documentation site`_ +will be updated within a few minutes, so it's best to verify the +locally generated html before publishing. + +Basic editing and making the template your own +********************************************** + +#. TOC trees need to be in the index.rst at each level to define the + site structure. For example, this is the TOC tree used to generate + this site: + + .. code-block:: rest + + .. toctree:: + :maxdepth: 1 + + introduction/index.rst + getting_started/index.rst + release_notes.rst + howtos/index.rst + contribute/index.rst + +#. Changes to theme can be made by editing ``static/custom.css``. +#. No matter where the images are before the build, after the build all the + images are collected in one directory: all the image filenames must be + unique. +#. Modify ``conf.py`` to reflect your project: + + .. code-block:: bash + + # General information about the project. + project = u'<project name>' + copyright = u'<year>, <project name>' + author = u'<project name> developers' + +#. Modify ``substitutions.txt`` to reflect your project: + + .. code-block:: rest + + .. |PN| replace:: <project name> + + .. |LPN| replace:: <long project name> + + .. _project repo: https://github.com/<projectname>/ + + .. _documentation repo: https://github.com/<proejctname>/<docrepo> + + .. _documentation site: https://<projectname>.github.io + + .. _project website: https://github.com/<projectname>/ + +#. Edit ``LICENSE`` to reflect your project name and requirements +#. Make any edits to ``Makefile`` that might be needed to facilitate the + build or change the name of your local instantiation of the github.io + website repository directory. +#. Replace logos and favicon in ``/images`` with your project logos +#. Run ``make clean`` to remove any previously generated HTML. +#. Regenerate the HTML with Sphinx with ``make html``. +#. Push the updated content to the github.io repo with ``make publish``. + +.. _reStructuredText: http://sphinx-doc.org/rest.html +.. _Sphinx: http://sphinx-doc.org/ diff --git a/sphinx_doc/howtos/docs/process/docker-build.rst b/sphinx_doc/howtos/docs/process/docker-build.rst new file mode 100644 index 0000000000000000000000000000000000000000..a5cbeb2f1f1abbb3ce853dcc19f9d18b088e62bc --- /dev/null +++ b/sphinx_doc/howtos/docs/process/docker-build.rst @@ -0,0 +1,56 @@ +.. _docker_build: + +Use Docker to build this Sphinx project +####################################### + +.. warning:: + + This is a work in progress and will only work if Docker is already + installed. + +.. note:: + + Permission to share the C drive must be reset every time you change + your windows password. + +If you'd like to build the documentation but don't want to install all of the +dependencies on your system, consider using a docker container to do it. This +is very similar to what most automated build systems do. + +You'll need to be in the same directory as the included +:file:`/scripts/docker/Dockerfile` to build the image. Once you're there, +simply run this command: + +.. code-block:: bash + + sudo docker build -t sphinx-builder . #Linux Bash + + docker build -t sphinx-builder . #Windows Powershell + +.. note:: + + ``sphinx-builder`` is the name of the image that gets created. + +Once the image has successfully built (docker not being configured for proxy +is a common gotcha [#f1]_ [#f2]_), you can build the project. You'll need to be in the same +directory as the :file:`conf.py` to successfully build the documentation, so +do that first, then run the following command (remember sphinx-builder is the +name we gave the image in the previous command, so if you named it something +else use that instead): + +.. code-block:: bash + + sudo docker run --rm -v `pwd`:/home/sphinx -w /home/sphinx -i -t sphinx-builder make html #Linux Bash + + docker run --rm -v ${pwd}:/home/sphinx -w /home/sphinx -i -t sphinx-builder make html #Windows Powershell + +``pwd`` is shorthand for "present working directory," so the +command maps (-v) the ``pwd`` of the host environment to the :file:`/home/sphinx` directory in the container, then sets it to the working directory +(-w). And finally, we run the container by name and pass in the +:command:`make html` command to build the documentation. The ``--rm`` option +ensures that docker cleans up after it's finished by deleting the container. + +.. rubric:: Footnotes + +.. [#f1] Configuring proxy for Docker for Windows: https://docs.docker.com/docker-for-windows/#proxies +.. [#f2] Configuring proxy for DockerCE in Linux: https://docs.docker.com/config/daemon/systemd/#httphttps-proxy \ No newline at end of file diff --git a/sphinx_doc/howtos/docs/process/images/check-repo.png b/sphinx_doc/howtos/docs/process/images/check-repo.png new file mode 100644 index 0000000000000000000000000000000000000000..64e4ce17ad23d39c028a6686a5197138da89ddaf Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/check-repo.png differ diff --git a/sphinx_doc/howtos/docs/process/images/clone-repo.png b/sphinx_doc/howtos/docs/process/images/clone-repo.png new file mode 100644 index 0000000000000000000000000000000000000000..c30af8c26b1e457616bd9fd438a6fcb4c917d5a8 Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/clone-repo.png differ diff --git a/sphinx_doc/howtos/docs/process/images/commit-nojekyll.png b/sphinx_doc/howtos/docs/process/images/commit-nojekyll.png new file mode 100644 index 0000000000000000000000000000000000000000..ee8c28e22c345353db0e292972f5b47008608a57 Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/commit-nojekyll.png differ diff --git a/sphinx_doc/howtos/docs/process/images/copy-clone-url.png b/sphinx_doc/howtos/docs/process/images/copy-clone-url.png new file mode 100644 index 0000000000000000000000000000000000000000..1b32542d884342a7f6a1ee9d3ca2de8bfff4cfbe Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/copy-clone-url.png differ diff --git a/sphinx_doc/howtos/docs/process/images/copy-githubio-clone-url.png b/sphinx_doc/howtos/docs/process/images/copy-githubio-clone-url.png new file mode 100644 index 0000000000000000000000000000000000000000..0ded75df0c97328f81ee38354da57c44a8884c33 Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/copy-githubio-clone-url.png differ diff --git a/sphinx_doc/howtos/docs/process/images/create-readme.png b/sphinx_doc/howtos/docs/process/images/create-readme.png new file mode 100644 index 0000000000000000000000000000000000000000..6068a3570470b3dbf9b2bb83b5761aaf22b695a5 Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/create-readme.png differ diff --git a/sphinx_doc/howtos/docs/process/images/fork-docs.png b/sphinx_doc/howtos/docs/process/images/fork-docs.png new file mode 100644 index 0000000000000000000000000000000000000000..a4b15645467032b475d65bc798ec613fbf6af958 Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/fork-docs.png differ diff --git a/sphinx_doc/howtos/docs/process/images/get-git-url.png b/sphinx_doc/howtos/docs/process/images/get-git-url.png new file mode 100644 index 0000000000000000000000000000000000000000..4e6eb7878a5138066f5d51a00ec1e202a50b30d0 Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/get-git-url.png differ diff --git a/sphinx_doc/howtos/docs/process/images/get-git-zip.png b/sphinx_doc/howtos/docs/process/images/get-git-zip.png new file mode 100644 index 0000000000000000000000000000000000000000..d4c8c8339eb077817e9b29265b5487e04fd3ce8c Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/get-git-zip.png differ diff --git a/sphinx_doc/howtos/docs/process/images/name-git-repo.png b/sphinx_doc/howtos/docs/process/images/name-git-repo.png new file mode 100644 index 0000000000000000000000000000000000000000..4a62944aec7236acf60a7b746be76a79b42a04ce Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/name-git-repo.png differ diff --git a/sphinx_doc/howtos/docs/process/images/name-github-pages-repo.png b/sphinx_doc/howtos/docs/process/images/name-github-pages-repo.png new file mode 100644 index 0000000000000000000000000000000000000000..60f74b3b6c76cbfb90755481bea82b06ba24f956 Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/name-github-pages-repo.png differ diff --git a/sphinx_doc/howtos/docs/process/images/name-nojekyll.png b/sphinx_doc/howtos/docs/process/images/name-nojekyll.png new file mode 100644 index 0000000000000000000000000000000000000000..49fc7fc498b76b8d616e117df34bd893dea6fb27 Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/name-nojekyll.png differ diff --git a/sphinx_doc/howtos/docs/process/images/new-git-repository.png b/sphinx_doc/howtos/docs/process/images/new-git-repository.png new file mode 100644 index 0000000000000000000000000000000000000000..299df51f304fc64f8ea2beadc47b023f943840e4 Binary files /dev/null and b/sphinx_doc/howtos/docs/process/images/new-git-repository.png differ diff --git a/sphinx_doc/howtos/docs/tech/GeneratedImagesExamples.rst b/sphinx_doc/howtos/docs/tech/GeneratedImagesExamples.rst new file mode 100644 index 0000000000000000000000000000000000000000..3fa72443d2b8925add188a93262557d1d9f8555e --- /dev/null +++ b/sphinx_doc/howtos/docs/tech/GeneratedImagesExamples.rst @@ -0,0 +1,16 @@ +.. _dot_examples: + +Examples of Generated Images +################################ + +Test graphviz drawing from mft.dot + +.. graphviz:: images/mft.dot + +Test another graphviz drawing from repo_sync.dot + +.. graphviz:: images/repo_sync.dot + +And a test of plantuml from ssp.pu + +.. uml:: images/ssp.pu diff --git a/sphinx_doc/howtos/docs/tech/images/copy_url.png b/sphinx_doc/howtos/docs/tech/images/copy_url.png new file mode 100644 index 0000000000000000000000000000000000000000..24b5ecd802965daaba5e03fef21dee9919671c35 Binary files /dev/null and b/sphinx_doc/howtos/docs/tech/images/copy_url.png differ diff --git a/sphinx_doc/howtos/docs/tech/images/create_project.png b/sphinx_doc/howtos/docs/tech/images/create_project.png new file mode 100644 index 0000000000000000000000000000000000000000..63ab63b04393692cf83f200261a8779a7a50d903 Binary files /dev/null and b/sphinx_doc/howtos/docs/tech/images/create_project.png differ diff --git a/sphinx_doc/howtos/docs/tech/images/mft.dot b/sphinx_doc/howtos/docs/tech/images/mft.dot new file mode 100644 index 0000000000000000000000000000000000000000..4b6dc378c7c921e0f766631ec48997885ea39ba3 --- /dev/null +++ b/sphinx_doc/howtos/docs/tech/images/mft.dot @@ -0,0 +1,25 @@ +digraph G { + bgcolor="transparent"; + node [fontsize=10 shape=record] + node [fontsize=10] + rankdir=LR + + bin_complete [label="<ext>Extended Manifest\n(unsigned) + |<mft>Manifest\n(signed)|<bins>Binaries"] + + mft [label="<hdr>CSE Header + |CSS Header (Type 4)\nmodule_type = 4\n... + |<mcb>ManifestCryptoBlock + |PlatformFirmware\nAuthenticationExtension + |...other extensions... + |AdspMetadataFileExtension + |...alignment... + |AdspFwBinaryDesc"] + + mcb [label="ManifestRSAKey\nmodulus\nexponent + |Signature"] + + bin_complete:mft -> mft:hdr + mft:mcb -> mcb + +} diff --git a/sphinx_doc/howtos/docs/tech/images/ms-store-ubuntu-get.png b/sphinx_doc/howtos/docs/tech/images/ms-store-ubuntu-get.png new file mode 100644 index 0000000000000000000000000000000000000000..4c7f7be136703ea83a9b242cc38739bd20a4645b Binary files /dev/null and b/sphinx_doc/howtos/docs/tech/images/ms-store-ubuntu-get.png differ diff --git a/sphinx_doc/howtos/docs/tech/images/ms-store-ubuntu.png b/sphinx_doc/howtos/docs/tech/images/ms-store-ubuntu.png new file mode 100644 index 0000000000000000000000000000000000000000..bf2fde92e07bb2bd516f4f7a6448d0c5994a0a6c Binary files /dev/null and b/sphinx_doc/howtos/docs/tech/images/ms-store-ubuntu.png differ diff --git a/sphinx_doc/howtos/docs/tech/images/new_project.png b/sphinx_doc/howtos/docs/tech/images/new_project.png new file mode 100644 index 0000000000000000000000000000000000000000..f47892ef0d81b21d0a4a98062499c5eaf8b9d7d9 Binary files /dev/null and b/sphinx_doc/howtos/docs/tech/images/new_project.png differ diff --git a/sphinx_doc/howtos/docs/tech/images/repo_sync.dot b/sphinx_doc/howtos/docs/tech/images/repo_sync.dot new file mode 100644 index 0000000000000000000000000000000000000000..69792346a366e687c895e330e8cb182df5e1dfce --- /dev/null +++ b/sphinx_doc/howtos/docs/tech/images/repo_sync.dot @@ -0,0 +1,30 @@ +digraph repo_sync { + bgcolor="transparent"; + rankdir=LR + compound=true; + node [fontsize=10, shape=record, style=rounded]; + edge [fontsize=10]; + + + subgraph clusterPublic { + label="cool-project"; fontsize=10; + + subgraph clusterPubMaster { + label="master\n(RW)"; fontsize=11; + style="filled,rounded"; color="#F0F0F0" + + c1 -> c2 -> c3 -> c4; + + } + + subgraph clusterPubabcProd { + label="abc_prod\n(RO replica)"; fontsize=11; + style="filled,rounded"; color="#F0F0FF" + + node [style="rounded,dashed"]; + + abc_c4 [label="c4 [REL1]"]; + abc_c1 -> abc_c2 -> abc_c3 -> abc_c4; + } + } +} diff --git a/sphinx_doc/howtos/docs/tech/images/ssp.pu b/sphinx_doc/howtos/docs/tech/images/ssp.pu new file mode 100644 index 0000000000000000000000000000000000000000..ae6d015a870b97bd613b78cc377fefb8f469f943 --- /dev/null +++ b/sphinx_doc/howtos/docs/tech/images/ssp.pu @@ -0,0 +1,17 @@ +@startuml +skinparam backgroundcolor transparent +component dai +package drivers { + component "apl-ssp" as ssp +} +database ".data" { + component "struct dai ssp[3]" as d_ssp +} +database ".rodata" { + component ssp_ops +} + +dai ..> d_ssp : expose via dai_get() +d_ssp -> ssp_ops : links to +ssp ..> ssp_ops : provide +@enduml diff --git a/sphinx_doc/howtos/docs/tech/important-sphinx-files.rst b/sphinx_doc/howtos/docs/tech/important-sphinx-files.rst new file mode 100644 index 0000000000000000000000000000000000000000..3033d6d9e9f0dfa5fc29f4d8c745d4bddf8581d4 --- /dev/null +++ b/sphinx_doc/howtos/docs/tech/important-sphinx-files.rst @@ -0,0 +1,101 @@ +.. _important-sphinx-files: + +Important Sphinx files +###################### + +These files will appear in most Sphinx projects and are used to extend and define the build behavior. + +.. rst-class:: content-collapse + +conf.py +======= + +Configure Sphinx variables + +suffix + Set the kind of files to process (.rst or .md). + + .. code-block:: python + + source_suffix = '.rst' + +master document + Set the file to use as the top level document for the project (relative to conf.py). + + .. code-block:: python + + master_doc = 'index' + +general info + General information about the project. + + .. code-block:: python + + project = u'Open source documentation template' + copyright = u'2018, TCS Documentation Template' + author = u'TCS developers' + +extensions + Add functionality to your Sphinx build. + + .. code-block:: python + + extensions = ['breathe', 'sphinx.ext.graphviz', 'sphinxcontrib.plantuml'] + + +exclude patterns + Exclude directories from Sphinx processing by adding them to a list. + + .. code-block:: python + + exclude_patterns = ['_build','_themes','scripts' ] + +theme + Use one of the provided Sphinx themes or a custom one. + + .. code-block:: python + + html_theme_path = ['_themes'] + html_theme = 'otc_tcs_sphinx_theme' + +.. rst-class:: content-collapse + +substitutions.txt +================= + +Add content to this file when you want it to appear at the end of or be +accessed by every page of the project. We use it to set global string +replacements and links. + +replace string + Useful when you want to create a shorthand version of a long string. + + .. code-block:: rest + + .. |PN| replace:: project name + +global link + Use these when you will be re-using a link throughout the project. + + .. code-block:: rest + + .. _project website: https://rosplanning.github.io/navigation2/ + +unicode + You can also create shortcuts for commonly used unicode characters. + + .. code-block:: rest + + .. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN + :ltrim: + +.. note:: + + We implmented this by using an ``include`` directive in + the ``rst_epilog`` variable in :file:`conf.py` like this: + + .. code-block:: python + + rst_epilog = """ + .. include:: /substitutions.txt + """ diff --git a/sphinx_doc/howtos/docs/tech/pandocs-conversion.rst b/sphinx_doc/howtos/docs/tech/pandocs-conversion.rst new file mode 100644 index 0000000000000000000000000000000000000000..4c4f2d0781ea8c58a4ae66490addb25597a1a0f8 --- /dev/null +++ b/sphinx_doc/howtos/docs/tech/pandocs-conversion.rst @@ -0,0 +1,113 @@ +.. _pandocs-conversion: + +Pandocs Conversion Tutorial +########################### + +.. contents:: :local: + :depth: 2 + + +This tutorial shows you how to use ``pandoc`` to convert files in various +formats. + +Table 1 shows current conversions. + +.. list-table:: Table 1. Conversions + :widths: 80 100 100 + :header-rows: 1 + :stub-columns: 1 + + * - Convert + - From + - To + * - reSTructured Text to HTML + - ``.rst`` + - ``.html`` + * - Markdown to reSTructured Text + - ``.md`` + - ``.rst`` + * - reSTructured Text to HTML + - ``.rst`` + - ``.html`` + +Scope +===== + +Conversion should be a preliminary step in migrating to Sphinx +for your documentation project. The results of conversion will complete +about 80% of the work. It's expected that you'll edit converted files as +post-processing. We recommend studying the `Pandoc website`_ to learn more. + +In the Clear Linux\* documention, we established +`Documentation Contribution Guidelines`_, which explain conventions and +usage of reST syntax. We encourage you to establish similar guidelines for +your team. Even minimal initial investment in guidelines greatly +reduces future work. More importantly, providing clear guidelines supports +your team's long-term maintence efforts. + +Note: See also the Clear Linux `reSTructured Text Guide`_. + +Prerequisites +============= + +* `Install Pandocs`_ +* Command line interface basic skills +* Text editor (e.g., Sublime, Notepad++, etc.) +* Web browser + +Introduction +============ +We recommend following reST conventions and best practices for Sphinx. To +learn more, visit the `Sphinx website`_ + +Single file Conversion +======================= + +For single file conversions, + + +cd into the file directory: + +.. code-block:: bash + + $ cd pandocs-tutorial + + +From Markdown to reST +--------------------- + +#. Run the command: + +.. code-block:: bash + + $ pandoc --from=markdown --to=rst --output=cicero.rst cicero.md + +From Markdown to HTML +--------------------- + +#. Run the command: + +.. code-block:: bash + + $ pandoc cicero.md -f markdown -t html -s -o cicero.html + +From reST to HTML +----------------- +#. Run the command: + +.. code-block:: bash + + $ pandoc -f rst -t html cicero.rst > cicero.html + +**Congratulations!** You have learned how to convert single files to your preferred format. + + +.. _Install Pandocs: https://pandoc.org/installing.html + +.. _Sphinx website: http://www.sphinx-doc.org/en/master/index.html + +.. _Pandoc website: https://pandoc.org/ + +.. _Documentation Contribution Guidelines: https://clearlinux.org/documentation/clear-linux/reference/collaboration/documentation + +.. _reSTructured Text Guide: https://clearlinux.org/documentation/clear-linux/reference/collaboration/documentation/rest#additional-information diff --git a/sphinx_doc/howtos/index.rst b/sphinx_doc/howtos/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..d58bcf5fdbb975ebf5e55172fb7fd19deb5e5f01 --- /dev/null +++ b/sphinx_doc/howtos/index.rst @@ -0,0 +1,9 @@ +.. _howtos: + +How-Tos +####### + +.. toctree:: + :maxdepth: 1 + + docs/index.rst diff --git a/sphinx_doc/images/favicon-16x16.png b/sphinx_doc/images/favicon-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..e9a16774c98c0b3fe35a7341374e08d32563ad55 Binary files /dev/null and b/sphinx_doc/images/favicon-16x16.png differ diff --git a/sphinx_doc/images/favicon-48x48.png b/sphinx_doc/images/favicon-48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..ce2315d5353bb40498d2acb1c83b4a976750292a Binary files /dev/null and b/sphinx_doc/images/favicon-48x48.png differ diff --git a/sphinx_doc/images/logo_dark.png b/sphinx_doc/images/logo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..0af0b3cc92ca642414f736149cb1e5d75231e866 Binary files /dev/null and b/sphinx_doc/images/logo_dark.png differ diff --git a/sphinx_doc/images/logo_dark_120w.png b/sphinx_doc/images/logo_dark_120w.png new file mode 100644 index 0000000000000000000000000000000000000000..888f5f1632ff9bc6024940f0066cdd491e6d0734 Binary files /dev/null and b/sphinx_doc/images/logo_dark_120w.png differ diff --git a/sphinx_doc/images/logo_white.png b/sphinx_doc/images/logo_white.png new file mode 100644 index 0000000000000000000000000000000000000000..71aa3c69a741ec4e35dcdd522a440e98bb43c8e3 Binary files /dev/null and b/sphinx_doc/images/logo_white.png differ diff --git a/sphinx_doc/images/logo_white_200w.png b/sphinx_doc/images/logo_white_200w.png new file mode 100644 index 0000000000000000000000000000000000000000..b446b057cd0b1c8591e4d896c8a41d696c2e7fe5 Binary files /dev/null and b/sphinx_doc/images/logo_white_200w.png differ diff --git a/sphinx_doc/index.rst b/sphinx_doc/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..404bddfedaedaa56498021ed312e1f5f9e25432b --- /dev/null +++ b/sphinx_doc/index.rst @@ -0,0 +1,18 @@ +.. _documentation_home: + +|LPN| +##### + +This website is under construction. Please visit the `project repo`_ in the +meantime. + +Sections +******** + +.. toctree:: + :maxdepth: 1 + + getting_started/index.rst + howtos/index.rst + release_notes.rst + contribute/index.rst diff --git a/sphinx_doc/make.bat b/sphinx_doc/make.bat new file mode 100644 index 0000000000000000000000000000000000000000..0825fc7298c15349de79a68d3c9098b80c67908e --- /dev/null +++ b/sphinx_doc/make.bat @@ -0,0 +1,263 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +set I18NSPHINXOPTS=%SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% + set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^<target^>` where ^<target^> is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. singlehtml to make a single large HTML file + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. devhelp to make HTML files and a Devhelp project + echo. epub to make an epub + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. text to make text files + echo. man to make manual pages + echo. texinfo to make Texinfo files + echo. gettext to make PO message catalogs + echo. changes to make an overview over all changed/added/deprecated items + echo. xml to make Docutils-native XML files + echo. pseudoxml to make pseudoxml-XML files for display purposes + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + echo. coverage to run coverage check of the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + + +REM Check if sphinx-build is available and fallback to Python version if any +%SPHINXBUILD% 2> nul +if errorlevel 9009 goto sphinx_python +goto sphinx_ok + +:sphinx_python + +set SPHINXBUILD=python -m sphinx.__init__ +%SPHINXBUILD% 2> nul +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +:sphinx_ok + + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "singlehtml" ( + %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\ClearLinux.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\ClearLinux.ghc + goto end +) + +if "%1" == "devhelp" ( + %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. + goto end +) + +if "%1" == "epub" ( + %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub file is in %BUILDDIR%/epub. + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdf" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf + cd %~dp0 + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdfja" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf-ja + cd %~dp0 + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "text" ( + %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The text files are in %BUILDDIR%/text. + goto end +) + +if "%1" == "man" ( + %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The manual pages are in %BUILDDIR%/man. + goto end +) + +if "%1" == "texinfo" ( + %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. + goto end +) + +if "%1" == "gettext" ( + %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The message catalogs are in %BUILDDIR%/locale. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + if errorlevel 1 exit /b 1 + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + if errorlevel 1 exit /b 1 + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + if errorlevel 1 exit /b 1 + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +if "%1" == "coverage" ( + %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage + if errorlevel 1 exit /b 1 + echo. + echo.Testing of coverage in the sources finished, look at the ^ +results in %BUILDDIR%/coverage/python.txt. + goto end +) + +if "%1" == "xml" ( + %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The XML files are in %BUILDDIR%/xml. + goto end +) + +if "%1" == "pseudoxml" ( + %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. + goto end +) + +:end diff --git a/sphinx_doc/release_notes.rst b/sphinx_doc/release_notes.rst new file mode 100644 index 0000000000000000000000000000000000000000..ac4ae550bd53168c829010948652989efc180a3b --- /dev/null +++ b/sphinx_doc/release_notes.rst @@ -0,0 +1,5 @@ +.. _release_notes: + +Release Notes +############# + diff --git a/sphinx_doc/scripts/.nojekyll b/sphinx_doc/scripts/.nojekyll new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/sphinx_doc/scripts/_nojekyll b/sphinx_doc/scripts/_nojekyll new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/sphinx_doc/scripts/docker/Dockerfile b/sphinx_doc/scripts/docker/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..9b6747f68a0cfd97494cab74ecd50065e571e367 --- /dev/null +++ b/sphinx_doc/scripts/docker/Dockerfile @@ -0,0 +1,13 @@ +FROM alpine:latest + +#ENV http_proxy <myproxy> +#ENV https_proxy <myproxy> + +RUN apk --no-cache add python3 +RUN python3 -m ensurepip +RUN pip3 install sphinx==1.7.5 docutils==0.14 sphinx_rtd_theme breathe==4.9.1 sphinxcontrib-plantuml +RUN apk --no-cache add make +RUN apk --no-cache add doxygen +RUN apk --no-cache add graphviz +RUN apk --no-cache add ttf-dejavu +RUN apk --no-cache add openjdk8-jre diff --git a/sphinx_doc/scripts/plantuml.jar b/sphinx_doc/scripts/plantuml.jar new file mode 100644 index 0000000000000000000000000000000000000000..a84c5a0fcdf195d68aaf3d83862ae4daaab1ce19 Binary files /dev/null and b/sphinx_doc/scripts/plantuml.jar differ diff --git a/sphinx_doc/scripts/publish-README.md b/sphinx_doc/scripts/publish-README.md new file mode 100644 index 0000000000000000000000000000000000000000..11048566052dd5dcb901f8d7b097f3688d16ab6d --- /dev/null +++ b/sphinx_doc/scripts/publish-README.md @@ -0,0 +1,6 @@ +# Documentation Generated by SPHINX +This Documentation was programmatically generated for GitHub Pages. +Do not make changes directly in this repo. Instead, edit content +in the <project>-docs repo, re-generate the HTML with +Sphinx (make html), and push the updated content here for publishing +(make publish). diff --git a/sphinx_doc/scripts/publish-index.html b/sphinx_doc/scripts/publish-index.html new file mode 100644 index 0000000000000000000000000000000000000000..11ffbf05ebb4778eb5893977097cefb9bbc5b15e --- /dev/null +++ b/sphinx_doc/scripts/publish-index.html @@ -0,0 +1,10 @@ +<html> +<head> +<title>SOF Project documentation</title> +<meta http-equiv="refresh" content="0; URL=docs/index.html"> +<meta name="keywords" content="automatic redirection"> +</head> +<body> +Please visit the <a href="/docs/">latest SOF documentation</a> +</body> +</html> diff --git a/sphinx_doc/scripts/requirements.txt b/sphinx_doc/scripts/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..939919ae87e3fb1dd99a9b7c75df7e7a6305df72 --- /dev/null +++ b/sphinx_doc/scripts/requirements.txt @@ -0,0 +1,5 @@ +breathe==4.9.1 +sphinx==1.7.5 +docutils==0.14 +sphinx_rtd_theme +sphinxcontrib-plantuml diff --git a/sphinx_doc/substitutions.txt b/sphinx_doc/substitutions.txt new file mode 100644 index 0000000000000000000000000000000000000000..c534aab4c919c4dc999bc5ac461392f1dc811206 --- /dev/null +++ b/sphinx_doc/substitutions.txt @@ -0,0 +1,32 @@ +.. |br| raw:: html .. force a line break in HTML output (blank lines needed here) + + <br /> +.. |PN| replace:: Navigation 2 + +.. |LPN| replace:: ROS 2 Navigation System + +.. _project repo: https://github.com/ros-planning/navigation2 + +.. _documentation repo: https://github.com/ros-planning/navigation2/doc + +.. _documentation site: https://rosplanning.github.io/navigation2/ + +.. _project website: https://rosplanning.github.io/navigation2/ + +.. |PP| replace:: https://github.com/ros-planning/navigation2/blob/master + +.. These are replacement strings for non-ASCII characters used within the project + using the same name as the html entity names (e.g., ©) for that character + +.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN + :ltrim: +.. |trade| unicode:: U+02122 .. TRADEMARK SIGN + :ltrim: +.. |reg| unicode:: U+000AE .. REGISTERED TRADEMARK SIGN + :ltrim: +.. |deg| unicode:: U+000B0 .. DEGREE SIGN + :ltrim: +.. |plusminus| unicode:: U+000B1 .. PLUS-MINUS SIGN + :rtrim: +.. |micro| unicode:: U+000B5 .. MICRO SIGN + :rtrim: