From 3be55439edd51a0a38e8ecbd9ee919483015061b Mon Sep 17 00:00:00 2001 From: Nazanin Donyapour Date: Thu, 2 Apr 2026 20:41:13 +0000 Subject: [PATCH] Fix a bug in the Dockerfile for Basic flatfield estimation --- .../Dockerfile | 20 +++------------- .../basic-flatfield-estimation-tool/README.md | 23 ++++++++----------- ...latfieldestimationusingbasicalgorithm.cwl} | 0 3 files changed, 13 insertions(+), 30 deletions(-) rename regression/basic-flatfield-estimation-tool/{flatfieldestimationusingbasicalgorithm..cwl => flatfieldestimationusingbasicalgorithm.cwl} (100%) diff --git a/regression/basic-flatfield-estimation-tool/Dockerfile b/regression/basic-flatfield-estimation-tool/Dockerfile index a319b2419..7e645b0e5 100644 --- a/regression/basic-flatfield-estimation-tool/Dockerfile +++ b/regression/basic-flatfield-estimation-tool/Dockerfile @@ -1,24 +1,9 @@ FROM tensorflow/tensorflow:2.15.0-gpu -# cat /etc/os-release -# -# NAME="Ubuntu" -# VERSION="20.04.5 LTS (Focal Fossa)" -# ID=ubuntu -# ID_LIKE=debian -# PRETTY_NAME="Ubuntu 20.04.5 LTS" -# VERSION_ID="20.04" -# HOME_URL="https://www.ubuntu.com/" -# SUPPORT_URL="https://help.ubuntu.com/" -# BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" -# PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" -# VERSION_CODENAME=focal -# UBUNTU_CODENAME=focal - # Install Python 3.12 from source (not available in deadsnakes PPA for Ubuntu 20.04) RUN apt update && \ apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev \ - libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev curl git && \ + libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev liblzma-dev curl git && \ cd /tmp && \ wget https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tgz && \ tar -xzf Python-3.12.7.tgz && \ @@ -59,7 +44,8 @@ COPY . ${EXEC_DIR}/image-tools # Install the tool WORKDIR ${EXEC_DIR}/image-tools/${TOOL_DIR} -RUN pip3 install . --no-cache-dir +# Fresh get-pip can lag; upgrade pip for PEP 517 / git URL dependency handling. +RUN pip3 install --upgrade pip && pip3 install . --no-cache-dir WORKDIR ${EXEC_DIR} # Set the entrypoint diff --git a/regression/basic-flatfield-estimation-tool/README.md b/regression/basic-flatfield-estimation-tool/README.md index b1fc4b8f3..b910506dc 100644 --- a/regression/basic-flatfield-estimation-tool/README.md +++ b/regression/basic-flatfield-estimation-tool/README.md @@ -33,10 +33,11 @@ of `plugin.json` into the pop-up window and submit. ## Running tests -Install dev dependencies (pytest, etc.), then run pytest: +From this directory, install the project in editable mode with the `dev` extra, +then run pytest: ```bash -uv sync --extra dev +uv pip install -e ".[dev]" uv run pytest ``` @@ -44,22 +45,18 @@ This runs all tests in the `tests` directory. ## Installation -Install dependencies using uv: -```bash -uv sync -``` +Create a virtual environment if you do not already have one (`uv venv`), then +from this directory: -Or including dev dependencies (linters, pytest, pre-commit) from -`[project.optional-dependencies]`: -```bash -uv sync --extra dev -``` +**Runtime dependencies only (editable install):** -To install every optional extra at once: ```bash -uv sync --all-extras +uv pip install -e . ``` +This project defines a single optional extra (`dev`). If more extras are added +later, install them with `uv pip install -e ".[extra1,extra2]"` as needed. + Since this plugin is only a thin wrapper around the `basicpy` package, the tests are limited to verifying that the plugin is able to run and that the output images are generated. The tests do not verify that the output images are correct. This check is performed by the `basicpy` package, which has its own tests. diff --git a/regression/basic-flatfield-estimation-tool/flatfieldestimationusingbasicalgorithm..cwl b/regression/basic-flatfield-estimation-tool/flatfieldestimationusingbasicalgorithm.cwl similarity index 100% rename from regression/basic-flatfield-estimation-tool/flatfieldestimationusingbasicalgorithm..cwl rename to regression/basic-flatfield-estimation-tool/flatfieldestimationusingbasicalgorithm.cwl