Skip to content

[DOCS] Python test documentation for ReadTheDocs and co-simulation message flow diagrams #122

@yunlishao

Description

@yunlishao

Workflow: One Issue, One Branch, Three PRs

All work on one branch (e.g., docs/#122), with three PRs:

PR Phase Description Prerequisite Due
PR 1 Codebase familiarization Read docs, understand TrafficLayer, run Python test examples, document setup issues and notes encountered. None Mar 2
PR 2 Python test documentation Expand Python test docs and integrate into ReadTheDocs/Sphinx site (under Tutorials section). PR 1 merged Mar 23
PR 3 Message flow diagrams Create clear per-timestep message flow diagrams (PNG + PowerPoint source in doc/). Coordinate with @YuSun-go. PR 1 merged Mar 23

Note: PR 2 and PR 3 can proceed in parallel after PR 1 is merged, since they are independent deliverables.

How to work

  1. Create branch docs/#122 from main
  2. Reference this issue in each PR (e.g., "Part of [DOCS] Python test documentation for ReadTheDocs and co-simulation message flow diagrams #122")
  3. Check off the task list items below as they are completed

Roles

  • @vkatari10 — Primary owner. Focus on Phase 1 & 2 (codebase familiarization, Python test docs). Contribute to Phase 3.
  • @YuSun-go — Lead Phase 3 (synchronization/message flow diagrams). Review and support Phase 2 documentation.

Which module or test case is this related to?
TrafficLayer, Python test examples in tests/Python/, and co-simulation synchronization architecture documentation.

Describe the issue
The Python test examples (tests/Python/SimpleEchoClient, tests/Python/SimpleTrafficLight) have minimal documentation and are not integrated into the ReadTheDocs site. Additionally, the co-simulation message flow — clearly showing what each component sends/receives at each time step — needs to be documented with diagrams. These two efforts complement each other: understanding the Python tests requires understanding the message flow architecture.

Suggested change
This issue has progressive milestones designed to build codebase understanding while producing concrete documentation deliverables:

Phase 1: Codebase Familiarization

Phase 2: Python Test Documentation for ReadTheDocs

  • Expand documentation for each Python test scenario, including:
    • What the test demonstrates (which co-simulation components are involved)
    • Prerequisites (software, network files, config)
    • How to run it
    • Expected output / what to look for
  • Integrate the Python test documentation into the existing ReadTheDocs/Sphinx site (infrastructure already configured: .readthedocs.yml, doc/conf.py, doc/index.rst — the Tutorials section with tutorials/quickstart and tutorials/examples is a natural home)

Phase 3: Co-simulation Message Flow Diagrams

  • Create clear message flow diagrams showing, at each time step k, what step of message is received or sent by which component. Diagrams should cover:
    • TrafficLayer ↔ Traffic Simulator (SUMO) per-step message exchange
    • TrafficLayer ↔ Application Layer (Python client) per-step message exchange
    • TrafficLayer ↔ XIL (Simulink/CarMaker) per-step synchronization
    • End-to-end flow for a complete simulation step
  • Diagrams as PNG placed in doc/, with source files (PowerPoint) also tracked in the repo
  • Coordinate with @YuSun-go who is updating synchronization diagrams in parallel to avoid duplication

Additional context

  • The ReadTheDocs infrastructure is already set up with Sphinx (.readthedocs.yml, doc/index.rst). The Tutorials section (tutorials/quickstart, tutorials/examples) is the intended location for test/example documentation.
  • Use the task list checkboxes above to track progress directly in this issue.

Metadata

Metadata

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions