Skip to content

Commit be259e2

Browse files
authored
Merge pull request #785 from tisnik/lcore-680-doc-for-tests
LCORE-680: documentation generated for tests
2 parents 732e320 + 5ead62b commit be259e2

File tree

28 files changed

+419
-9
lines changed

28 files changed

+419
-9
lines changed

scripts/gen_doc.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import ast
88
from pathlib import Path
99

10+
DIRECTORIES = ["src", "tests/unit", "tests/integration", "tests/e2e"]
11+
1012

1113
def generate_docfile(directory):
1214
"""Generate README.md in the CWD."""
@@ -48,10 +50,17 @@ def generate_documentation_on_path(path):
4850

4951
def main():
5052
"""Entry point to this script, regenerates documentation in all directories."""
51-
generate_documentation_on_path("src/")
52-
for path in Path("src").rglob("*"):
53-
if path.is_dir():
54-
generate_documentation_on_path(path)
53+
for directory in DIRECTORIES:
54+
generate_documentation_on_path(f"{directory}/")
55+
for path in Path(directory).rglob("*"):
56+
if path.is_dir():
57+
if (
58+
path.name == "lightspeed_stack.egg-info"
59+
or path.name == "__pycache__"
60+
or ".ruff_cache" in str(path)
61+
):
62+
continue
63+
generate_documentation_on_path(path)
5564

5665

5766
if __name__ == "__main__":

tests/e2e/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# List of source files stored in `tests/e2e/` directory
2+
3+
## [__init__.py](__init__.py)
4+
End-to-end tests for the lightspeed-stack REST API service.
5+
6+
## [gen_scenario_list.py](gen_scenario_list.py)
7+
Scenario list generator.
8+
9+
## [test_api.py](test_api.py)
10+
End-to-end tests for basic REST API endpoints.
11+

tests/e2e/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"""End to end tests for the lightspeed-stack REST API service."""
1+
"""End-to-end tests for the lightspeed-stack REST API service."""

tests/e2e/configs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# List of source files stored in `tests/e2e/configs` directory
2+

tests/e2e/configuration/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# List of source files stored in `tests/e2e/configuration` directory
2+

tests/e2e/features/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List of source files stored in `tests/e2e/features` directory
2+
3+
## [environment.py](environment.py)
4+
Code to be called before and after certain events during testing.
5+

tests/e2e/features/steps/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# List of source files stored in `tests/e2e/features/steps` directory
2+
3+
## [__init__.py](__init__.py)
4+
Implementation of end-to-end tests steps.
5+
6+
## [auth.py](auth.py)
7+
Implementation of common test steps.
8+
9+
## [common.py](common.py)
10+
Implementation of common test steps.
11+
12+
## [common_http.py](common_http.py)
13+
Common steps for HTTP-related operations.
14+
15+
## [conversation.py](conversation.py)
16+
Implementation of common test steps.
17+
18+
## [feedback.py](feedback.py)
19+
Implementation of common test steps for the feedback API.
20+
21+
## [health.py](health.py)
22+
Implementation of common test steps.
23+
24+
## [info.py](info.py)
25+
Implementation of common test steps.
26+
27+
## [llm_query_response.py](llm_query_response.py)
28+
LLM query and response steps.
29+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"""Implementation of end to end tests steps."""
1+
"""Implementation of end-to-end tests steps."""

tests/e2e/features/steps/common_http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Common steps for HTTP related operations."""
1+
"""Common steps for HTTP-related operations."""
22

33
import json
44

tests/e2e/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"""Integration tests for basic REST API endpoints."""
1+
"""End-to-end tests for basic REST API endpoints."""

0 commit comments

Comments
 (0)