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

Setup docs generation #54

Merged
merged 1 commit into from
Dec 2, 2023
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
1 change: 1 addition & 0 deletions .github/workflows/publish-livekit-agents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ jobs:
uses: ./.github/workflows/publish-package.yml
with:
package_name: 'livekit-agents'
docs_entrypoint: 'livekit-plugins/livekit-agents/livekit/agents'
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/publish-livekit-plugins-anthropic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ jobs:
uses: ./.github/workflows/publish-package.yml
with:
package_name: 'livekit-plugins/livekit-plugins-anthropic'
docs_entrypoint: 'livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic'
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/publish-livekit-plugins-elevenlabs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ jobs:
uses: ./.github/workflows/publish-package.yml
with:
package_name: 'livekit-plugins/livekit-plugins-elevenlabs'
docs_entrypoint: 'livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs'
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/publish-livekit-plugins-google.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ jobs:
uses: ./.github/workflows/publish-package.yml
with:
package_name: 'livekit-plugins/livekit-plugins-google'
docs_entrypoint: 'livekit-plugins/livekit-plugins-google/livekit/plugins/google'
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/publish-livekit-plugins-openai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ jobs:
uses: ./.github/workflows/publish-package.yml
with:
package_name: 'livekit-plugins/livekit-plugins-openai'
docs_entrypoint: 'livekit-plugins/livekit-plugins-openai/livekit/plugins/openai'
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/publish-livekit-plugins-vad.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ jobs:
uses: ./.github/workflows/publish-package.yml
with:
package_name: 'livekit-plugins/livekit-plugins-vad'
docs_entrypoint: 'livekit-plugins/livekit-plugins-vad/livekit/plugins/vad'
secrets: inherit
24 changes: 24 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,16 @@ on:
package_name:
required: true
type: string
docs_entrypoint:
required: true
type: string
secrets:
PYPI_API_TOKEN:
required: true
DOCS_DEPLOY_AWS_ACCESS_KEY:
required: true
DOCS_DEPLOY_AWS_API_SECRET:
required: true

permissions:
contents: read
Expand Down Expand Up @@ -72,3 +79,20 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

docs:
needs:
- publish

- name: Install dependencies
run: python -m pip install --upgrade pdoc

- name: Build Docs
if: steps.changesets.outputs.published == 'true'
run: python -m pdoc ${{ inputs.docs_entrypoint }} --docformat=google --html --output-dir docs
- name: S3 Upload
run: aws s3 cp docs/ s3://livekit-docs/${{ inputs.package_name }} --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"
3 changes: 1 addition & 2 deletions livekit-agents/livekit/agents/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ def __init__(
api_key: str = os.environ.get("LIVEKIT_API_KEY", ""),
api_secret: str = os.environ.get("LIVEKIT_API_SECRET", ""),
) -> None:
"""_summary_

"""
Args:
job_request_cb (Callable[[JobRequest], Coroutine]): Callback that is triggered when a new Job is available.
worker_type (JobType.ValueType): What kind of jobs this worker can handle.
Expand Down