Skip to content

Commit f544c76

Browse files
docs: update docs and refine core API
Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
1 parent 81b8b94 commit f544c76

8 files changed

Lines changed: 57 additions & 36 deletions

File tree

ARCHITECTURE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ The platform-independent heart of the project. **Strictly Zero-Dependency.**
3333
graph TB
3434
subgraph "Core Layer"
3535
Models[Data Models<br/>Robot/Link/Joint]
36+
Composer[Composer API<br/>RobotBuilder/Assembly]
3637
Physics[Physics Engine<br/>Inertia/Validation]
3738
IO[Parsers & Generators<br/>URDF/XACRO/SRDF]
3839
end
40+
Composer --> Models
3941
IO --> Models
4042
Physics --> Models
4143
```
@@ -83,5 +85,5 @@ sequenceDiagram
8385

8486
---
8587

86-
**Last Updated:** 2026-04-15
87-
**Version:** 1.3.0
88+
**Last Updated:** 2026-05-13
89+
**Version:** 1.4.0

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ If you want to contribute to LinkForge or use the latest source code:
118118

119119
Complete examples in `examples/` directory:
120120

121-
- `roundtrip_test_robot.urdf`: A comprehensive robot containing ALL 6 URDF joint types (fixed, revolute, continuous, prismatic, planar, floating), plus sensors. Perfect for testing full roundtrip capabilities.
122121
- `mobile_robot.urdf`: A simple mobile robot base.
123122
- `diff_drive_robot.urdf`: A differential drive robot with wheels.
124123
- `quadruped_robot.urdf`: A 4-legged robot demonstrating complex kinematic chains and multi-link assemblies.
@@ -136,7 +135,6 @@ Complete examples in `examples/` directory:
136135
### Setup
137136
```bash
138137
# 1. Install 'just' command runner (see Contributing Guide for OS-specific instructions)
139-
# 1. Install 'just' command runner
140138
# 2. Clone repository
141139
git clone https://github.com/arounamounchili/linkforge.git
142140
cd linkforge
@@ -157,15 +155,14 @@ For complete instructions on testing, linting, and building, see our [Contributi
157155

158156
## 🗺️ Roadmap
159157

160-
161158
### Phase 0: The Foundation (Completed)
162159
- [x] **v1.0.0**: Core URDF/XACRO Export, Sensors, & `ros2_control` basics.
163160
- [x] **v1.1.0**: Enhanced Documentation, Workflow Polish, & Bug Fixes.
164161
- [x] **v1.2.0**: Architectural Stability (Hexagonal Core).
165162

166163
### Phase 1: The Professional Bridge (Current)
167164
- [x] **v1.3.0**: Performance & Control (NumPy Acceleration, Depsgraph, & ROS2 Control).
168-
- [/] **v1.4.0**: Modular Synthesis (Composer API, Namespaced Merging, & SRDF Generation).
165+
- [x] **v1.4.0**: Modular Synthesis (Composer API, Namespaced Merging, & SRDF Generation).
169166
- [ ] **v1.5.0**: Visual SRDF Editor in Blender & Semantic Assistant.
170167
- [ ] **v1.6.0**: LinkForge CLI & GitHub Actions for automated validation.
171168

core/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ It provides robust, dependency-minimized parsing and generation of robot descrip
1515
- `physics/`: Math and kinematics utilities for inertia and joint dynamics.
1616
- `validation/`: Robust schema validation for robot data.
1717
- `utils/`: Common helpers and mathematical operations.
18-
- `base.py`, `exceptions.py`, `logging_config.py`: Core interfaces, error handling, and logging.
18+
- `base.py`, `constants.py`, `exceptions.py`, `logging_config.py`: Core interfaces, shared constants, error handling, and logging.
1919

2020
## Development
2121

2222
The core library is built and managed using [`uv`](https://docs.astral.sh/uv/).
2323

2424
```bash
2525
# Install dependencies
26-
uv sync
26+
just install
2727

2828
# Run core tests (execute from the project root directory)
29-
uv run pytest tests/unit/core
29+
just test-core
3030
```

core/src/linkforge_core/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
__version__ = "1.3.0" # x-release-please-version
1616

17-
from . import generators, models, parsers, physics
17+
from . import composer, generators, models, parsers, physics, validation
18+
from .composer import RobotBuilder
1819
from .exceptions import (
1920
LinkForgeError,
2021
RobotGeneratorError,
@@ -24,11 +25,16 @@
2425
)
2526
from .generators import URDFGenerator, XACROGenerator
2627
from .utils.math_utils import format_float, format_vector
28+
from .validation import RobotValidator
2729

2830
__all__ = [
2931
"models",
3032
"physics",
3133
"parsers",
34+
"composer",
35+
"validation",
36+
"RobotBuilder",
37+
"RobotValidator",
3238
"URDFGenerator",
3339
"XACROGenerator",
3440
"format_float",

docs/source/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ LinkForge streamlines robotics modeling with the following capabilities:
2626
- **ROS2 Control Support**: Automatic hardware interface configuration.
2727
- **Complete Sensor Suite**: Integrated support for LiDAR, IMU, Depth Cameras, and more.
2828
- **Automatic Physics**: Scientific mass properties and inertia tensor calculation.
29+
- **Modular Robot Assembly**: Build and merge robots programmatically with the **Composer API** (v1.4.0).
30+
- **SRDF Generation**: Automatic creation of semantic metadata for complex systems (v1.4.0).
2931

3032
---
3133

docs/source/reference/api/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The `RobotBuilder` Composer is the recommended way to build robots in Python.
5050
It handles validation, prefixing, and SRDF generation automatically.
5151

5252
```python
53-
from linkforge_core.composer import RobotBuilder
53+
from linkforge_core import RobotBuilder
5454
from linkforge_core.models import Robot
5555
from linkforge_core.models.geometry import Vector3
5656
from linkforge_core.models.joint import JointLimits
@@ -106,7 +106,7 @@ inertia = calculate_cylinder_inertia(cylinder, mass=5.0)
106106
### Validation
107107

108108
```python
109-
from linkforge_core.validation.validator import RobotValidator
109+
from linkforge_core import RobotValidator
110110

111111
# Validate robot
112112
validator = RobotValidator()

platforms/blender/README.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,28 @@ This package integrates the LinkForge core logic directly into Blender's UI and
55

66
## Structure
77

8-
- `linkforge/`: The Blender extension source code containing panels, operators, and property groups.
9-
- `blender/`: The main Blender integration module.
10-
- `adapters/`: Bridges between Blender objects and `linkforge_core` models.
11-
- `handlers/`: Scene post-load and object update handlers.
12-
- `logic/`: High-level operations bridging core models and the viewport.
13-
- `operators/`: Blender Operators for importing, exporting, and managing robot data.
14-
- `panels/`: Blender UI layouts and side panels.
15-
- `properties/`: Blender Property Groups binding LinkForge data to Blender objects.
16-
- `visualization/`: Interactive 3D view elements for limits, joints, and inertia.
17-
- `utils/`: Blender-specific helper functions.
18-
- `preferences.py`: Extension configuration and settings.
19-
- `linkforge_core/`: Internal reference to the core library (symlinked for standalone use).
20-
- `scripts/`: Development scripts and utilities.
21-
- `wheels/`: Pre-built wheels for bundled Python dependencies.
22-
- `blender_manifest.toml`: The extension metadata for Blender 4.2+.
8+
- `linkforge/`: The primary extension package.
9+
- `blender/`: Main integration logic (adapters, handlers, logic, operators, panels, etc.).
10+
- `blender_manifest.toml`: Extension metadata for Blender 4.2+.
11+
- `scripts/`: Build and development utilities (e.g., `build.py`).
12+
- `wheels/`: Platform-specific Python dependencies (bundled in the final `.zip`).
13+
- `pyproject.toml`: Local development configuration.
14+
15+
> [!NOTE]
16+
> The **LinkForge Core** library is located at the project root (`/core`) and is automatically bundled into this extension during the build process.
2317
2418
## Development
2519

2620
To work on the Blender extension, make sure `uv` is installed, then sync the dependencies:
2721

2822
```bash
29-
uv sync
23+
just install
3024
```
3125

3226
### Running Tests
3327

3428
To run Blender-specific integration and unit tests, from the project root use:
3529

3630
```bash
37-
python blender_launcher.py
31+
just test-blender
3832
```

tests/README.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,49 @@ The test suite separates pure logic from platform-specific behavior:
88

99
### 1. `unit/`
1010
Isolated tests for individual components avoiding external dependencies.
11-
- **`unit/core/`**: Tests for robot models, parsers, and physics utilities. Runs in standard Python.
12-
- **`unit/platforms/blender/`**: Tests for Blender utilities (scene helpers, visualization, operators). Requires a Blender runtime.
11+
- **`unit/core/`**: Tests for robot models, parsers, and physics utilities.
12+
- **`unit/platforms/blender/`**: Tests for Blender utilities (scene helpers, visualization).
1313

1414
### 2. `integration/`
1515
End-to-end tests verifying the interaction between multiple components.
16-
- **`integration/core/`**: Verifies complex URDF parsing, Xacro expansion scenarios, and validation features like Inertia calculations.
17-
- **`integration/platforms/blender/`**: Verifies the complete roundtrip process (Import → Scene Setup → Export).
16+
- **`integration/core/`**: Verifies complex URDF/SRDF parsing and validation.
17+
- **`integration/platforms/blender/`**: Verifies the complete roundtrip process.
18+
19+
### 3. Infrastructure
20+
- `blender_launcher.py` (Root): CLI tool to run tests inside a Blender environment.
21+
- `mock_bpy_env.py`: Comprehensive mock of the Blender API for fast logic testing.
22+
- `conftest.py`, `core_test_utils.py`, `blender_test_utils.py`: Shared fixtures and assertions.
1823

1924
## How to Run Tests
2025

2126
### Standard Python Tests
2227
To run core unit tests and core integration tests:
2328
```bash
24-
pytest tests/unit/core tests/integration/core
29+
just test-core
2530
```
2631

2732
### Blender-Dependent Tests
28-
To run tests that require the Blender Python API (`bpy`), use the launcher from the project root:
33+
#### A. Fast Logic Testing (No Blender Required)
34+
Tests the Blender integration logic using a comprehensive mock environment. This is very fast and runs in standard Python.
35+
```bash
36+
just test-blender-logic
37+
```
38+
39+
#### B. Full Integration Testing (Requires Real Blender)
40+
Runs tests inside a real Blender instance to verify UI, visualization, and roundtrip fidelity.
2941
```bash
30-
python blender_launcher.py
42+
just test-blender
3143
```
3244
*Note: Ensure your `BLENDER_PATH` environment variable is set or Blender is installed at its default location.*
3345

46+
## 📊 Test Coverage
47+
48+
To run the entire suite and generate a combined coverage report (HTML):
49+
```bash
50+
just coverage
51+
```
52+
The report will be available at `htmlcov/index.html`.
53+
3454
## Best Practices for Contributors
3555

3656
1. **Use Fixtures**: Place shared test resources (mock robots, custom builders) in `tests/conftest.py`. Prefer self-contained tests (inline strings or programmatic construction) over external file dependencies.

0 commit comments

Comments
 (0)