Skip to content

Commit

Permalink
feat: improve update_docs for openapi schema (huggingface#2169)
Browse files Browse the repository at this point in the history
* feat: add pre commit step to force schema update when router changes

* fix: prefer improved update_doc and start server and compare

* fix: adjust typo

* fix: adjust revert typo

* fix: update workflow to use update_doc md command

* feat: improve workflow to check openapi schema too

* fix: adjust timeout for CI

* fix: adjust raise condition and install server in ci

* fix: install protoc before server

* feat: improve update doc and add command to print router schema

* fix: adjust autodoc workflow

* fix: explicitly install protoc and python

* fix: alllow trailing space in openapi schema diff
  • Loading branch information
drbh authored Jul 3, 2024
1 parent 0759ec4 commit 571530d
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 94 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/autodocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,30 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Install Protocol Buffers compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libprotobuf-dev
- name: Install Launcher
id: install-launcher
run: cargo install --path launcher/
- name: Check launcher Docs are up-to-date

- name: Install router
id: install-router
run: cargo install --path router/

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Check that documentation is up-to-date
run: |
echo text-generation-launcher --help
python update_doc.py --check
Loading

0 comments on commit 571530d

Please sign in to comment.