Skip to content

Commit

Permalink
Merge pull request #91 from harishmohanraj/review-fixes
Browse files Browse the repository at this point in the history
Review fixes
  • Loading branch information
harishmohanraj authored Jan 22, 2025
2 parents 63cd4f1 + 656e35e commit 5bf4c07
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 72 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/deploy-website-mintlify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Python dependencies
run: |
# Pin databind packages as version 4.5.0 is not compatible with pydoc-markdown.
uv pip install --system databind.core==4.4.2 databind.json==4.4.2

- name: Install quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Build documentation
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: ./scripts/docs_build.sh
working-directory: .

- name: Prepare website content
run: |
# Create a temporary directory for filtered content
mkdir -p temp_website
# Copy files except .ipynb, node_modules, .quarto, .gitignore, and temp_website
find . -type f -not -path "*/node_modules/*" -not -path "*/.quarto/*" -not -path "./temp_website/*" -not -name "*.ipynb" -not -name ".gitignore" -exec cp --parents {} temp_website/ \;
mintlify-release:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
Expand All @@ -85,17 +71,11 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Python dependencies
run: |
# Pin databind packages as version 4.5.0 is not compatible with pydoc-markdown.
uv pip install --system databind.core==4.4.2 databind.json==4.4.2

- name: Install quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Build documentation
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: ./scripts/docs_build.sh
working-directory: .

Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ test = [

# docs dependencies
docs = [
"pyautogen[retrievechat-mongodb, retrievechat-pgvector, retrievechat-qdrant, anthropic, cosmosdb, neo4j, jupyter-executor, anthropic, bedrock, cerebras, cohere, gemini, groq, mistral, ollama, together]",
"pdoc3==0.11.5",
"jinja2==3.1.5",
"pyyaml==6.0.2",
"termcolor==2.5.0",
"nbclient==0.10.2",
]

types = [
Expand All @@ -208,7 +212,7 @@ lint = [
]

dev = [
"pyautogen[lint,test,types]",
"pyautogen[lint,test,types,docs]",
"pre-commit==4.0.1",
"detect-secrets==1.5.0",
"uv==0.5.21",
Expand Down
56 changes: 6 additions & 50 deletions scripts/docs_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,19 @@
set -e
set -x

install_graphviz_mac() {
if command -v brew >/dev/null 2>&1; then
echo "Installing Graphviz using Homebrew..."
brew install graphviz
else
echo "Error: Homebrew is not installed. Please install Homebrew first."
echo "You can install Homebrew by running:"
echo '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'
exit 1
fi
}

install_graphviz_ubuntu() {
if command -v apt-get >/dev/null 2>&1; then
echo "Installing Graphviz on Ubuntu..."
sudo apt-get update && \
sudo apt-get install -y graphviz graphviz-dev
else
echo "Error: apt-get not found. Are you sure this is a Debian/Ubuntu system?"
exit 1
fi
}

install_graphviz() {
if [[ "$OSTYPE" == "darwin"* ]]; then
install_graphviz_mac
elif [[ -f /etc/os-release ]] && grep -q -i "ubuntu\|debian" /etc/os-release; then
install_graphviz_ubuntu
else
echo "Unsupported operating system"
exit 1
fi
}

install_packages() {
pip install -e ".[docs]"
pip install "falkordb" "graphrag_sdk" "neo4j-graphrag" "pypdf" \
"pdoc3>=0.11.5" \
"pyyaml>=6.0.2" \
"termcolor>=2.5.0" \
"nbclient>=0.10.2" \
"arxiv>=2.1.3" \
"flaml[automl]" \
"pygraphviz>=1.14" \
"replicate"
}

docs_generate() {
cd website && \
python ./process_api_reference.py && \
python ./process_notebooks.py render
}

install_packages() {
pip install -e ".[docs]"
}

docs_build() {
install_graphviz && \
install_packages && \
docs_generate
install_packages && \
docs_generate
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
Expand Down

0 comments on commit 5bf4c07

Please sign in to comment.