Skip to content

Commit

Permalink
Move API docs generation to docs/api
Browse files Browse the repository at this point in the history
  • Loading branch information
markbackman committed Dec 10, 2024
1 parent 61d0fa4 commit 2d3864e
Show file tree
Hide file tree
Showing 30 changed files with 18 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/generate_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ fly.toml
pipecat/examples/twilio-chatbot/templates/streams.xml

# Documentation
docs/_build/
docs/api/
docs/api/_build/
docs/api/api
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: .
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 11 additions & 10 deletions docs/generate_docs.py → docs/api/generate_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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}")

Expand All @@ -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
]
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 2d3864e

Please sign in to comment.