From b011ee97943dc5cc556e1865ba090001080a15ce Mon Sep 17 00:00:00 2001 From: URJala <159417921+URJala@users.noreply.github.com> Date: Tue, 16 Sep 2025 15:11:32 +0200 Subject: [PATCH 1/2] Add configuration file to docs (#107) * Add configuration file to docs * Add config file and doc building job * Ignore migration notes from toctree (cherry picked from commit 03d2609a4c038ddd1ad0d0b6afc017b2cc6ac99e) --- .github/workflows/sphinx_build.yml | 30 +++++++++++++++ doc_requirements.txt | 5 +++ ur_simulation_gz/doc/conf.py | 62 ++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 .github/workflows/sphinx_build.yml create mode 100644 doc_requirements.txt create mode 100644 ur_simulation_gz/doc/conf.py 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" From 967a7cb8f8b0ac49ccc2c0569e576138bb93f4c7 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Tue, 16 Sep 2025 15:13:10 +0200 Subject: [PATCH 2/2] Update .github/workflows/sphinx_build.yml --- .github/workflows/sphinx_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml index 3074b38..2820645 100644 --- a/.github/workflows/sphinx_build.yml +++ b/.github/workflows/sphinx_build.yml @@ -5,7 +5,7 @@ on: pull_request: push: branches: - - ros2 + - humble schedule: - cron: '38 2 * * *'