chore: removes Poetry references from pyproject.toml and updates the project metadata (#4019)

* Remove Poetry references from pyproject.toml and update project metadata

* Remove '--no-update' flag from 'uv lock' commands in Makefile

* Add script metadata with Python version and dependencies

* Remove Poetry references and integrate UV setup in CI workflow

* Remove Poetry setup and installation from integration tests workflow

* Remove Poetry references and update workflow to use custom setup action

* Remove references to Poetry from configuration files
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-10-04 14:24:55 -03:00 committed by GitHub
commit 54dd81a681
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 64 additions and 319 deletions

View file

@ -296,18 +296,15 @@ jobs:
python-version:
- "3.12"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_caching"
- name: Check out the code at a specific ref
uses: actions/checkout@v4
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
cache-key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Python dependencies
run: |
poetry env use ${{ matrix.python-version }}
poetry install
ref: ${{ inputs.nightly_tag_main || github.ref }}
- name: "Setup Environment"
uses: ./.github/actions/setup-uv
with:
ref: ${{ inputs.nightly_tag_main || github.ref }}
- name: Restart HuggingFace Spaces Build
run: |
poetry run python ./scripts/factory_restart_space.py --space "Langflow/Langflow" --token ${{ secrets.HUGGINGFACE_API_TOKEN }}
uv run ./scripts/factory_restart_space.py --space "Langflow/Langflow" --token ${{ secrets.HUGGINGFACE_API_TOKEN }}

View file

@ -42,16 +42,10 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_caching"
- name: "Setup Environment"
uses: ./.github/actions/setup-uv
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
cache-key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Python dependencies
run: |
poetry env use ${{ matrix.python-version }}
poetry install
ref: ${{ inputs.ref || github.ref }}
- name: Run integration tests with api keys
timeout-minutes: 20
run: |

View file

@ -26,7 +26,6 @@ on:
default: "tests"
env:
POETRY_VERSION: "1.8.3"
NODE_VERSION: "21"
PYTHON_VERSION: "3.12"
# Define the directory where Playwright browsers will be installed.
@ -103,18 +102,12 @@ jobs:
npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- name: Set up Python ${{ env.PYTHON_VERSION }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_caching"
- name: "Setup Environment"
uses: ./.github/actions/setup-uv
with:
python-version: ${{ env.PYTHON_VERSION }}
poetry-version: ${{ env.POETRY_VERSION }}
cache-key: tests
- name: Install Python dependencies
run: |
poetry env use ${{ env.PYTHON_VERSION }}
poetry lock --no-update
poetry install
ref: ${{ inputs.ref || github.ref }}
- name: Install the project
run: uv sync --dev
- name: create .env
run: |
@ -138,6 +131,9 @@ jobs:
path: src/frontend/blob-report
retention-days: 1
- name: Minimize uv cache
run: uv cache prune --ci
merge-reports:
# We need to repeat the condition at every step
# https://github.com/actions/runner/issues/662