From 975e69dc864bc9cdcb1469188e179342440c63ca Mon Sep 17 00:00:00 2001 From: Jonathon Broughton Date: Mon, 24 Mar 2025 18:49:33 +0000 Subject: [PATCH] Update installation steps and dependencies - Removed uv installation from workflows and Dockerfile. - Consolidated tooling installations into a single step. - Changed dependency installation to use requirements.txt instead of pyproject.toml. - Set PYTHONPATH in the Dockerfile for module accessibility. --- .github/workflows/main.yml | 16 +++++------ Dockerfile | 14 +++++---- requirements.txt | 58 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3fa9d5a..847d60e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,16 +16,14 @@ jobs: with: python-version: '3.13' - - name: Install uv - run: pip install uv - + - name: Install tooling + run: pip install wheel setuptools==77.0.3 + - name: Preinstall stringcase workaround - run: | - pip install wheel setuptools==77.0.3 - pip install --no-use-pep517 'stringcase==1.2.0' - - - name: Install all dependencies from pyproject.toml - run: uv pip install --group default --system + run: pip install --no-use-pep517 'stringcase==1.2.0' + + - name: Install project dependencies + run: pip install -r requirements.txt - name: Extract functionInputSchema id: extract_schema diff --git a/Dockerfile b/Dockerfile index dbf8750..b09a834 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,16 +8,18 @@ WORKDIR /home/speckle # We also ensure that the user 'speckle' owns these files, so it can access them # This assumes that the Dockerfile is in the same directory as the rest of the code COPY . /home/speckle -q -# Install build tools and uv -RUN pip install --no-cache-dir uv wheel setuptools==77.0.3 +# Install tooling needed for legacy builds and wheel installs +RUN pip install --no-cache-dir wheel setuptools==77.0.3 -# Pre-install stringcase with the legacy install workaround +# Preinstall stringcase using legacy build workaround RUN pip install --no-use-pep517 'stringcase==1.2.0' -# Install all project dependencies from pyproject.toml using uv -RUN uv pip install --group default --system +# Install all dependencies from requirements.txt +RUN pip install --no-cache-dir -r requirements.txt + +# Set the PYTHONPATH to find modules in src/ +ENV PYTHONPATH="/home/speckle/src" # Set the default command CMD ["python", "main.py", "run"] diff --git a/requirements.txt b/requirements.txt index 25c7418..6fc2d8a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,38 +1,96 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile pyproject.toml -o requirements.txt annotated-types==0.7.0 + # via pydantic anyio==4.9.0 + # via + # gql + # httpx appdirs==1.4.4 + # via specklepy attrs==23.2.0 + # via specklepy backoff==2.2.1 + # via gql certifi==2025.1.31 + # via + # httpcore + # httpx + # requests charset-normalizer==3.4.1 + # via requests deprecated==1.2.18 + # via specklepy gql==3.5.2 + # via specklepy graphql-core==3.2.4 + # via gql h11==0.14.0 + # via httpcore httpcore==1.0.7 + # via httpx httpx==0.25.2 + # via specklepy idna==3.10 + # via + # anyio + # httpx + # requests + # yarl iniconfig==2.1.0 + # via pytest multidict==6.2.0 + # via yarl mypy==1.15.0 + # via data-shield (pyproject.toml) mypy-extensions==1.0.0 + # via mypy packaging==24.2 + # via pytest pluggy==1.5.0 + # via pytest propcache==0.3.0 + # via yarl pydantic==2.10.6 + # via + # pydantic-settings + # specklepy pydantic-core==2.27.2 + # via pydantic pydantic-settings==2.8.1 + # via data-shield (pyproject.toml) pytest==8.3.5 + # via data-shield (pyproject.toml) python-dotenv==1.0.1 + # via pydantic-settings requests==2.32.3 + # via + # gql + # requests-toolbelt requests-toolbelt==1.0.0 + # via gql ruff==0.11.2 + # via data-shield (pyproject.toml) sniffio==1.3.1 + # via + # anyio + # httpx specklepy==2.21.3 + # via data-shield (pyproject.toml) stringcase==1.2.0 + # via specklepy typing-extensions==4.12.2 + # via + # mypy + # pydantic + # pydantic-core ujson==5.10.0 + # via specklepy urllib3==2.3.0 + # via requests websockets==11.0.3 + # via gql wrapt==1.17.2 + # via deprecated yarl==1.18.3 + # via gql