diff --git a/.gitignore b/.gitignore index 9ba4f7a..97b4ca2 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ test_structures/ worker-data*/ scimesh-worker-data/ coordinator/.demo/ +site/ diff --git a/Makefile b/Makefile index 8a6fc43..dfde28d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .DEFAULT_GOAL := help -.PHONY: help demo-ui demo-down demo-logs +.PHONY: help demo-ui demo-down demo-logs docs docs-serve help: @printf '%s\n' \ @@ -9,6 +9,8 @@ help: ' make demo-ui WORKERS=3 Start the demo with 3 local workers.' \ ' make demo-logs Follow coordinator logs for the demo.' \ ' make demo-down Stop demo containers and workers.' \ + ' make docs Build the MkDocs site into site/.' \ + ' make docs-serve Serve the MkDocs site at http://localhost:8000.' \ '' \ 'After make demo-ui: open http://localhost:18080/ui (operator / demo-ui-secret).' @@ -22,3 +24,9 @@ demo-down: demo-logs: $(MAKE) -C coordinator demo-logs + +docs: + .venv/bin/mkdocs build + +docs-serve: + .venv/bin/mkdocs serve diff --git a/docs/api/sdk-batch.md b/docs/api/sdk-batch.md new file mode 100644 index 0000000..1ade2d7 --- /dev/null +++ b/docs/api/sdk-batch.md @@ -0,0 +1,8 @@ +# SDK batch scaffold + +Тестовая страница автогенерации API из docstrings. + +::: scimesh.sdk.batch.MapReduceWorkload + options: + show_root_heading: true + show_source: false diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..dcb1db6 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,10 @@ +# SciMesh + +Тестовая страница MkDocs. Сборка и навигация работают; содержимое будет +наполнено позже. + +- Пример ссылки на API: [SDK batch scaffold](api/sdk-batch.md). +- Код: + ```python + from scimesh.sdk import MapReduceWorkload + ``` diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..8d0490b --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,43 @@ +site_name: SciMesh +site_description: Local-first distributed scientific computation for molecular workloads +repo_url: https://github.com/emil28092005/SciMesh +edit_uri: blob/main/docs/ + +theme: + name: material + palette: + scheme: slate + primary: indigo + accent: cyan + features: + - navigation.instant + - navigation.tracking + - navigation.top + - search.suggest + - content.code.copy + icon: + repo: fontawesome/brands/github + +plugins: + - search + - mkdocstrings: + default_options: + show_root_heading: true + show_symbol_type_heading: true + show_source: false + +markdown_extensions: + - admonition + - toc: + permalink: true + - pymdownx.superfences + - pymdownx.highlight: + anchor_linenums: true + +nav: + - Home: index.md + - API reference: + - SDK batch scaffold: api/sdk-batch.md + +extra: + generator: false diff --git a/pyproject.toml b/pyproject.toml index 6c7a98f..928d9f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,12 @@ requires-python = ">=3.10" dependencies = ["rdkit>=2024.3"] [project.optional-dependencies] -dev = ["pytest>=8"] +dev = [ + "pytest>=8", + "mkdocs>=1.6", + "mkdocs-material>=9.5", + "mkdocstrings[python]>=1.0", +] [project.scripts] scimesh = "scimesh.cli:main"