Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(weave): Add docs to CI and build process #2682

Merged
merged 7 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
is_test:
description: 'Use Test Pypi'
description: "Use Test Pypi"
required: true
type: boolean
default: true
Expand All @@ -28,6 +28,9 @@ jobs:
- name: Build dist
run: |
uv build
- name: Make docs
run: |
make docs
- name: upload test distribution
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ inputs.is_test }}
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,22 @@ jobs:
- name: Run nox
run: nox -e lint

trace-docs:
name: Trace docs
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Setup docs
run: make setup-docs-ci
- name: Run docs
run: make docs

trace-tests:
name: Trace nox tests
timeout-minutes: 10
Expand Down
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.PHONY: docs build

setup-docs-ci:
pip install -e .[docs]
playwright install

cd docs && \
npm install --global yarn && \
npm install

docs:
cd docs && make generate_all
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one note: generate_all hits the live server AND the frontend app. This means every single commit will trigger a few pings. Probably fine, but a bit fragile

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the alternative?


build:
uv build

prepare-release: docs build
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies = [
]

[project.optional-dependencies]
trace_server = []
docs = ["playwright", "lazydocs", "nbformat", "nbconvert"]
anthropic = ["anthropic>=0.18.0"]
cerebras = ["cerebras-cloud-sdk"]
cohere = ["cohere>=5.9.1,<5.9.3"]
Expand Down
Loading