Skip to content

Commit b844198

Browse files
committed
Add workflow to check if doc builds
1 parent 396bca8 commit b844198

File tree

5 files changed

+64
-3
lines changed

5 files changed

+64
-3
lines changed

.github/workflows/tests.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
all-tests:
10+
name: Python tests
1011
runs-on: ubuntu-latest
1112
strategy:
1213
matrix:
@@ -28,7 +29,9 @@ jobs:
2829
2930
- name: "Tests"
3031
run: tox -e py${{ matrix.python-version }}${{ matrix.env}} -- -vv
32+
3133
pre-commit-ci-lite:
34+
name: pre-commit checks
3235
runs-on: ubuntu-latest
3336
steps:
3437
- uses: actions/checkout@v3
@@ -38,3 +41,15 @@ jobs:
3841
- uses: pre-commit/action@v3.0.1
3942
- uses: pre-commit-ci/lite-action@v1.1.0
4043
if: always()
44+
45+
build-docs:
46+
name: Build docs
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v3
50+
- uses: actions/setup-python@v4
51+
with:
52+
python-version: 3.13
53+
cache: 'pip'
54+
- run: pip install tox tox-gh-actions
55+
- run: tox -e docs -vv

docs/base/bases.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,43 @@ Base classes
22
============
33

44
.. autoclass:: yandex_cloud_ml_sdk._sdk.BaseSDK
5+
6+
.. autoclass:: yandex_cloud_ml_sdk._types.domain.BaseDomain
7+
8+
.. autoclass:: yandex_cloud_ml_sdk._types.model.BaseModel
9+
10+
.. autoclass:: yandex_cloud_ml_sdk._types.model_config.BaseModelConfig
11+
12+
.. autoclass:: yandex_cloud_ml_sdk._auth.BaseAuth
13+
14+
.. autoclass:: yandex_cloud_ml_sdk._tools.domain.BaseTools
15+
16+
.. autoclass:: yandex_cloud_ml_sdk._tools.tool.BaseTool
17+
18+
.. autoclass:: yandex_cloud_ml_sdk._models.BaseModels
19+
20+
.. autoclass:: yandex_cloud_ml_sdk._threads.domain.BaseThreads
21+
22+
.. autoclass:: yandex_cloud_ml_sdk._threads.thread.BaseThread
23+
24+
.. autoclass:: yandex_cloud_ml_sdk._files.domain.BaseFiles
25+
26+
.. autoclass:: yandex_cloud_ml_sdk._files.file.BaseFile
27+
28+
.. autoclass:: yandex_cloud_ml_sdk._assistants.domain.BaseAssistants
29+
30+
.. autoclass:: yandex_cloud_ml_sdk._assistants.assistant.BaseAssistant
31+
32+
.. autoclass:: yandex_cloud_ml_sdk._runs.domain.BaseRuns
33+
34+
.. autoclass:: yandex_cloud_ml_sdk._runs.run.BaseRun
35+
36+
.. autoclass:: yandex_cloud_ml_sdk._search_indexes.domain.BaseSearchIndexes
37+
38+
.. autoclass:: yandex_cloud_ml_sdk._search_indexes.search_index.BaseSearchIndex
39+
40+
.. autoclass:: yandex_cloud_ml_sdk._datasets.domain.BaseDatasets
41+
42+
.. autoclass:: yandex_cloud_ml_sdk._datasets.dataset.BaseDataset
43+
44+
.. autoclass:: yandex_cloud_ml_sdk._tuning.domain.BaseTuning

docs/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
'exclude-members': '__weakref__',
3030
}
3131
autodoc_inherit_docstrings = True
32+
autodoc_type_aliases = {
33+
'BaseSDK': 'yandex_cloud_ml_sdk._sdk.BaseSDK',
34+
'asyncio': 'asyncio'
35+
}
3236

3337
intersphinx_mapping = {
3438
'grpc': ('https://grpc.github.io/grpc/python/', None),
@@ -39,6 +43,7 @@
3943
always_use_bars_union = True
4044
typehints_defaults = 'comma'
4145

46+
nitpicky = True
4247

4348
# -- Options for HTML output -------------------------------------------------
4449

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinx
2+
sphinx-autodoc-typehints

tox.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ commands =
4545
[testenv:docs]
4646
basepython = python3.12
4747
deps =
48-
sphinx
49-
sphinx-autodoc-typehints
48+
-r docs/requirements.txt
5049
commands =
51-
sphinx-build docs docs/_build {posargs}
50+
sphinx-build docs docs/_build -W {posargs}

0 commit comments

Comments
 (0)