Skip to content

Commit

Permalink
refactor docs
Browse files Browse the repository at this point in the history
Signed-off-by: cutecutecat <junyuchen@tensorchord.ai>
  • Loading branch information
cutecutecat committed Oct 7, 2023
1 parent 52179ae commit 2a888cb
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/python-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ jobs:
python-version: "3.10"
- name: Install dependencies
run: |
pdm sync -d -G lint
pdm sync -d -G lint -G generate -G doc
- name: Lint
run: |
pdm run lint --exclude openapi
- name: Verify openapi generate
- name: Verify OpenAPI generate
run: |
make generate && git add * &&
pdm run generate && git add openapi &&
git diff --cached --exit-code || (echo 'Please run "make generate" to verify generate' && exit 1)
- name: Verify docs generate
run: |
pdm run docs
test:
runs-on: ${{ matrix.os }}
Expand Down
3 changes: 0 additions & 3 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ Python SDK interface
:members:

.. autoclass:: modelz.openapi_client.DeploymentClient
:members:

.. automodule:: openapi.sdk.models
:members:
5 changes: 3 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ Welcome to modelz's documentation!
=====================================

.. toctree::
:maxdepth: 2
:maxdepth: 3
:caption: Reference:
:hidden:

api
cli
api
openapi


``modelz`` is a Python package for calling model prediction and management APIs that are on the modelz_ platform. We provide both Python SDK and CLI interface.
Expand Down
5 changes: 5 additions & 0 deletions docs/source/openapi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
OpenAPI DataClass
====================================

.. automodule:: openapi.sdk.models
:members:
10 changes: 5 additions & 5 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ black = "black --check modelz"
ruff = "ruff check ."
lint = {composite = ["black", "ruff"]}
doc = "make docs"
generate = "make generate"
[tool.pdm.dev-dependencies]
lint = [
"ruff>=0.0.252",
Expand Down

0 comments on commit 2a888cb

Please sign in to comment.