Skip to content

Commit 6581599

Browse files
Merge pull request #13 from nishaq503/fix/pyarrow
Updating Dockerfiles and build scripts, pinning pyarrow, and fixing some pre-commit issues
2 parents 476e8b2 + 44fba33 commit 6581599

File tree

94 files changed

+1674
-226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1674
-226
lines changed

.github/workflows/tool-release.yml

+1-14
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,14 @@ env:
66

77
on:
88
workflow_dispatch:
9-
inputs:
10-
num-commits:
11-
description: "The of commits to check for updated packages. If 0, the action will check all commits on the branch. For any larger value, the action will check the last n commits for any updated packages."
12-
required: true
13-
default: 1
14-
type: number
15-
ignore-missing-dev:
16-
description: "If true, the action will ignore packages that do not have a dev version. Otherwise, the action will fail if any package does not have a dev version."
17-
required: true
18-
default: true
19-
type: boolean
209

2110
permissions:
2211
contents: write
2312

2413
jobs:
2514
tools-release:
26-
name: Call workflow from image-tools
15+
name: Tool Release
2716
uses: polusai/image-tools/.github/workflows/package-release.yml@master
2817
with:
29-
num-commits: ${{ github.event.inputs.num-commits }}
30-
ignore-missing-dev: ${{ github.event.inputs.ignore-missing-dev }}
3118
repo_name: "tabular-tools"
3219
secrets: inherit

.github/workflows/tool-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ permissions:
1717

1818
jobs:
1919
tools-tests:
20-
name: Call workflow from image-tools
20+
name: Tool Tests
2121
uses: polusai/image-tools/.github/workflows/package-tests.yml@master

clustering/feature-subsetting-tool/.bumpversion.cfg

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.2.1-dev0
2+
current_version = 0.2.2-dev0
33
commit = True
44
tag = False
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<dev>\d+))?
@@ -21,6 +21,7 @@ search = version = "{current_version}"
2121
replace = version = "{new_version}"
2222

2323
[bumpversion:file:plugin.json]
24+
2425
[bumpversion:file:README.md]
2526

2627
[bumpversion:file:VERSION]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/#use-with-ide
110+
.pdm.toml
111+
112+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113+
__pypackages__/
114+
115+
# Celery stuff
116+
celerybeat-schedule
117+
celerybeat.pid
118+
119+
# SageMath parsed files
120+
*.sage.py
121+
122+
# Environments
123+
.env
124+
.venv
125+
env/
126+
venv/
127+
ENV/
128+
env.bak/
129+
venv.bak/
130+
131+
# Spyder project settings
132+
.spyderproject
133+
.spyproject
134+
135+
# Rope project settings
136+
.ropeproject
137+
138+
# mkdocs documentation
139+
/site
140+
141+
# mypy
142+
.mypy_cache/
143+
.dmypy.json
144+
dmypy.json
145+
146+
# Pyre type checker
147+
.pyre/
148+
149+
# pytype static type analyzer
150+
.pytype/
151+
152+
# Cython debug symbols
153+
cython_debug/
154+
155+
# PyCharm
156+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158+
# and can be added to the global gitignore or merged into this file. For a more nuclear
159+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160+
#.idea/
161+
162+
# vscode
163+
.vscode
164+
165+
# test data directory
166+
data
167+
168+
# local manifests
169+
src/polus/plugins/_plugins/manifests/*
170+
171+
# allow python scripts inside manifests dir
172+
!src/polus/plugins/_plugins/manifests/*.py
173+
174+
#macOS
175+
*.DS_Store
176+
177+
178+
#husky
179+
node_modules

clustering/feature-subsetting-tool/Dockerfile

+9-5
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ ENV POLUS_LOG="INFO"
99
# Work directory defined in the base container
1010
WORKDIR ${EXEC_DIR}
1111

12-
COPY pyproject.toml ${EXEC_DIR}
13-
COPY VERSION ${EXEC_DIR}
14-
COPY README.md ${EXEC_DIR}
15-
COPY src ${EXEC_DIR}/src
12+
# TODO: Change the tool_dir to the tool directory
13+
ENV TOOL_DIR="clustering/feature-subsetting-tool"
1614

17-
RUN pip3 install ${EXEC_DIR} --no-cache-dir
15+
# Copy the repository into the container
16+
RUN mkdir tabular-tools
17+
COPY . ${EXEC_DIR}/tabular-tools
1818

19+
# Install the tool
20+
RUN pip3 install "${EXEC_DIR}/tabular-tools/${TOOL_DIR}" --no-cache-dir
1921

22+
# Set the entrypoint
23+
# TODO: Change the entrypoint to the tool entrypoint
2024
ENTRYPOINT ["python3", "-m", "polus.tabular.clustering.feature_subsetting"]
2125
CMD ["--help"]

clustering/feature-subsetting-tool/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Feature Data Subset(v0.2.1-dev0)
1+
# Feature Data Subset(v0.2.2-dev0)
22

33
This WIPP plugin subsets data based on a given feature. It works in conjunction with the `polus-feature-extraction-plugin`, where the feature extraction plugin can be used to extract the features such as the mean intensity of every image in the input image collection.
44

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.1-dev0
1+
0.2.2-dev0
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
#!/bin/bash
22

3+
# TODO: Change the name of the tool here
4+
tool_dir="clustering"
5+
tool_name="feature-subsetting-tool"
6+
7+
# The version is read from the VERSION file
38
version=$(<VERSION)
4-
docker build . -t polusai/feature-subsetting-tool:${version}
9+
tag="polusai/${tool_name}:${version}"
10+
echo "Building docker image with tag: ${tag}"
11+
12+
# The current directory and the repository root are saved in variables
13+
cur_dir=$(pwd)
14+
repo_root=$(git rev-parse --show-toplevel)
15+
16+
# The Dockerfile and .dockerignore files are copied to the repository root before building the image
17+
cd ${repo_root}
18+
cp ./${tool_dir}/${tool_name}/Dockerfile .
19+
cp .gitingore .dockerignore
20+
docker build . -t ${tag}
21+
rm Dockerfile .dockerignore
22+
cd ${cur_dir}

clustering/feature-subsetting-tool/plugin.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "Feature Subsetting",
3-
"version": "0.2.1-dev0",
3+
"version": "0.2.2-dev0",
44
"title": "Feature Subsetting",
55
"description": "Subset data using a given feature.",
66
"author": "Gauhar Bains (gauhar.bains@labshare.org) and Hamdah Shafqat Abbasi (hamdahshafqat.abbasi@nih.gov)",
77
"institution": "National Center for Advancing Translational Sciences, National Institutes of Health",
88
"repository": "https://github.com/PolusAI/tabular-tools",
99
"website": "https://ncats.nih.gov/preclinical/core/informatics",
1010
"citation": "",
11-
"containerId": "polusai/feature-subsetting-plugin:0.2.1-dev0",
11+
"containerId": "polusai/feature-subsetting-plugin:0.2.2-dev0",
1212
"baseCommand": [
1313
"python3",
1414
"-m",
@@ -170,4 +170,4 @@
170170
"required": "False"
171171
}
172172
}
173-
}
173+
}

clustering/feature-subsetting-tool/pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "polus-tabular-clustering-feature-subsetting"
3-
version = "0.2.1-dev0"
3+
version = "0.2.2-dev0"
44
description = "Subset data using a given feature."
55
authors = [
66
"Gauhar Bains <gauhar.bains@labshare.org>",
@@ -15,6 +15,7 @@ filepattern = "^2.0.4"
1515
typer = "^0.7.0"
1616
tqdm = "^4.64.1"
1717
vaex = "^4.17.0"
18+
pyarrow = ">=16.0,<17.0"
1819

1920

2021
[tool.poetry.group.dev.dependencies]
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Feature Subsetting Tool."""
22

3-
__version__ = "0.2.1-dev0"
3+
__version__ = "0.2.2-dev0"

clustering/hdbscan-clustering-tool/.bumpversion.cfg

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.4.8-dev1
2+
current_version = 0.4.9-dev0
33
commit = True
44
tag = False
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<dev>\d+))?
@@ -23,6 +23,7 @@ replace = version = "{new_version}"
2323
[bumpversion:file:plugin.json]
2424

2525
[bumpversion:file:VERSION]
26+
2627
[bumpversion:file:README.md]
2728

2829
[bumpversion:file:src/polus/tabular/clustering/hdbscan_clustering/__init__.py]

0 commit comments

Comments
 (0)