diff --git a/formats/image-dimension-stacking-tool/.bumpversion.cfg b/formats/image-dimension-stacking-tool/.bumpversion.cfg index 926e4c0f0..70ad28b93 100644 --- a/formats/image-dimension-stacking-tool/.bumpversion.cfg +++ b/formats/image-dimension-stacking-tool/.bumpversion.cfg @@ -1,6 +1,6 @@ [bumpversion] -current_version = 0.1.1-dev -commit = False +current_version = 0.1.1-dev2 +commit = True tag = False parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+)(?P\d+))? serialize = diff --git a/formats/image-dimension-stacking-tool/Dockerfile b/formats/image-dimension-stacking-tool/Dockerfile index 45071e4c3..3ea4ea281 100644 --- a/formats/image-dimension-stacking-tool/Dockerfile +++ b/formats/image-dimension-stacking-tool/Dockerfile @@ -9,13 +9,17 @@ ENV POLUS_LOG="INFO" # Work directory defined in the base container WORKDIR ${EXEC_DIR} -COPY pyproject.toml ${EXEC_DIR} -COPY VERSION ${EXEC_DIR} -COPY README.md ${EXEC_DIR} -COPY src ${EXEC_DIR}/src +# TODO: Change the tool_dir to the tool directory +ENV TOOL_DIR="formats/image-dimension-stacking-tool" -RUN pip3 install ${EXEC_DIR} --no-cache-dir +# Copy the repository into the container +RUN mkdir image-tools +COPY . ${EXEC_DIR}/image-tools -# Default command. Additional arguments are provided through the command line +# Install the tool +RUN pip3 install "${EXEC_DIR}/image-tools/${TOOL_DIR}" --no-cache-dir + +# Set the entrypoint +# TODO: Change the entrypoint to the tool entrypoint ENTRYPOINT ["python3", "-m", "polus.images.formats.image_dimension_stacking"] CMD ["--help"] diff --git a/formats/image-dimension-stacking-tool/README.md b/formats/image-dimension-stacking-tool/README.md index 97e356680..bc9d21d30 100644 --- a/formats/image-dimension-stacking-tool/README.md +++ b/formats/image-dimension-stacking-tool/README.md @@ -1,4 +1,4 @@ -# Image dimension stacking(0.1.1-dev) +# Image dimension stacking(0.1.1-dev2) This plugin leverages the [filepattern](https://filepattern2.readthedocs.io/en/latest/Home.html) library and employs the filepattern `groupBy` functionality to enable the matching of image filenames, facilitating their stacking into multi-dimensional images. diff --git a/formats/image-dimension-stacking-tool/VERSION b/formats/image-dimension-stacking-tool/VERSION index c9927239f..602bf8b29 100644 --- a/formats/image-dimension-stacking-tool/VERSION +++ b/formats/image-dimension-stacking-tool/VERSION @@ -1 +1 @@ -0.1.1-dev +0.1.1-dev2 diff --git a/formats/image-dimension-stacking-tool/build-docker.sh b/formats/image-dimension-stacking-tool/build-docker.sh index 0b0506259..3724d3060 100644 --- a/formats/image-dimension-stacking-tool/build-docker.sh +++ b/formats/image-dimension-stacking-tool/build-docker.sh @@ -1,4 +1,22 @@ #!/bin/bash +# TODO: Change the name of the tool here +tool_dir="formats" +tool_name="image-dimension-stacking-tool" + +# The version is read from the VERSION file version=$(", @@ -12,19 +12,13 @@ packages = [{include = "polus", from = "src"}] [tool.poetry.dependencies] python = ">=3.9,<3.12" -bfio = {version = "2.3.3", extras = ["all"]} +bfio = {version = "^2.3.6", extras = ["all"]} typer = "^0.7.0" tqdm = "^4.66.1" filepattern = "^2.0.4" pydantic = "^1.10.4" preadator="0.4.0.dev2" - - -[[tool.poetry.source]] -name = "test" -url = "https://test.pypi.org/simple/" -default = false -secondary = true +numpy = "<2.0.0" [tool.poetry.group.dev.dependencies] bump2version = "^1.0.1" diff --git a/formats/image-dimension-stacking-tool/src/polus/images/formats/image_dimension_stacking/__init__.py b/formats/image-dimension-stacking-tool/src/polus/images/formats/image_dimension_stacking/__init__.py index 8d98ba52d..2be3bea0e 100644 --- a/formats/image-dimension-stacking-tool/src/polus/images/formats/image_dimension_stacking/__init__.py +++ b/formats/image-dimension-stacking-tool/src/polus/images/formats/image_dimension_stacking/__init__.py @@ -1,2 +1,3 @@ """Image dimension stacking package.""" -__version__ = "0.1.1-dev" + +__version__ = "0.1.1-dev2" diff --git a/formats/image-dimension-stacking-tool/tests/conftest.py b/formats/image-dimension-stacking-tool/tests/conftest.py index fdaef3712..e65f78b2b 100644 --- a/formats/image-dimension-stacking-tool/tests/conftest.py +++ b/formats/image-dimension-stacking-tool/tests/conftest.py @@ -2,6 +2,7 @@ Set up all data used in tests. """ + import shutil import tempfile from pathlib import Path diff --git a/formats/image-dimension-stacking-tool/tests/test_cli.py b/formats/image-dimension-stacking-tool/tests/test_cli.py index 81a32d325..92cccade1 100644 --- a/formats/image-dimension-stacking-tool/tests/test_cli.py +++ b/formats/image-dimension-stacking-tool/tests/test_cli.py @@ -1,9 +1,11 @@ """Test Command line Tool.""" -from typer.testing import CliRunner -from polus.images.formats.image_dimension_stacking.__main__ import app + from pathlib import Path from typing import Union + +from typer.testing import CliRunner import pytest +from polus.images.formats.image_dimension_stacking.__main__ import app def test_cli(synthetic_images: tuple[Union[str, Path]], output_directory: Path) -> None: diff --git a/formats/image-dimension-stacking-tool/tests/test_dimension_stacking.py b/formats/image-dimension-stacking-tool/tests/test_dimension_stacking.py index 2cd39dca4..90ce8cbab 100644 --- a/formats/image-dimension-stacking-tool/tests/test_dimension_stacking.py +++ b/formats/image-dimension-stacking-tool/tests/test_dimension_stacking.py @@ -1,4 +1,5 @@ """Testing of image dimension stacking.""" + from pathlib import Path from typing import Union