diff --git a/.github/workflows/doxygen-pages.yml b/.github/workflows/doxygen-pages.yml index 32f0222..7504c3b 100644 --- a/.github/workflows/doxygen-pages.yml +++ b/.github/workflows/doxygen-pages.yml @@ -7,6 +7,7 @@ on: paths: - Doxygen - README.md + - '**/package.xml' - docs/** - '**/*.md' - '**/*.dox' @@ -26,6 +27,7 @@ on: paths: - Doxygen - README.md + - '**/package.xml' - docs/** - '**/*.md' - '**/*.dox' @@ -58,12 +60,80 @@ jobs: - name: Check out repository uses: actions/checkout@v4 + - name: Check package versions + id: package_version + run: | + python3 <<'PY' + import re + import sys + import xml.etree.ElementTree as ET + from pathlib import Path + + root = Path('.') + package_files = sorted(root.glob('**/package.xml')) + + if not package_files: + print('No package.xml files found.') + sys.exit(1) + + versions = {} + invalid = [] + semver_re = re.compile(r'^\d+\.\d+\.\d+$') + + for pkg_file in package_files: + tree = ET.parse(pkg_file) + package = tree.getroot() + name = package.findtext('name', '').strip() + version = package.findtext('version', '').strip() + + if not name or not version: + invalid.append((str(pkg_file), name or '', version or '')) + continue + + if not semver_re.match(version): + invalid.append((str(pkg_file), name, version)) + continue + + versions[name] = version + + if invalid: + print('Invalid package metadata found:') + for path, name, version in invalid: + print(f' - {path}: name={name}, version={version}') + sys.exit(1) + + unique_versions = sorted(set(versions.values())) + + print('Discovered package versions:') + for name, version in sorted(versions.items()): + print(f' - {name}: {version}') + + if len(unique_versions) != 1: + print('\nVersion mismatch detected across package.xml files.') + print('Unique versions found:', ', '.join(unique_versions)) + sys.exit(1) + + version = unique_versions[0] + print(f'\nAll package.xml files use version {version}.') + + with open('project_version.txt', 'w', encoding='utf-8') as f: + f.write(version) + PY + + VERSION=$(cat project_version.txt) + echo "PROJECT_VERSION=$VERSION" >> "$GITHUB_ENV" + echo "project_version=$VERSION" >> "$GITHUB_OUTPUT" + rm -f project_version.txt + - name: Install Doxygen run: sudo apt-get update && sudo apt-get install -y doxygen - name: Build HTML documentation run: | - doxygen Doxygen + cp Doxygen Doxygen.ci + printf '\nPROJECT_NUMBER = %s\n' "${PROJECT_VERSION}" >> Doxygen.ci + doxygen Doxygen.ci + rm -f Doxygen.ci touch docs/html/.nojekyll - name: Upload Pages artifact diff --git a/capabilities2/package.xml b/capabilities2/package.xml index 3a0ddfc..3f4109c 100644 --- a/capabilities2/package.xml +++ b/capabilities2/package.xml @@ -7,10 +7,12 @@ Michael Pritchard + Kalana Ratnayake Kalana Ratnayake Michael Pritchard Kalana Ratnayake + Kalana Ratnayake MIT diff --git a/capabilities2_events/package.xml b/capabilities2_events/package.xml index 9d200fb..0edb36e 100644 --- a/capabilities2_events/package.xml +++ b/capabilities2_events/package.xml @@ -7,10 +7,12 @@ Michael Pritchard + Kalana Ratnayake Kalana Ratnayake Michael Pritchard Kalana Ratnayake + Kalana Ratnayake MIT diff --git a/capabilities2_msgs/package.xml b/capabilities2_msgs/package.xml index 834af43..00c8a3d 100644 --- a/capabilities2_msgs/package.xml +++ b/capabilities2_msgs/package.xml @@ -8,10 +8,12 @@ Michael Pritchard mik-p + Kalana Ratnayake Kalana Ratnayake Michael Pritchard Kalana Ratnayake + Kalana Ratnayake MIT diff --git a/capabilities2_runner/package.xml b/capabilities2_runner/package.xml index eec7091..6cb0bdc 100644 --- a/capabilities2_runner/package.xml +++ b/capabilities2_runner/package.xml @@ -7,10 +7,12 @@ Michael Pritchard + Kalana Ratnayake Kalana Ratnayake Michael Pritchard Kalana Ratnayake + Kalana Ratnayake MIT diff --git a/capabilities2_server/package.xml b/capabilities2_server/package.xml index 06bb72f..311bd15 100644 --- a/capabilities2_server/package.xml +++ b/capabilities2_server/package.xml @@ -8,10 +8,12 @@ Michael Pritchard mik-p + Kalana Ratnayake Kalana Ratnayake Michael Pritchard Kalana Ratnayake + Kalana Ratnayake MIT diff --git a/docs/images/system-structure.png b/docs/images/system-structure.png index 4a60c92..c89f52b 100644 Binary files a/docs/images/system-structure.png and b/docs/images/system-structure.png differ diff --git a/docs/readme.md b/docs/readme.md deleted file mode 100644 index 3013202..0000000 --- a/docs/readme.md +++ /dev/null @@ -1,35 +0,0 @@ -# Docs - -The documentation site is generated with Doxygen from the existing Markdown in this `docs/` tree together with comments from the source code. The Doxygen configuration lives at the repository root in [`Doxygen`](../Doxygen). - -```bash -# install doxygen if it is not already available -sudo apt-get update && sudo apt-get install -y doxygen - -# from the repository root -doxygen Doxygen -``` - -The generated HTML site is written to `docs/html/` and the entry page is `docs/html/index.html`. - -For GitHub Pages, this repository can use GitHub Actions as both the build source and the deployment source. The workflow in `.github/workflows/doxygen-pages.yml` rebuilds the site whenever files change and deploys the generated `docs/html/` artifact to Pages. - -## Basic Tutorial - -A basic tutorial can be found in [here](./basic_tutorial.md). This tutorial will guide you through the process of creating a simple capability and running it. - -## Capabilities Server - -The [capabilities server](../capabilities2_server/readme.md) is the main node in the capabilities2 package. It is responsible for managing capabilities, providers, and semantic interfaces. It is also responsible for starting and stopping capabilities. - -## Capabilities Runner - -A capabilities runner is a plugin that allows capabilities to be executed in a more arbitrary way. Base runner classes can be used to create custom runners for a given application. See the [capabilities2_runner](../capabilities2_runner/readme.md) package for more information. - -## Capabilities Messages - -This package contains messages for the capabilities2 package. See the [capabilities2_msgs](../capabilities2_msgs/readme.md) package for more information. - -## Launch Runner Status - -The `LaunchRunner` interface is still kept in the `capabilities2_runner` package, but launch-file execution support is intentionally deferred because of incompatibilities with the current ROS2 launch system. Documentation for launch-based capability execution will be restored once the replacement solution is ready.