diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 216ef72..121f226 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -21,7 +21,8 @@ jobs: - name: Install dependencies run: | - pip install sphinx==6.2.1 + cd docs + pip install -r requirements.txt - name: Build documentation run: | diff --git a/README.md b/README.md index 1099cdc..2cd640a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Run pre-commit checks](https://github.com/bd-iaas-us/infiniStore/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/bd-iaas-us/infiniStore/actions/workflows/pre-commit.yml) [![Slack](https://img.shields.io/badge/Slack-Join%20Us-blue?logo=slack)](https://vllm-dev.slack.com/archives/C07VCUQLE1F) -[![Docs](https://img.shields.io/badge/docs-available-brightgreen)](https://bd-iaas-us.github.io/infiniStore/) +[![Docs](https://img.shields.io/badge/docs-available-brightgreen)](https://bd-iaas-us.github.io/InfiniStore/) ## pre-required diff --git a/docs/requirements.txt b/docs/requirements.txt index 93217ef..9e2c1be 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1,2 @@ -sphinx==6.2.1 \ No newline at end of file +sphinx==6.2.1 +sphinx_rtd_theme==3.0.2 diff --git a/docs/source/conf.py b/docs/source/conf.py index 6fcf009..a8a1ac8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -25,20 +25,31 @@ "sphinx.ext.napoleon", ] + mock_torch = MagicMock(name="torch") -mock_tensor = MagicMock(name="torch.Tensor") -mock__infinistore = MagicMock(name="infinistore._infinistore") +mock_tensor_class = type("Tensor", (object,), {"__module__": "torch"}) +mock_torch.Tensor = mock_tensor_class sys.modules["torch"] = mock_torch -sys.modules["torch.Tensor"] = mock_tensor + +mock__infinistore = MagicMock(name="infinistore._infinistore") sys.modules["infinistore._infinistore"] = mock__infinistore +def skip_member(app, what, name, obj, skip, options): + if name in ["get_kvmap_len", "purge_kv_map", "register_server"]: + return True + return skip + + +def setup(app): + app.connect("autodoc-skip-member", skip_member) + + templates_path = ["_templates"] exclude_patterns = [] # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = "alabaster" -html_static_path = ["_static"] +html_theme = "sphinx_rtd_theme"