From 766ccbd455fe89854c7a20dc694aa3a02f882530 Mon Sep 17 00:00:00 2001 From: Kumaran Rajendhiran Date: Wed, 8 Jan 2025 16:23:06 +0530 Subject: [PATCH] Use UV instead of pip to install dependencies in CI --- .github/workflows/build.yml | 14 +- .github/workflows/contrib-graph-rag-tests.yml | 20 +- .github/workflows/contrib-openai.yml | 22 ++- .github/workflows/contrib-tests.yml | 178 +++++++++++------- .github/workflows/deploy-website-mintlify.yml | 16 +- .github/workflows/dotnet-build.yml | 16 +- .github/workflows/dotnet-release.yml | 8 +- .github/workflows/openai.yml | 12 +- .github/workflows/python-package.yml | 7 +- .github/workflows/type-check.yml | 5 +- 10 files changed, 184 insertions(+), 114 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 943be7af12..dea5880935 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,21 +62,23 @@ jobs: python-version: "3.9" steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies run: | - python -m pip install --upgrade pip wheel - pip install -e .[test,cosmosdb,interop] + uv pip install --system -e .[test,cosmosdb,interop] python -c "import autogen" - pip install pytest-cov>=5 mock + uv pip install --system pytest-cov>=5 mock - name: Install optional dependencies for code executors # code executors and udfs auto skip without deps, so only run for python 3.11 if: matrix.python-version == '3.11' run: | - pip install -e ".[jupyter-executor]" + uv pip install --system -e ".[jupyter-executor]" python -m ipykernel install --user --name python3 - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash @@ -88,7 +90,7 @@ jobs: if: matrix.python-version != '3.10' && matrix.os == 'ubuntu-latest' # Remove the line below once https://github.com/docker/docker-py/issues/3256 is merged run: | - pip install "requests<2.32.0" + uv pip install --system "requests<2.32.0" pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0 - name: Test with pytest skipping openai and docker tests if: matrix.python-version != '3.10' && matrix.os != 'ubuntu-latest' @@ -97,7 +99,7 @@ jobs: - name: Coverage with Redis if: matrix.python-version == '3.10' run: | - pip install -e .[redis,websockets] + uv pip install --system -e .[redis,websockets] pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0 - name: Test with Cosmos DB run: | diff --git a/.github/workflows/contrib-graph-rag-tests.yml b/.github/workflows/contrib-graph-rag-tests.yml index 04bb67c568..74c3d82bca 100644 --- a/.github/workflows/contrib-graph-rag-tests.yml +++ b/.github/workflows/contrib-graph-rag-tests.yml @@ -35,17 +35,19 @@ jobs: - 6379:6379 steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest + uv pip install --system pytest - name: Install FalkorDB SDK when on linux run: | - pip install -e .[graph-rag-falkor-db] + uv pip install --system -e .[graph-rag-falkor-db] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -57,7 +59,7 @@ jobs: AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }} OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }} run: | - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 pytest test/agentchat/contrib/graph_rag/test_falkor_graph_rag.py --skip-openai - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 @@ -81,17 +83,19 @@ jobs: NEO4J_AUTH: neo4j/password steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest + uv pip install --system pytest - name: Install Neo4j and Llama-index when on linux run: | - pip install -e .[neo4j_graph_rag] + uv pip install --system -e .[neo4j_graph_rag] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -103,7 +107,7 @@ jobs: AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }} OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }} run: | - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 pytest test/agentchat/contrib/graph_rag/test_neo4j_graph_rag.py --skip-openai - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 diff --git a/.github/workflows/contrib-openai.yml b/.github/workflows/contrib-openai.yml index a839af92ac..1fb597bb44 100644 --- a/.github/workflows/contrib-openai.yml +++ b/.github/workflows/contrib-openai.yml @@ -166,6 +166,9 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -173,8 +176,7 @@ jobs: - name: Install packages and dependencies run: | docker --version - python -m pip install --upgrade pip wheel - pip install -e .[teachable,test] + uv pip install --system -e .[teachable,test] python -c "import autogen" - name: Coverage env: @@ -202,6 +204,9 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -209,13 +214,12 @@ jobs: - name: Install packages and dependencies run: | docker --version - python -m pip install --upgrade pip wheel - pip install -e ".[test]" + uv pip install --system -e ".[test]" python -c "import autogen" - pip install pytest-cov>=5 pytest-asyncio + uv pip install --system pytest-cov>=5 pytest-asyncio - name: Install packages for test when needed run: | - pip install -e .[autobuild] + uv pip install --system -e .[autobuild] - name: Coverage env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} @@ -281,6 +285,9 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -288,8 +295,7 @@ jobs: - name: Install packages and dependencies run: | docker --version - python -m pip install --upgrade pip wheel - pip install -e .[lmm,test] + uv pip install --system -e .[lmm,test] python -c "import autogen" - name: Coverage env: diff --git a/.github/workflows/contrib-tests.yml b/.github/workflows/contrib-tests.yml index 90efb36b92..6d76c03661 100644 --- a/.github/workflows/contrib-tests.yml +++ b/.github/workflows/contrib-tests.yml @@ -36,21 +36,23 @@ jobs: python-version: "3.9" steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install qdrant_client when python-version is 3.10 if: matrix.python-version == '3.10' run: | - pip install -e .[retrievechat-qdrant] + uv pip install --system -e .[retrievechat-qdrant] - name: Install packages and dependencies for RetrieveChat run: | - pip install -e .[retrievechat] + uv pip install --system -e .[retrievechat] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -93,40 +95,42 @@ jobs: - 27017:27017 steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest + uv pip install --system pytest - name: Install qdrant_client when python-version is 3.10 if: matrix.python-version == '3.10' run: | - pip install -e .[retrievechat-qdrant] + uv pip install --system -e .[retrievechat-qdrant] - name: Install pgvector when on linux run: | - pip install -e .[retrievechat-pgvector] + uv pip install --system -e .[retrievechat-pgvector] - name: Install mongodb when on linux run: | - pip install -e .[retrievechat-mongodb] + uv pip install --system -e .[retrievechat-mongodb] - name: Install unstructured when python-version is 3.9 and on linux if: matrix.python-version == '3.9' run: | sudo apt-get update sudo apt-get install -y tesseract-ocr poppler-utils - pip install --no-cache-dir unstructured[all-docs]==0.13.0 + uv pip install --system --no-cache-dir unstructured[all-docs]==0.13.0 - name: Install packages and dependencies for RetrieveChat run: | - pip install -e .[retrievechat] + uv pip install --system -e .[retrievechat] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV - name: Coverage run: | - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 pytest test/test_retrieve_utils.py test/agentchat/contrib/retrievechat test/agentchat/contrib/vectordb --skip-openai - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 @@ -143,17 +147,19 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for AgentEval run: | - pip install -e . + uv pip install --system -e . - name: Coverage run: | pytest test/agentchat/contrib/agent_eval/ --skip-openai @@ -172,17 +178,19 @@ jobs: python-version: ["3.10"] steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for GPTAssistantAgent run: | - pip install -e . + uv pip install --system -e . - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -207,17 +215,19 @@ jobs: python-version: ["3.11"] steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Teachability run: | - pip install -e .[teachable] + uv pip install --system -e .[teachable] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -242,17 +252,19 @@ jobs: python-version: ["3.13"] steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for WebSurfer run: | - pip install -e .[websurfer] + uv pip install --system -e .[websurfer] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -279,17 +291,19 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for LMM run: | - pip install -e .[lmm] + uv pip install --system -e .[lmm] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -323,17 +337,19 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Gemini run: | - pip install -e .[gemini,test] + uv pip install --system -e .[gemini,test] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -358,17 +374,19 @@ jobs: python-version: ["3.11"] steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Transform Messages run: | - pip install -e '.[long-context]' + uv pip install --system -e '.[long-context]' - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -393,19 +411,21 @@ jobs: python-version: ["3.11"] steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for LlamaIndexConverableAgent run: | - pip install -e . - pip install llama-index - pip install llama-index-llms-openai + uv pip install --system -e . + uv pip install --system llama-index + uv pip install --system llama-index-llms-openai - name: Coverage run: | pytest test/agentchat/contrib/test_llamaindex_conversable_agent.py --skip-openai @@ -427,19 +447,21 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Anthropic run: | - pip install -e .[test] - pip install -e .[anthropic] + uv pip install --system -e .[test] + uv pip install --system -e .[anthropic] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash @@ -471,17 +493,19 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Cerebras run: | - pip install -e .[cerebras_cloud_sdk,test] + uv pip install --system -e .[cerebras_cloud_sdk,test] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -511,17 +535,19 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Mistral run: | - pip install -e .[mistral,test] + uv pip install --system -e .[mistral,test] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -551,17 +577,19 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Together run: | - pip install -e .[together,test] + uv pip install --system -e .[together,test] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -591,17 +619,19 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Groq run: | - pip install -e .[groq,test] + uv pip install --system -e .[groq,test] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -627,17 +657,19 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Cohere run: | - pip install -e .[cohere,test] + uv pip install --system -e .[cohere,test] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -667,17 +699,19 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Ollama run: | - pip install -e .[ollama,test] + uv pip install --system -e .[ollama,test] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -707,17 +741,19 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Amazon Bedrock run: | - pip install -e .[boto3,test] + uv pip install --system -e .[boto3,test] - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -747,17 +783,19 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Swarms run: | - pip install -e . + uv pip install --system -e . - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -787,17 +825,19 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install packages and dependencies for all tests run: | - python -m pip install --upgrade pip wheel - pip install pytest-cov>=5 + uv pip install --system pytest-cov>=5 - name: Install packages and dependencies for Reasoning run: | - pip install -e . + uv pip install --system -e . - name: Install Graphviz based on OS run: | if [[ ${{ matrix.os }} == 'ubuntu-latest' ]]; then diff --git a/.github/workflows/deploy-website-mintlify.yml b/.github/workflows/deploy-website-mintlify.yml index b630fe5474..731a3a509a 100644 --- a/.github/workflows/deploy-website-mintlify.yml +++ b/.github/workflows/deploy-website-mintlify.yml @@ -32,6 +32,9 @@ jobs: with: lfs: true fetch-depth: 0 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - uses: actions/setup-node@v4 with: node-version: 18.x @@ -41,10 +44,9 @@ jobs: python-version: "3.8" - name: Install Python dependencies run: | - python -m pip install --upgrade pip - pip install pydoc-markdown pyyaml termcolor nbclient + uv pip install --system pydoc-markdown pyyaml termcolor nbclient # Pin databind packages as version 4.5.0 is not compatible with pydoc-markdown. - pip install databind.core==4.4.2 databind.json==4.4.2 + uv pip install --system databind.core==4.4.2 databind.json==4.4.2 - name: Install quarto uses: quarto-dev/quarto-actions/setup@v2 @@ -72,6 +74,9 @@ jobs: with: lfs: true fetch-depth: 0 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - uses: actions/setup-node@v4 with: node-version: 18.x @@ -81,10 +86,9 @@ jobs: python-version: "3.8" - name: Install Python dependencies run: | - python -m pip install --upgrade pip - pip install pydoc-markdown pyyaml termcolor nbclient + uv pip install --system pydoc-markdown pyyaml termcolor nbclient # Pin databind packages as version 4.5.0 is not compatible with pydoc-markdown. - pip install databind.core==4.4.2 databind.json==4.4.2 + uv pip install --system databind.core==4.4.2 databind.json==4.4.2 - name: Install quarto uses: quarto-dev/quarto-actions/setup@v2 diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 6aac54d381..24a6c068b9 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -59,15 +59,17 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install jupyter and ipykernel run: | - python -m pip install --upgrade pip - python -m pip install jupyter - python -m pip install ipykernel + uv pip install --system jupyter + uv pip install --system ipykernel - name: list available kernels run: | python -m jupyter kernelspec list @@ -128,15 +130,17 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python 3.11 uses: actions/setup-python@v5 with: python-version: 3.11 - name: Install jupyter and ipykernel run: | - python -m pip install --upgrade pip - python -m pip install jupyter - python -m pip install ipykernel + uv pip install --system jupyter + uv pip install --system ipykernel - name: list available kernels run: | python -m jupyter kernelspec list diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml index 23f4258a0e..ff6b4b34ca 100644 --- a/.github/workflows/dotnet-release.yml +++ b/.github/workflows/dotnet-release.yml @@ -29,15 +29,17 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python 3.11 uses: actions/setup-python@v5 with: python-version: 3.11 - name: Install jupyter and ipykernel run: | - python -m pip install --upgrade pip - python -m pip install jupyter - python -m pip install ipykernel + uv pip install --system jupyter + uv pip install --system ipykernel - name: list available kernels run: | python -m jupyter kernelspec list diff --git a/.github/workflows/openai.yml b/.github/workflows/openai.yml index fbe3ed6f3c..b9519ddb1a 100644 --- a/.github/workflows/openai.yml +++ b/.github/workflows/openai.yml @@ -40,6 +40,9 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -47,14 +50,13 @@ jobs: - name: Install packages and dependencies run: | docker --version - python -m pip install --upgrade pip wheel - pip install -e ".[test]" + uv pip install --system -e ".[test]" python -c "import autogen" - name: Install packages for test when needed if: matrix.python-version == '3.9' run: | - pip install docker - pip install -e .[redis,interop] + uv pip install --system docker + uv pip install --system -e .[redis,interop] - name: Coverage if: matrix.python-version == '3.9' env: @@ -73,7 +75,7 @@ jobs: WOLFRAM_ALPHA_APPID: ${{ secrets.WOLFRAM_ALPHA_APPID }} OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }} run: | - pip install nbconvert nbformat ipykernel + uv pip install --system nbconvert nbformat ipykernel pytest test/test_notebook.py --durations=10 --durations-min=1.0 cat "$(pwd)/test/executed_openai_notebook_output.txt" - name: Upload coverage to Codecov diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index dada66a77d..23cbca7983 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -23,6 +23,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" # - name: Cache conda # uses: actions/cache@v4 # with: @@ -39,14 +42,14 @@ jobs: - name: Install from source # This is required for the pre-commit tests shell: pwsh - run: pip install . + run: uv pip install --system . # - name: Conda list # shell: pwsh # run: conda list - name: Build pyautogen shell: pwsh run: | - pip install twine + uv pip install --system twine python setup.py sdist bdist_wheel - name: Publish pyautogen to PyPI env: diff --git a/.github/workflows/type-check.yml b/.github/workflows/type-check.yml index 79542d9768..ddd5e55de2 100644 --- a/.github/workflows/type-check.yml +++ b/.github/workflows/type-check.yml @@ -17,11 +17,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + with: + version: "latest" - uses: actions/setup-python@v5 with: python-version: ${{ matrix.version }} # All additional modules should be defined in setup.py - - run: pip install ".[types]" + - run: uv pip install --system ".[types]" # Any additional configuration should be defined in pyproject.toml - run: | mypy