Spaces:
Sleeping
Sleeping
| """What this pipeline indexes. | |
| Split out so the rest of the scripts contain no ROS-specific knowledge. The | |
| Zephyr build (github.com/eoinjordan/zephyrproject-rag) runs the same chunker, | |
| retriever and trainer against a different config; keeping the project-specific | |
| parts in one file is what makes that true rather than aspirational. | |
| """ | |
| from __future__ import annotations | |
| PROJECT = "ROS 2" | |
| REPO = "https://github.com/ros2/ros2_documentation.git" | |
| # ROS 2 documents each distribution on its own branch. "rolling" is the | |
| # development line and the one that matches current source; a user pinned to a | |
| # release should fetch that branch instead (--ref jazzy, --ref humble). | |
| DEFAULT_REF = "rolling" | |
| # Documentation lives under source/, not doc/. | |
| DOC_ROOT = "source" | |
| # Directories under DOC_ROOT that are build machinery or assets rather than | |
| # prose. ROS 2 keeps images alongside the pages that use them. | |
| SKIP_DIRS = { | |
| "_static", | |
| "_templates", | |
| "_build", | |
| "images", | |
| "Images", | |
| } | |
| # Files that are not documentation. | |
| SKIP_FILES = { | |
| "conf.py", | |
| "index.rst", | |
| "requirements.txt", | |
| "404.rst", | |
| } | |
| # Sections that are lists of identifiers rather than prose. ROS 2 release pages | |
| # carry long "Changes since..." package tables in the same shape Zephyr's | |
| # release notes do. | |
| SKIP_SECTION_PATTERN = ( | |
| r"changes since|package (list|changes)|^bugs?$|contributors|complete changelog" | |
| ) | |
| # Historical rather than instructional, down-weighted at query time unless the | |
| # question is about a version or a change. | |
| # Anchoring at the start missed these entirely: ROS 2 nests changelogs under | |
| # Get-Started/Releases/, so "^Releases" matched nothing and a Kilted Kaiju | |
| # changelog outranked the tutorials. | |
| HISTORICAL_PATTERN = r"Releases/|Release-Notes|Changelog|Distributions/" | |
| # Where a doc path becomes a URL. | |
| DOC_URL = "https://docs.ros.org/en/rolling/{path}.html" | |
| SUMMARY = ( | |
| "ROS 2 is an open-source robotics middleware suite: libraries and tools for " | |
| "building robot applications, covering communication, tooling, simulation " | |
| "and hardware abstraction." | |
| ) | |
| # Questions the assistant should handle well. Used by the Space and as a | |
| # smoke-test set. | |
| EXAMPLES = [ | |
| "How do I write a minimal publisher and subscriber in Python?", | |
| "What is the difference between a service and an action?", | |
| "How do I create a custom message type in a package?", | |
| "How do I configure QoS settings for a topic?", | |
| "What does colcon build --symlink-install actually do?", | |
| "How do I write a lifecycle node?", | |
| ] | |