Skip to content

[DOCS] Revisit all core FIXS codebase to enable readthedocs API support #37

Open

Description

@yunlishao

Describe the issue
The core FIXS code (.py, .cpp, .m) has almost no doc comments, so Read the Docs can't generate an API reference. doc/api/index.md is still a "forthcoming" stub.

Revised 2026-09-23 after #137 / PR #395. The docs site now builds clean with warnings as errors (RTD fail_on_warning plus the docs.yml PR check), so this can land in small, verifiable pieces, Python first.

Suggested change

Phase 1: Python CommonLib (do first)

  • Add Google-style docstrings (rendered by sphinx.ext.napoleon, already enabled) to CommonLib/ConfigHelper.py, MsgHelper.py, SocketHelper.py and VehDataMsgDefs.py. That's about 1,340 lines and 54 functions and classes, with almost no docstrings today:
    • a module docstring for each file
    • every public class and function
    • dataclass fields documented with units where the code or the C++ header (CommonLib/VehDataMsgDefs.h) establishes them
  • Docstring-only change: prove no code moved by comparing each file's AST with docstrings stripped, before and after.
  • Replace the doc/api/index.md stub with automodule pages for the four modules. Set autodoc_mock_imports = ["yaml", "numpy"] in doc/conf.py, because RTD installs only doc/requirements_doc.txt.
  • Build stays warning-free (python -m sphinx -W --keep-going -b html doc _build/html; the PR check enforces it).

Phase 2: C++ headers (later)

  • Doxygen comments on the public headers (ConfigHelper.h, SocketHelper.h, MsgHelper.h, TrafficHelper.h), then breathe/exhale. Adding the tooling first would only produce empty pages.

Phase 3: MATLAB (later)

  • Decide on a format for the .m helpers (RealSimPack.m, RealSimDepack.m, ...) if API docs are wanted there.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions