Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,23 @@ repos:
- id: flake8
name: flake8
additional_dependencies:
- flake8-blind-except
- flake8-class-newline
# The five ament_flake8 declares as exec_depend on Jazzy, so code
# that fails quality.yml also fails here - though only for the
# files a commit touches; quality.yml lints the whole package.
# quotes, builtins and comprehensions were missing, which is how Q,
# A and C4 came to run in CI and nowhere locally.
- flake8-builtins
- flake8-comprehensions
- flake8-docstrings
- flake8-import-order
# Config read from .flake8 (matches ament_flake8 defaults)
- flake8-quotes
# Local-only. ament_flake8 comments both out of its package.xml, so
# CI does not run them; keeping them here makes this hook a superset
# of CI rather than a match, which is the safe direction.
- flake8-blind-except
- flake8-class-newline
# Config read from .flake8, which is also what ament_flake8 reads (see
# the CONFIG_FILE argument in ros2_medkit_integration_tests).

# ── General ────────────────────────────────────────────────────────────
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ RUN bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash && \
apt-get update && \
rosdep update && \
rosdep install --from-paths src --ignore-src -r -y \
--skip-keys='ament_cmake_clang_format ament_cmake_clang_tidy test_msgs sqlite3 libcpp-httplib-dev rosbag2_storage_mcap' && \
--skip-keys='ament_cmake_clang_format ament_cmake_clang_tidy ament_cmake_flake8 test_msgs sqlite3 libcpp-httplib-dev rosbag2_storage_mcap' && \
rm -rf /var/lib/apt/lists/* && \
colcon build --cmake-args -DBUILD_TESTING=OFF"

Expand Down
168 changes: 84 additions & 84 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,152 +19,152 @@

import matplotlib

matplotlib.use("Agg")
matplotlib.use('Agg')
import matplotlib.pyplot as plt

# Ensure readable plots
matplotlib.rcParams["figure.facecolor"] = "white"
matplotlib.rcParams["text.color"] = "black"
matplotlib.rcParams["legend.frameon"] = True
matplotlib.rcParams["legend.framealpha"] = 0.8
matplotlib.rcParams["legend.facecolor"] = "white"
matplotlib.rcParams["legend.edgecolor"] = "gray"
matplotlib.rcParams["figure.autolayout"] = True
matplotlib.rcParams["figure.figsize"] = [10, 6]
matplotlib.rcParams["savefig.bbox"] = "tight"
matplotlib.rcParams['figure.facecolor'] = 'white'
matplotlib.rcParams['text.color'] = 'black'
matplotlib.rcParams['legend.frameon'] = True
matplotlib.rcParams['legend.framealpha'] = 0.8
matplotlib.rcParams['legend.facecolor'] = 'white'
matplotlib.rcParams['legend.edgecolor'] = 'gray'
matplotlib.rcParams['figure.autolayout'] = True
matplotlib.rcParams['figure.figsize'] = [10, 6]
matplotlib.rcParams['savefig.bbox'] = 'tight'

from datetime import datetime

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "ros2_medkit"
project_copyright = f"{datetime.now().year}, selfpatch"
author = "selfpatch Team"
project = 'ros2_medkit'
project_copyright = f'{datetime.now().year}, selfpatch'
author = 'selfpatch Team'

version = "0.6.0"
release = "0.6.0"
version = '0.6.0'
release = '0.6.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx_needs",
"sphinxcontrib.plantuml",
"sphinx_design",
"breathe",
"sphinx_copybutton",
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
'sphinx_needs',
'sphinxcontrib.plantuml',
'sphinx_design',
'breathe',
'sphinx_copybutton',
]

# -- Options for Breathe (Doxygen integration) -------------------------------
breathe_projects = {"ros2_medkit": "_build/doxygen/xml"}
breathe_default_project = "ros2_medkit"
breathe_default_members = ("members", "undoc-members")
breathe_projects = {'ros2_medkit': '_build/doxygen/xml'}
breathe_default_project = 'ros2_medkit'
breathe_default_members = ('members', 'undoc-members')

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".venv"]
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.venv']

# The suffix(es) of source filenames
source_suffix = {
".rst": "restructuredtext",
'.rst': 'restructuredtext',
}

# The master toctree document
master_doc = "index"
master_doc = 'index'

# The language for content autogenerated by Sphinx
language = "en"
language = 'en'

# -- Options for Sphinx-Needs ------------------------------------------------
needs_build_json = True
needs_types = [
dict(
directive="req",
title="Requirement",
prefix="REQ_",
color="#BFD8D2",
style="node",
),
dict(
directive="spec",
title="Specification",
prefix="SPEC_",
color="#FEDCD2",
style="node",
),
dict(
directive="impl",
title="Implementation",
prefix="IMPL_",
color="#DF744A",
style="node",
),
dict(
directive="test",
title="Test Case",
prefix="TEST_",
color="#DCB239",
style="node",
),
{
'directive': 'req',
'title': 'Requirement',
'prefix': 'REQ_',
'color': '#BFD8D2',
'style': 'node',
},
{
'directive': 'spec',
'title': 'Specification',
'prefix': 'SPEC_',
'color': '#FEDCD2',
'style': 'node',
},
{
'directive': 'impl',
'title': 'Implementation',
'prefix': 'IMPL_',
'color': '#DF744A',
'style': 'node',
},
{
'directive': 'test',
'title': 'Test Case',
'prefix': 'TEST_',
'color': '#DCB239',
'style': 'node',
},
]

needs_extra_links = [
{
"option": "verifies",
"incoming": "is verified by",
"outgoing": "verifies",
"copy": False,
"allow_dead_links": False,
'option': 'verifies',
'incoming': 'is verified by',
'outgoing': 'verifies',
'copy': False,
'allow_dead_links': False,
},
]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
html_css_files = ["custom.css"]
html_title = f"{project} Documentation"
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
html_css_files = ['custom.css']
html_title = f'{project} Documentation'

html_theme_options = {
"prev_next_buttons_location": "bottom",
"style_external_links": False,
"collapse_navigation": False,
"sticky_navigation": True,
"navigation_depth": 4,
"includehidden": True,
"titles_only": False,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'collapse_navigation': False,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False,
}

# -- Options for intersphinx extension ---------------------------------------
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"sphinx": ("https://www.sphinx-doc.org/en/master", None),
'python': ('https://docs.python.org/3', None),
'sphinx': ('https://www.sphinx-doc.org/en/master', None),
}

# -- Options for PlantUML ----------------------------------------------------
plantuml = "java -Djava.awt.headless=true -jar /usr/share/plantuml/plantuml.jar"
plantuml_output_format = "svg"
plantuml = 'java -Djava.awt.headless=true -jar /usr/share/plantuml/plantuml.jar'
plantuml_output_format = 'svg'

# -- Options for linkcheck ---------------------------------------------------
# Retry transient external failures (e.g. docs.ros.org read timeouts) instead of
# failing the whole build on a single network blip.
linkcheck_retries = 3
linkcheck_timeout = 30
linkcheck_ignore = [
r"http://localhost:\d+", # Ignore localhost URLs
r"http://127\.0\.0\.1:\d+",
r'http://localhost:\d+', # Ignore localhost URLs
r'http://127\.0\.0\.1:\d+',
# Auto-generated line-number links in verification.rst; skipped to
# avoid 395+ GitHub requests (rate-limiting) and anchor mismatches
# on branches where files differ from main.
r"https://github\.com/selfpatch/ros2_medkit/blob/.+#L\d+",
r'https://github\.com/selfpatch/ros2_medkit/blob/.+#L\d+',
# GitHub issue links may 404 in linkcheck without auth token
r"https://github\.com/selfpatch/ros2_medkit/issues/\d+",
r'https://github\.com/selfpatch/ros2_medkit/issues/\d+',
# The rep-0149 page intermittently exceeds the read timeout in CI; the
# canonical REP host is slow, not broken. Scope the skip to this exact URL
# so other REP links stay checked.
r"https://ros\.org/reps/rep-0149\.html",
r'https://ros\.org/reps/rep-0149\.html',
]
Loading
Loading