Move API docs generation to docs/api

This commit is contained in:
Mark Backman
2024-12-09 20:39:29 -05:00
parent 61d0fa42f1
commit 2d3864ee09
30 changed files with 18 additions and 17 deletions

View File

@@ -23,12 +23,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
pip install -r docs/api/requirements.txt
pip install .
- name: Generate API documentation
run: |
cd docs
cd docs/api
python generate_docs.py
- name: Create Pull Request
@@ -39,7 +39,7 @@ jobs:
body: |
Automated PR to update API documentation.
- Generated using `generate_docs.py`
- Generated using `docs/api/generate_docs.py`
- Triggered by: ${{ github.event_name }}
branch: update-api-docs
delete-branch: true

4
.gitignore vendored
View File

@@ -34,5 +34,5 @@ fly.toml
pipecat/examples/twilio-chatbot/templates/streams.xml
# Documentation
docs/_build/
docs/api/
docs/api/_build/
docs/api/api

View File

@@ -6,10 +6,10 @@ build:
python: '3.12'
sphinx:
configuration: docs/conf.py
configuration: docs/api/conf.py
python:
install:
- requirements: docs/requirements.txt
- requirements: docs/api/requirements.txt
- method: pip
path: .

View File

@@ -17,14 +17,14 @@ def run_command(command: list[str]) -> None:
def main():
docs_dir = Path(__file__).parent
project_root = docs_dir.parent
project_root = docs_dir.parent.parent
# Install documentation requirements
requirements_file = docs_dir / "requirements.txt"
run_command(["pip", "install", "-r", str(requirements_file)])
# Install core package
run_command(["pip", "install", "-e", "."])
# Install from project root, not docs directory
run_command(["pip", "install", "-e", str(project_root)])
# Install all service dependencies
services = [
@@ -60,7 +60,7 @@ def main():
extras = ",".join(services)
try:
run_command(["pip", "install", "-e", f".[{extras}]"])
run_command(["pip", "install", "-e", f"{str(project_root)}[{extras}]"])
except Exception as e:
print(f"Warning: Some dependencies failed to install: {e}")
@@ -83,12 +83,13 @@ def main():
str(api_dir), # Output directory
str(project_root / "src/pipecat"),
# Exclude problematic files and directories
"**/processors/gstreamer/*", # Optional gstreamer
"**/transports/network/*", # Pydantic issues
"**/transports/services/*", # Pydantic issues
"**/transports/local/*", # Optional dependencies
"**/services/to_be_updated/*", # Exclude to_be_updated package
"**/*test*", # Test files
str(project_root / "src/pipecat/processors/gstreamer"), # Optional gstreamer
str(project_root / "src/pipecat/transports/network"), # Pydantic issues
str(project_root / "src/pipecat/transports/services"), # Pydantic issues
str(project_root / "src/pipecat/transports/local"), # Optional dependencies
str(project_root / "src/pipecat/services/to_be_updated"), # Exclude to_be_updated
"**/test_*.py", # Test files
"**/tests/*.py", # Test files
]
)

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

View File

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

View File

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

View File

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 111 KiB

View File

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 117 KiB

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB