-
Notifications
You must be signed in to change notification settings - Fork 551
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
Update doc generation workflow #862
Changes from 39 commits
66d69bf
817135d
8182969
5bab673
5140560
1c6a125
142ed1d
8cf88fa
459cbf5
c09985b
7e7a80a
68a2898
1f2dd9e
49c8495
06ed469
b64c138
fa49d7b
eb58003
310f285
a34df7c
4c93d6b
35dd34c
fe8f107
40e099f
be7498a
7f7717a
5b1bb5a
2ff345c
90648db
01a8e7c
e2e78e7
0e5d286
2d023be
04f8f0e
c745e89
6e216c7
4700169
76659ce
302f9a4
e55edec
0a96b2a
501d114
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
"livekit-agents": patch | ||
"livekit-plugins-anthropic": patch | ||
"livekit-plugins-azure": patch | ||
"livekit-plugins-browser": patch | ||
"livekit-plugins-cartesia": patch | ||
"livekit-plugins-deepgram": patch | ||
"livekit-plugins-elevenlabs": patch | ||
"livekit-plugins-google": patch | ||
"livekit-plugins-nltk": patch | ||
"livekit-plugins-openai": patch | ||
"livekit-plugins-playht": patch | ||
"livekit-plugins-rag": patch | ||
"livekit-plugins-silero": patch | ||
--- | ||
|
||
Update doc generation workflow |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Publish docs | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
secrets: | ||
DOCS_DEPLOY_AWS_ACCESS_KEY: {} | ||
DOCS_DEPLOY_AWS_API_SECRET: {} | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
lfs: true | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' # Specify the Python version you want to use | ||
|
||
- name: Create and activate virtual environment | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
|
||
- name: Install pdoc and other dependencies | ||
run: | | ||
source venv/bin/activate | ||
python -m pip install pdoc3 setuptools | ||
|
||
- name: Install package | ||
run: | | ||
source venv/bin/activate | ||
python -m pip install ./livekit-agents \ | ||
./livekit-plugins/livekit-plugins-anthropic \ | ||
./livekit-plugins/livekit-plugins-azure \ | ||
./livekit-plugins/livekit-plugins-cartesia \ | ||
./livekit-plugins/livekit-plugins-deepgram \ | ||
./livekit-plugins/livekit-plugins-elevenlabs \ | ||
./livekit-plugins/livekit-plugins-google \ | ||
./livekit-plugins/livekit-plugins-nltk \ | ||
./livekit-plugins/livekit-plugins-openai | ||
|
||
- name: Build Docs | ||
run: | | ||
source venv/bin/activate | ||
python -m pdoc --skip-errors --html livekit --output-dir docs | ||
|
||
- name: S3 Upload | ||
run: | | ||
source venv/bin/activate | ||
aws s3 cp docs/ s3://livekit-docs/python --recursive | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }} | ||
AWS_DEFAULT_REGION: "us-east-1" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,12 @@ def __init__(self): | |
|
||
|
||
Plugin.register_plugin(BrowserPlugin()) | ||
|
||
# Cleanup docs of unexported modules | ||
module = dir() | ||
NOT_IN_ALL = [m for m in module if m not in __all__] | ||
|
||
__pdoc__ = {} | ||
|
||
for n in NOT_IN_ALL: | ||
__pdoc__[n] = False | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious if this is really needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like pdoc if a directory has an init.py, pdoc is considering it a submodule. Even if it's not in all. Technically these modules are importable in a normal, non-package setup, so I guess it makes sense as a default behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to be noisy otherwise