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
12 changes: 6 additions & 6 deletions scripts/fixtures/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ https://robotiq.com/support

Badge colors indicate who maintains the integration: ![Robotiq](https://img.shields.io/badge/Robotiq-blue) an official Robotiq-maintained driver, ![Third party](https://img.shields.io/badge/Third_party-lightgrey) a community-maintained project.

### SDKs/languages
### Libraries

{/* AUTO-GENERATED-SDK-TABLE:START */}
{/* AUTO-GENERATED-LIBRARIES-TABLE:START */}
| Product | C | C++ | Python |
|---|---|---|---|
| [2F / Hand-E](drivers/2F%20hande) | - | [![Robotiq](https://img.shields.io/badge/Robotiq-blue)](drivers/2F%20hande/SDK/C++) | [![Third party](https://img.shields.io/badge/Third_party-lightgrey)](drivers/2F%20hande/SDK/Python) |
Expand All @@ -28,7 +28,7 @@ Badge colors indicate who maintains the integration: ![Robotiq](https://img.shie
- **C** — Low-level C driver talking directly to the hardware's communication protocol (e.g. Modbus RTU, serial).
- **C++** — Low-level C++ driver/SDK for direct hardware integration.
- **Python** — Python driver/SDK for scripting and rapid prototyping.
{/* AUTO-GENERATED-SDK-TABLE:END */}
{/* AUTO-GENERATED-LIBRARIES-TABLE:END */}

### ROS

Expand Down Expand Up @@ -60,17 +60,17 @@ Badge colors indicate who maintains the integration: ![Robotiq](https://img.shie
- **Indigo** — ROS 1 release (2014), end of life.
{/* AUTO-GENERATED-ROS1-TABLE:END */}

### Physics engine
### Simulation

{/* AUTO-GENERATED-PHYSICS_ENGINE-TABLE:START */}
{/* AUTO-GENERATED-SIMULATION-TABLE:START */}
| Product | Isaac Sim | PyBullet |
|---|---|---|
| [2F / Hand-E](drivers/2F%20hande) | [![Third party](https://img.shields.io/badge/Third_party-lightgrey)](drivers/2F%20hande/Physics%20Engine/Isaac%20Sim) | [![Third party](https://img.shields.io/badge/Third_party-lightgrey)](drivers/2F%20hande/Physics%20Engine/PyBullet) |
| [TSF-85](drivers/TSF-85) | [![Third party](https://img.shields.io/badge/Third_party-lightgrey)](drivers/TSF-85/Physics%20Engine/Isaac%20Sim) | - |

- **Isaac Sim** — NVIDIA Isaac Sim integration for simulating the hardware.
- **PyBullet** — PyBullet integration for physics-based simulation.
{/* AUTO-GENERATED-PHYSICS_ENGINE-TABLE:END */}
{/* AUTO-GENERATED-SIMULATION-TABLE:END */}

### Other community projects

Expand Down
6 changes: 3 additions & 3 deletions scripts/update-readme.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// - "Repositories": one row per public, non-archived, non-fork repo in the
// robotiq GitHub org (excluding this repo and the docs site itself),
// pulled live from the GitHub API.
// - "Software tools": the SDK / ROS2 / ROS1 / Physics engine / Other tables
// - "Software tools": the Libraries / ROS2 / ROS1 / Simulation / Other tables
// imported from robotiq/robotiq.github.io's docs/intro.mdx (itself kept
// up to date by that repo's own scripts/generate-tools-table.js), with
// relative doc links rewritten to absolute robotiq.github.io URLs.
Expand All @@ -29,10 +29,10 @@ const DOCS_SITE_URL = 'https://robotiq.github.io';
const EXCLUDED_REPOS = new Set(['.github', DOCS_REPO]);

const SOFTWARE_SECTIONS = [
{ key: 'SDK', heading: 'SDKs/languages' },
{ key: 'LIBRARIES', heading: 'Libraries' },
{ key: 'ROS2', heading: 'ROS2' },
{ key: 'ROS1', heading: 'ROS1' },
{ key: 'PHYSICS_ENGINE', heading: 'Physics engine' },
{ key: 'SIMULATION', heading: 'Simulation' },
{ key: 'OTHER', heading: 'Other community projects' },
];

Expand Down
16 changes: 8 additions & 8 deletions scripts/update-readme.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ test('buildRepoTable escapes a pipe in a live repo description', () => {

test('extractMarkerBlock returns the trimmed content between markers', () => {
const raw = [
'{/* AUTO-GENERATED-SDK-TABLE:START */}',
'{/* AUTO-GENERATED-LIBRARIES-TABLE:START */}',
'| a | b |',
'{/* AUTO-GENERATED-SDK-TABLE:END */}',
'{/* AUTO-GENERATED-LIBRARIES-TABLE:END */}',
].join('\n');
assert.equal(extractMarkerBlock(raw, 'SDK'), '| a | b |');
assert.equal(extractMarkerBlock(raw, 'LIBRARIES'), '| a | b |');
});

test('extractMarkerBlock returns null when the marker pair is absent', () => {
assert.equal(extractMarkerBlock('no markers here', 'SDK'), null);
assert.equal(extractMarkerBlock('no markers here', 'LIBRARIES'), null);
});

test('absolutizeDocLinks rewrites relative links, leaves absolute/anchor links alone', () => {
Expand All @@ -68,7 +68,7 @@ test('absolutizeDocLinks prepends only the domain to a site-root-relative link,
});

function fakeIntro(overrides = {}) {
const sections = { SDK: '| sdk |', ROS2: '| ros2 |', ROS1: '| ros1 |', PHYSICS_ENGINE: '| phys |', OTHER: '| other |', ...overrides };
const sections = { LIBRARIES: '| sdk |', ROS2: '| ros2 |', ROS1: '| ros1 |', SIMULATION: '| phys |', OTHER: '| other |', ...overrides };
return Object.entries(sections)
.filter(([, body]) => body !== null)
.map(([key, body]) => `{/* AUTO-GENERATED-${key}-TABLE:START */}\n${body}\n{/* AUTO-GENERATED-${key}-TABLE:END */}`)
Expand All @@ -78,11 +78,11 @@ function fakeIntro(overrides = {}) {
test('buildSoftwareToolsSection includes every section heading, in order, when all markers are present', () => {
const section = buildSoftwareToolsSection(fakeIntro());
const headings = [...section.matchAll(/^#### (.+)$/gm)].map((m) => m[1]);
assert.deepEqual(headings, ['SDKs/languages', 'ROS2', 'ROS1', 'Physics engine', 'Other community projects']);
assert.deepEqual(headings, ['Libraries', 'ROS2', 'ROS1', 'Simulation', 'Other community projects']);
});

test('buildSoftwareToolsSection throws instead of publishing a partial section when a marker is missing', () => {
assert.throws(() => buildSoftwareToolsSection(fakeIntro({ PHYSICS_ENGINE: null })), /Physics engine/);
assert.throws(() => buildSoftwareToolsSection(fakeIntro({ SIMULATION: null })), /Simulation/);
});

test('replaceBetweenMarkers replaces content between an existing marker pair', () => {
Expand Down Expand Up @@ -157,7 +157,7 @@ test('buildSoftwareToolsSection matches a real intro.mdx fixture (catches upstre
const section = buildSoftwareToolsSection(fixture);

const headings = [...section.matchAll(/^#### (.+)$/gm)].map((m) => m[1]);
assert.deepEqual(headings, ['SDKs/languages', 'ROS2', 'ROS1', 'Physics engine', 'Other community projects']);
assert.deepEqual(headings, ['Libraries', 'ROS2', 'ROS1', 'Simulation', 'Other community projects']);

// Links absolutized against the docs site, not left root-relative.
assert.match(section, /\[2F \/ Hand-E\]\(https:\/\/robotiq\.github\.io\/docs\/drivers\/2F%20hande\)/);
Expand Down
Loading