Skip to content

Commit 1dd0564

Browse files
committed
update pyproject.toml and Dockerfile
1 parent 8f4c3a8 commit 1dd0564

2 files changed

Lines changed: 60 additions & 11 deletions

File tree

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
11
# Build from repo root (monorepo) or from this tool directory — both work.
22
# (Previously used a TensorFlow base image; this matches other tools — rebuild if TF is required.)
33
FROM polusai/bfio:2.5.0
4-
ENV EXEC_DIR="/opt/executables" POLUS_IMG_EXT=".ome.tif" POLUS_TAB_EXT=".csv" POLUS_LOG="INFO"
4+
ENV EXEC_DIR="/opt/executables"
5+
ENV POLUS_IMG_EXT=".ome.tif"
6+
ENV POLUS_TAB_EXT=".csv"
7+
ENV POLUS_LOG="INFO"
8+
9+
# Work directory defined in the base container
510
WORKDIR ${EXEC_DIR}
11+
# TODO: Change the tool_dir to the tool directory
612
ENV TOOL_DIR="transforms/images/remove-border-objects-plugin"
13+
14+
# Copy the repository into the container
715
RUN mkdir -p image-tools
816
COPY . ${EXEC_DIR}/image-tools
17+
18+
# Install the tool
19+
# WORKDIR ${EXEC_DIR}/image-tools/${TOOL_DIR}
20+
# RUN pip3 install . --no-cache-dir
21+
# WORKDIR ${EXEC_DIR}
22+
923
RUN pip3 install -U pip setuptools wheel \
1024
&& python3 -c 'import sys; assert sys.version_info>=(3,11)' \
1125
&& R="${EXEC_DIR}/image-tools" && M="$R/$TOOL_DIR" \
1226
&& if [ -f "$M/pyproject.toml" ]; then pip3 install --no-cache-dir "$M"; \
1327
else pip3 install --no-cache-dir "$R"; fi
14-
ENTRYPOINT ["python3", "-m", "main"]
28+
29+
# Set the entrypoint
30+
# TODO: Change the entrypoint to the tool entrypoint
31+
ENTRYPOINT ["python3", "-m", "polus.images.remove_border_objects"]
1532
CMD ["--help"]
Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,52 @@
11
[project]
22
name = "polus-remove-border-objects-plugin"
33
version = "0.1.1"
4-
requires-python = ">=3.11"
4+
requires-python = ">=3.11,<3.14"
5+
56
dependencies = [
67
"bfio>=2.5.0",
7-
"filepattern>=2.2.1",
8-
"numpy>=1.26.4",
8+
"filepattern>=2.2.4",
9+
"typer>=0.24.1,<0.25.0",
10+
"numpy>=2.0.0",
11+
"tqdm==4.67.3",
12+
"basicpy @ git+https://github.com/ndonyapour/BaSiCPy.git@chore/update-supported-python",
913
"scikit-image>=0.25",
1014
]
1115

16+
[project.optional-dependencies]
17+
dev = [
18+
"bump2version>=1.0.1",
19+
"pre-commit>=4.5.1",
20+
"black>=26.3.1",
21+
"flake8>=6.0.0",
22+
"mypy>=1.0.0",
23+
"pytest>=7.2.1",
24+
"pytest-cov>=7.0.0",
25+
"pytest-sugar>=1.1.1,<2.0.0",
26+
"pytest-xdist>=3.8.0,<4.0.0",
27+
]
28+
1229
[build-system]
13-
requires = ["setuptools>=61.0", "wheel"]
14-
build-backend = "setuptools.build_meta"
30+
requires = ["hatchling"]
31+
build-backend = "hatchling.build"
32+
33+
[tool.hatch.metadata]
34+
allow-direct-references = true
35+
36+
[tool.hatch.build.targets.wheel]
37+
packages = ["src/polus"]
38+
39+
[tool.pytest.ini_options]
40+
pythonpath = [
41+
"."
42+
]
43+
44+
#[build-system]
45+
#requires = ["setuptools>=61.0", "wheel"]
46+
#build-backend = "setuptools.build_meta"
1547

16-
[tool.setuptools.package-dir]
17-
"" = "src"
48+
#[tool.setuptools.package-dir]
49+
#"" = "src"
1850

19-
[tool.setuptools]
20-
py-modules = ["main", "functions"]
51+
#[tool.setuptools]
52+
#py-modules = ["main", "functions"]

0 commit comments

Comments
 (0)