Skip to content

docs: Configure Google docstrings with Ruff and MkDocs - #4798

Merged
TomCC7 merged 8 commits into
mainfrom
cc/chore/google-docstring-convention
Oct 24, 2026
Merged

TomCC7 merged 8 commits into
mainfrom
cc/chore/google-docstring-convention

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Configure Google docstrings using Ruff's existing D405/D416 rules and the standard MkDocs Python handler. Ruff checks recognized section headings; it does not reject every NumPy, reST, or Epydoc format. No docstring-presence, parameter-completeness, ANN, or DOC rules are enabled, and existing mypy settings are unchanged.

Convert only the 14 SceneClient method docstrings needed for these rules. SceneClient's executable AST and annotations are unchanged.

MkDocs uses mkdocstrings[python], Google parsing, existing annotation display, and disabled missing-type warnings. This PR adds no automatic API reference pages or embedded API examples. There are no new Python tooling scripts, custom Griffe extensions, HTML fixtures, or runtime package-structure changes. CI uses the standard mkdocs build --strict command.

Docs tooling requires Python 3.11 or newer; runtime Python support is unchanged. Available annotations will be rendered when API references are added later; the current site does not gain generated API coverage from this configuration alone.

Validation: whole-repository Ruff, changed Python formatting, lockfile consistency, and full mkdocs build --strict. Confirmed zero added Python files, removed helper references, unchanged mypy configuration, and unchanged existing configuration guide/navigation. Full mypy and the complete pre-commit suite were not run.

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go2 replay realtime (arm64)

Details
Benchmark suite Current: dcc482f Previous: 5daef81 Ratio
peak memory 1711.172 MB 1686.902 MB 1.01
peak threads 376 threads 361 threads 1.04
network (transport) 2733.777 MB 2732.025 MB 1.00
disk write 1.508 MB 1.723 MB 0.88
instructions 135.984 G 136.239 G 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
7373 1 7372 55
View the top 1 failed test(s) by shortest run time
dimos.e2e_tests.test_dimsim_spatial_memory::test_go_to_the_bed
Stack Traces | 274s run time
lcm_spy = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7385fa10ec00>
start_blueprint = <function start_blueprint.<locals>.set_name_and_start at 0x7385f87bb600>
wait_for_system_ready = <function wait_for_system_ready.<locals>.wait at 0x7385f87bb6a0>
human_input = <function human_input.<locals>.send_human_input at 0x7385f87bb7e0>
dim_sim = <dimos.e2e_tests.dim_sim_client.DimSimClient object at 0x73876b7b5e20>
explore_house = <function explore_house.<locals>.explore at 0x7385f9b8c040>

    @pytest.mark.self_hosted_large
    def test_go_to_the_bed(
        lcm_spy, start_blueprint, wait_for_system_ready, human_input, dim_sim, explore_house
    ) -> None:
        start_blueprint(
            "run",
            "unitree-go2-agentic",
            simulator="dimsim",
        )
        wait_for_system_ready(timeout=300.0)
    
        explore_house()
    
        human_input("go to the bed")
    
>       lcm_spy.wait_until_odom_position(-3.567, -1.332, threshold=2, timeout=180)

dim_sim    = <dimos.e2e_tests.dim_sim_client.DimSimClient object at 0x73876b7b5e20>
explore_house = <function explore_house.<locals>.explore at 0x7385f9b8c040>
human_input = <function human_input.<locals>.send_human_input at 0x7385f87bb7e0>
lcm_spy    = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7385fa10ec00>
start_blueprint = <function start_blueprint.<locals>.set_name_and_start at 0x7385f87bb600>
wait_for_system_ready = <function wait_for_system_ready.<locals>.wait at 0x7385f87bb6a0>

dimos/e2e_tests/test_dimsim_spatial_memory.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dimos/e2e_tests/lcm_spy.py:143: in wait_until_odom_position
    self.wait_for_message_result(
        predicate  = <function LcmSpy.wait_until_odom_position.<locals>.predicate at 0x7385f87baac0>
        self       = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7385fa10ec00>
        threshold  = 2
        timeout    = 180
        x          = -3.567
        y          = -1.332
dimos/e2e_tests/lcm_spy.py:129: in wait_for_message_result
    wait_until(
        event      = <threading.Event at 0x7385f98819d0: unset>
        fail_message = 'Failed to get to position x=-3.567, y=-1.332'
        listener   = <function LcmSpy.wait_for_message_result.<locals>.listener at 0x7385f87b96c0>
        predicate  = <function LcmSpy.wait_until_odom_position.<locals>.predicate at 0x7385f87baac0>
        self       = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7385fa10ec00>
        timeout    = 180
        topic      = '/odom#geometry_msgs.PoseStamped'
        type       = <class 'dimos.msgs.geometry_msgs.PoseStamped.PoseStamped'>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

predicate = <bound method Event.is_set of <threading.Event at 0x7385f98819d0: unset>>

    def wait_until(
        predicate: Callable[[], bool],
        *,
        timeout: float,
        interval: float = 0.1,
        message: str | None = None,
    ) -> None:
        """Poll ``predicate`` until it returns truthy or ``timeout`` elapses."""
        deadline = time.monotonic() + timeout
        while time.monotonic() < deadline:
            if predicate():
                return
            time.sleep(interval)
>       raise TimeoutError(message or f"Timed out after {timeout}s waiting for condition")
E       TimeoutError: Failed to get to position x=-3.567, y=-1.332

deadline   = 9290307.094736096
interval   = 0.1
message    = 'Failed to get to position x=-3.567, y=-1.332'
predicate  = <bound method Event.is_set of <threading.Event at 0x7385f98819d0: unset>>
timeout    = 180

.../utils/testing/waiting.py:35: TimeoutError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Comment thread .github/workflows/docs-check.yml Outdated
Comment thread bin/hooks/docstring_style.py Outdated
@TomCC7
TomCC7 marked this pull request as ready for review October 23, 2026 21:39
@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No outstanding findings block merging these changes.

Summary

Configures Google docstrings with Ruff and the standard MkDocs Python handler.

  • Python docstrings use Google-style sections.
  • Docs CI builds the site when Python or docs change.

Reviews (2) · Last reviewed commit: "refactor: remove custom docs helpers and..." · Reviewed by Greptile

Comment thread bin/hooks/docstring_style.py Outdated
@TomCC7 TomCC7 changed the title Enforce Google docstring sections and render API annotations Use Ruff for Google docstring headings and render API annotations Oct 23, 2026
@TomCC7
TomCC7 marked this pull request as draft October 23, 2026 23:36
@TomCC7 TomCC7 changed the title Use Ruff for Google docstring headings and render API annotations Configure Google docstrings with Ruff and MkDocs Oct 23, 2026
@TomCC7
TomCC7 marked this pull request as ready for review October 23, 2026 23:52
Comment thread .github/workflows/docs-check.yml
@TomCC7 TomCC7 added the backport:skip Skip creating a backport to any release branches label Oct 24, 2026
@TomCC7
TomCC7 enabled auto-merge (squash) October 24, 2026 05:42
@TomCC7 TomCC7 changed the title Configure Google docstrings with Ruff and MkDocs docs: Configure Google docstrings with Ruff and MkDocs Oct 24, 2026
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Oct 24, 2026
@TomCC7
TomCC7 merged commit d9793f1 into main Oct 24, 2026
53 of 54 checks passed
@TomCC7
TomCC7 deleted the cc/chore/google-docstring-convention branch October 24, 2026 06:05

This branch was successfully deployed

1 active deployment
cachix — dcc482f4 Deployed Oct 24, 2026 by TomCC7 via cachix-build-macos #14202
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip Skip creating a backport to any release branches ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants