Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ad-api): add release status #407

Merged
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/fail_safe/mrm_state
status: not released
method: notification
type:
name: autoware_adapi_v1_msgs/msg/MrmState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/interface/version
status: v1.0.0
method: function call
type:
name: autoware_adapi_version_msgs/srv/InterfaceVersion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/localization/initialization_state
status: v1.0.0
method: notification
type:
name: autoware_adapi_v1_msgs/msg/LocalizationInitializationState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/localization/initialize
status: v1.0.0
method: function call
type:
name: autoware_adapi_v1_msgs/srv/InitializeLocalization
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/motion/accept_start
status: not released
method: function call
type:
name: autoware_adapi_v1_msgs/srv/AcceptStart
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/motion/state
status: not released
method: notification
type:
name: autoware_adapi_v1_msgs/msg/MotionState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/operation_mode/change_to_autonomous
status: v1.0.0
method: function call
type:
name: autoware_adapi_v1_msgs/srv/ChangeOperationMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/operation_mode/change_to_local
status: v1.0.0
method: function call
type:
name: autoware_adapi_v1_msgs/srv/ChangeOperationMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/operation_mode/change_to_remote
status: v1.0.0
method: function call
type:
name: autoware_adapi_v1_msgs/srv/ChangeOperationMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/operation_mode/change_to_stop
status: v1.0.0
method: function call
type:
name: autoware_adapi_v1_msgs/srv/ChangeOperationMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/operation_mode/disable_autoware_control
status: v1.0.0
method: function call
type:
name: autoware_adapi_v1_msgs/srv/ChangeOperationMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/operation_mode/enable_autoware_control
status: v1.0.0
method: function call
type:
name: autoware_adapi_v1_msgs/srv/ChangeOperationMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/operation_mode/state
status: v1.0.0
method: notification
type:
name: autoware_adapi_v1_msgs/msg/OperationModeState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/planning/steering_factors
status: not released
method: realtime stream
type:
name: autoware_adapi_v1_msgs/msg/SteeringFactorArray
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/planning/velocity_factors
status: not released
method: realtime stream
type:
name: autoware_adapi_v1_msgs/msg/VelocityFactorArray
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/routing/clear_route
status: v1.0.0
method: function call
type:
name: autoware_adapi_v1_msgs/srv/ClearRoute
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/routing/route
status: v1.0.0
method: notification
type:
name: autoware_adapi_v1_msgs/msg/Route
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/routing/set_route
status: v1.0.0
method: function call
type:
name: autoware_adapi_v1_msgs/srv/SetRoute
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/routing/set_route_points
status: v1.0.0
method: function call
type:
name: autoware_adapi_v1_msgs/srv/SetRoutePoints
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/routing/state
status: v1.0.0
method: notification
type:
name: autoware_adapi_v1_msgs/msg/RouteState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/vehicle/dimensions
status: not released
method: function call
type:
name: autoware_adapi_v1_msgs/srv/GetVehicleDimensions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/vehicle/doors/layout
status: not released
method: function call
type:
name: autoware_adapi_v1_msgs/srv/GetDoorLayout
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/vehicle/doors/status
status: not released
method: notification
type:
name: autoware_adapi_v1_msgs/msg/DoorStatusArray
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/vehicle/kinematics
status: not released
method: realtime stream
type:
name: autoware_adapi_v1_msgs/msg/VehicleKinematics
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: /api/vehicle/status
status: not released
method: notification
type:
name: autoware_adapi_v1_msgs/msg/VehicleStatus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# {{ title }}

## Status

- Latest Version: {{ status }}
- Method: {{ method }}
- Type: {{ create_relative_link(type.name, 'design/autoware-interfaces/ad-api/types/' + type.name) }}
- Data Type: {{ create_relative_link(type.name, 'design/autoware-interfaces/ad-api/types/' + type.name) }}

## Description

Expand Down
17 changes: 13 additions & 4 deletions tools/autoware-interfaces/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ def load_markdown_metadata(path: Path):
lines = path.read_text().splitlines()
if (2 < len(lines)) and (lines[0] == "---"):
data = lines[1:lines.index("---", 1)]
return yaml.safe_load("\n".join(data))
data = yaml.safe_load("\n".join(data))
return test_markdown_metadata(data, path)
return None


def test_markdown_metadata(data, path):
if "status" not in data:
raise KeyError(f"status in {path}")
return data


def is_documentation_msg(name: str):
targets = set(["autoware_adapi_version_msgs", "autoware_adapi_v1_msgs"])
return name.split("/")[0] in targets
Expand Down Expand Up @@ -89,12 +96,12 @@ def main():
adapi = Path("docs/design/autoware-interfaces/ad-api/list/api")
pages = (load_markdown_metadata(path) for path in adapi.glob("**/*.md"))
pages = [page for page in pages if page]
names = (page["type"]["name"] for page in pages)

# Create a field list for each data type.
names = (page["type"]["name"] for page in pages)
specs = {}
visited = set()
depends = set(names)
specs = {}
while depends:
name = depends.pop()
parse_rosidl_file(depends, visited, specs, name)
Expand All @@ -116,7 +123,9 @@ def main():

# Clean up data type pages.
base = Path("docs/design/autoware-interfaces/ad-api/types")
shutil.rmtree(base)
for path in base.iterdir():
if path.is_dir():
shutil.rmtree(path)

# Generate data type pages.
for name in specs:
Expand Down