Skip to content

Commit 9ae441a

Browse files
authored
Merge pull request #87 from VectorInstitute/migrate_to_mkdocs
Migrate documentation build to mkdocs
2 parents 5acdadd + a1466d9 commit 9ae441a

31 files changed

+750
-1444
lines changed

.github/workflows/docs.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: docs
2+
permissions:
3+
contents: write
4+
pull-requests: write
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
- develop
11+
paths:
12+
- .pre-commit-config.yaml
13+
- .github/workflows/docs.yml
14+
- '**.py'
15+
- '**.ipynb'
16+
- '**.html'
17+
- '**.js'
18+
- '**.md'
19+
- uv.lock
20+
- pyproject.toml
21+
- mkdocs.yml
22+
- '**.png'
23+
- '**.svg'
24+
pull_request:
25+
branches:
26+
- main
27+
- develop
28+
paths:
29+
- .pre-commit-config.yaml
30+
- .github/workflows/docs.yml
31+
- '**.py'
32+
- '**.ipynb'
33+
- '**.js'
34+
- '**.html'
35+
- uv.lock
36+
- pyproject.toml
37+
- '**.md'
38+
- mkdocs.yml
39+
- '**.png'
40+
- '**.svg'
41+
42+
jobs:
43+
build:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Checkout code
47+
uses: actions/checkout@v4.2.2
48+
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@v5
51+
with:
52+
version: "0.5.21"
53+
enable-cache: true
54+
55+
- name: Set up Python
56+
uses: actions/setup-python@v5
57+
with:
58+
python-version-file: ".python-version"
59+
60+
- name: Install the project
61+
run: uv sync --all-extras --group docs
62+
63+
- name: Build docs
64+
run: uv run mkdocs build
65+
66+
- name: Create .nojekyll file
67+
run: touch site/.nojekyll
68+
69+
- name: Upload artifact
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: docs-site
73+
path: site/
74+
retention-days: 1
75+
76+
deploy:
77+
needs: build
78+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: Checkout code
82+
uses: actions/checkout@v4.2.2
83+
84+
- name: Configure Git Credentials
85+
run: |
86+
git config user.name github-actions[bot]
87+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
88+
89+
- name: Download artifact
90+
uses: actions/download-artifact@v4
91+
with:
92+
name: docs-site
93+
path: site
94+
95+
- name: Ensure .nojekyll exists
96+
run: touch site/.nojekyll
97+
98+
- name: Deploy to Github pages
99+
uses: JamesIves/github-pages-deploy-action@v4.7.3
100+
with:
101+
branch: gh-pages
102+
folder: site

.github/workflows/docs_build.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/docs_deploy.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ repos:
1313
args: [--fix=lf]
1414
- id: requirements-txt-fixer
1515
- id: check-yaml
16+
args: [--unsafe]
1617
- id: check-toml
1718

1819
- repo: https://github.com/astral-sh/ruff-pre-commit

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![codecov](https://codecov.io/github/VectorInstitute/vector-inference/branch/develop/graph/badge.svg?token=NI88QSIGAC)](https://app.codecov.io/github/VectorInstitute/vector-inference/tree/develop)
99
![GitHub License](https://img.shields.io/github/license/VectorInstitute/vector-inference)
1010

11-
This repository provides an easy-to-use solution to run inference servers on [Slurm](https://slurm.schedmd.com/overview.html)-managed computing clusters using [vLLM](https://docs.vllm.ai/en/latest/). **All scripts in this repository runs natively on the Vector Institute cluster environment**. To adapt to other environments, update the environment variables in [`shared/utils.py`](vec_inf/shared/utils.py), [`shared/config.py`](vec_inf/shared/config.py), [`vllm.slurm`](vec_inf/vllm.slurm), [`multinode_vllm.slurm`](vec_inf/multinode_vllm.slurm) and [`models.yaml`](vec_inf/config/models.yaml) accordingly.
11+
This repository provides an easy-to-use solution to run inference servers on [Slurm](https://slurm.schedmd.com/overview.html)-managed computing clusters using [vLLM](https://docs.vllm.ai/en/latest/). **All scripts in this repository runs natively on the Vector Institute cluster environment**. To adapt to other environments, update the environment variables in [`vec_inf/client/_vars.py`](vec_inf/client/_vars.py), [`vec_inf/client/_config.py`](vec_inf/client/_config.py), [`vllm.slurm`](vec_inf/vllm.slurm), [`multinode_vllm.slurm`](vec_inf/multinode_vllm.slurm) and [`models.yaml`](vec_inf/config/models.yaml) accordingly.
1212

1313
## Installation
1414
If you are using the Vector cluster environment, and you don't need any customization to the inference server environment, run the following to install package:

docs/api.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Python API Reference
2+
3+
This section documents the Python API for vector-inference.
4+
5+
## Client Interface
6+
7+
::: vec_inf.client.api.VecInfClient
8+
options:
9+
show_root_heading: true
10+
show_root_full_path: true
11+
members: true
12+
13+
## Data Models
14+
15+
::: vec_inf.client._models
16+
options:
17+
show_root_heading: true
18+
members: true

docs/assets/favicon-48x48.svg

Lines changed: 9 additions & 0 deletions
Loading

docs/assets/favicon.ico

14.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)