Skip to content
Draft
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
2 changes: 1 addition & 1 deletion scripts/generate-llms-files.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def build_llms_txt(pages: list[DocPage]) -> str:
"",
"> LLM-friendly index of OpenHands documentation (V1). Legacy V0 docs pages are intentionally excluded.",
"",
"The sections below intentionally separate OpenHands product documentation (Web App Server / Cloud / CLI)",
"The sections below intentionally separate OpenHands applications documentation (Web App Server / Cloud / CLI)",
"from the OpenHands Software Agent SDK.",
"",
]
Expand Down
30 changes: 30 additions & 0 deletions tests/test_generate_llms_files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""Regression tests for the llms file generator."""

import importlib.util
import sys
from pathlib import Path


SCRIPT_PATH = Path(__file__).parent.parent / 'scripts' / 'generate-llms-files.py'
SPEC = importlib.util.spec_from_file_location('generate_llms_files', SCRIPT_PATH)
assert SPEC is not None
assert SPEC.loader is not None
MODULE = importlib.util.module_from_spec(SPEC)
sys.modules[SPEC.name] = MODULE
SPEC.loader.exec_module(MODULE)


class TestGenerateLlmsFiles:
"""Tests for the llms file generator script."""

def test_llms_intro_uses_applications_wording(self):
"""The llms intro should continue to use 'applications documentation'."""
pages = MODULE.iter_doc_pages()

llms_text = MODULE.build_llms_txt(pages)

assert (
'The sections below intentionally separate OpenHands applications documentation '
'(Web App Server / Cloud / CLI)' in llms_text
)
assert 'OpenHands product documentation' not in llms_text
Loading