diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml new file mode 100644 index 0000000..3074b38 --- /dev/null +++ b/.github/workflows/sphinx_build.yml @@ -0,0 +1,30 @@ +--- +name: "Build documentation" +on: + workflow_dispatch: + pull_request: + push: + branches: + - ros2 + schedule: + - cron: '38 2 * * *' + +jobs: + docs: + runs-on: ubuntu-latest + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 + with: + cache: 'pip' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r doc_requirements.txt + - name: Build documentation + run: | + sphinx-build -W -b html ur_simulation_gz/doc _doc_build diff --git a/doc_requirements.txt b/doc_requirements.txt new file mode 100644 index 0000000..325ab11 --- /dev/null +++ b/doc_requirements.txt @@ -0,0 +1,5 @@ +sphinx +sphinx-copybutton +sphinx-tabs +sphinx_rtd_theme +catkin-pkg diff --git a/ur_simulation_gz/doc/conf.py b/ur_simulation_gz/doc/conf.py new file mode 100644 index 0000000..a35b8e2 --- /dev/null +++ b/ur_simulation_gz/doc/conf.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python +# Copyright 2025, Universal Robots A/S +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the {copyright_holder} nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + + +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = "ur_simulation_gz" +copyright = "2025, Universal Robots A/S" +author = "Felix Exner" + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [] + +templates_path = ["_templates"] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "migration/*.rst"] + +root_doc = "index" + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = "alabaster" + +# -- Options for HTMLHelp output --------------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = "ur_simulation_gz_doc"