Skip to content

Commit 70a7cb1

Browse files
committed
Fix documentation generation
1 parent 17218a5 commit 70a7cb1

4 files changed

Lines changed: 27 additions & 5 deletions

File tree

.github/insert_docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ def parameter_to_document(param):
5454
}
5555
]}
5656

57-
print(json.dumps(application))
57+
print(json.dumps(application, indent=2))

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "terminusdb-client"
3-
version = "11.1.0"
3+
version = "12.0.3"
44
description = "Python client for Terminus DB"
55
authors = ["TerminusDB group"]
66
license = "Apache Software License"
@@ -26,6 +26,7 @@ flake8 = "*"
2626
sphinx-rtd-theme = "^3.0.2"
2727
sphinx-autodoc-typehints = "^2.0"
2828
sphinx-click = "^5.0"
29+
numpydoc = "^1.5"
2930

3031
[tool.poetry.scripts]
3132
tdbpy = "terminusdb_client.scripts.scripts:tdbpy"

terminusdb_client/scripts/dev.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,24 @@ def docs():
213213
os.chdir("..")
214214

215215

216+
def docs_json():
217+
"""Generate docs.json for documentation site."""
218+
print("Generating docs.json...")
219+
script_path = Path(".github/insert_docs.py")
220+
if not script_path.exists():
221+
print(f"Error: {script_path} not found")
222+
sys.exit(1)
223+
result = subprocess.run(
224+
[sys.executable, str(script_path)],
225+
capture_output=True,
226+
text=True,
227+
check=True,
228+
)
229+
with open("docs.json", "w") as f:
230+
f.write(result.stdout)
231+
print("Generated docs.json successfully")
232+
233+
216234
def tox():
217235
"""Run tox for isolated testing."""
218236
print("Running tox...")
@@ -313,6 +331,7 @@ def main():
313331
print(" test-integration - Run integration tests")
314332
print(" test-all - Run all tests (unit + integration)")
315333
print(" docs - Build documentation")
334+
print(" docs-json - Generate docs.json for documentation site")
316335
print(" tox - Run tox for isolated testing")
317336
print(" clean - Clean build artifacts")
318337
print(" pr - Run all PR preparation checks")
@@ -337,6 +356,7 @@ def main():
337356
print(" test-integration - Run integration tests")
338357
print(" test-all - Run all tests (unit + integration)")
339358
print(" docs - Build documentation")
359+
print(" docs-json - Generate docs.json for documentation site")
340360
print(" tox - Run tox for isolated testing")
341361
print(" clean - Clean build artifacts")
342362
print(" pr - Run all PR preparation checks")
@@ -358,6 +378,7 @@ def main():
358378
"test-integration": test_integration,
359379
"test-all": test_all,
360380
"docs": docs,
381+
"docs-json": docs_json,
361382
"tox": tox,
362383
"clean": clean,
363384
"pr": pr,

0 commit comments

Comments
 (0)