generated from FNNDSC/python-chrisapp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from FNNDSC/tag-index
Tag-based overhaul
- Loading branch information
Showing
21 changed files
with
655 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
# Python version can be changed, e.g. | ||
# FROM python:3.8 | ||
# FROM ghcr.io/mamba-org/micromamba:1.5.1-focal-cuda-11.3.1 | ||
FROM docker.io/python:3.12.1-slim-bookworm | ||
FROM docker.io/mambaorg/micromamba:1.5.5-bookworm-slim AS micromamba | ||
FROM micromamba AS builder | ||
|
||
LABEL org.opencontainers.image.authors="FNNDSC <[email protected]>" \ | ||
org.opencontainers.image.title="Publish ChRIS Public Dataset" \ | ||
org.opencontainers.image.description="Mark the outputs of a feed as compatible with the public dataset viewer feature of ChRIS_ui." | ||
RUN \ | ||
--mount=type=cache,sharing=private,target=/home/mambauser/.mamba/pkgs,uid=57439,gid=57439 \ | ||
--mount=type=cache,sharing=private,target=/opt/conda/pkgs,uid=57439,gid=57439 \ | ||
micromamba -y -n base install -c conda-forge python=3.12.1 nibabel=5.2.0 numpy=1.26.3 tqdm=4.66.1 pydantic=2.6.0 | ||
|
||
ARG SRCDIR=/usr/local/src/pl-visual-dataset | ||
ARG SRCDIR=/home/mambauser/pl-visual-dataset | ||
RUN mkdir "${SRCDIR}" | ||
WORKDIR ${SRCDIR} | ||
|
||
COPY requirements.txt . | ||
RUN --mount=type=cache,sharing=private,target=/root/.cache/pip pip install -r requirements.txt | ||
ARG MAMBA_DOCKERFILE_ACTIVATE=1 | ||
RUN pip install -r requirements.txt | ||
|
||
COPY . . | ||
COPY --chown=mambauser:mambauser . . | ||
ARG extras_require=none | ||
RUN pip install ".[${extras_require}]" \ | ||
&& cd / && rm -rf ${SRCDIR} | ||
RUN pip install ".[${extras_require}]" && cd / && rm -rf ${SRCDIR} | ||
WORKDIR / | ||
|
||
CMD ["pub"] | ||
CMD ["visualdataset"] | ||
|
||
LABEL org.opencontainers.image.authors="FNNDSC <[email protected]>" \ | ||
org.opencontainers.image.title="Create ChRIS Visual Dataset" \ | ||
org.opencontainers.image.description="Prepare a dataset for visualization with ChRIS_ui" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
chris_plugin==0.4.0 | ||
nibabel~=5.2.0 | ||
numpy~=1.26.3 | ||
tqdm~=4.66.1 | ||
pydantic~=2.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,18 +19,18 @@ def get_version(rel_path: str) -> str: | |
|
||
|
||
setup( | ||
name='publish-chris-dataset', | ||
version=get_version('pubchrisvisual/__init__.py'), | ||
description='Mark the outputs of a feed as compatible with the public dataset viewer feature of ChRIS_ui.', | ||
name='chrisvisualdataset', | ||
version=get_version('visualdataset/__init__.py'), | ||
description='Prepare the outputs of a feed for the "visual datasets" feature of ChRIS_ui.', | ||
author='FNNDSC', | ||
author_email='[email protected]', | ||
url='https://github.com/FNNDSC/pl-visual-dataset', | ||
packages=['pubchrisvisual'], | ||
packages=['visualdataset'], | ||
install_requires=['chris_plugin'], | ||
license='MIT', | ||
entry_points={ | ||
'console_scripts': [ | ||
'pubone = pubchrisvisual.one:main' | ||
'visualdataset = visualdataset.__main__:main' | ||
] | ||
}, | ||
classifiers=[ | ||
|
@@ -42,7 +42,8 @@ def get_version(rel_path: str) -> str: | |
extras_require={ | ||
'none': [], | ||
'dev': [ | ||
'pytest~=7.1' | ||
'pytest~=8.0', | ||
'pytest-unordered~=0.5.2' | ||
] | ||
} | ||
) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from typing import Sequence | ||
|
||
from pydantic import TypeAdapter | ||
|
||
from visualdataset.args_types import Matcher | ||
|
||
FETAL_ATLAS_MATCHERS: Sequence[Matcher] = [ | ||
*(Matcher(key='age', value=str(age), regex=f'Age {age}/') for age in range(10, 40, 1)), | ||
|
||
Matcher(key='author', value='Ahmed Serag et al.', regex=r'/serag\.nii\.gz$'), | ||
Matcher(key='author', value='Ali Gholipour et al., CRL', regex=r'/ali.*\.nii\.gz$'), | ||
Matcher(key='author', value='Kiho Im et al., FNNDSC', regex=r'/kiho\.nii\.gz$'), | ||
|
||
Matcher(key='institution', value="Boston Children's Hospital", regex=r'/(kiho|ali).*\.nii\.gz$'), | ||
Matcher(key='institution', value="Imperial College London", regex=r'/serag\.nii\.gz$'), | ||
|
||
Matcher(key='type', value='T2 MRI', regex=r'/(ali|aliexp|kiho|serag)\.nii\.gz$'), | ||
Matcher(key='type', value='labels', regex=r'/(ali|aliexp)_.+\.nii\.gz$'), | ||
Matcher(key='labels', value='tissue', regex=r'/(ali|aliexp)_tissue\.nii\.gz$'), | ||
Matcher(key='labels', value='parcellation', regex=r'/(ali|aliexp)_regional\.nii\.gz$'), | ||
] | ||
|
||
if __name__ == '__main__': | ||
adapter = TypeAdapter(Sequence[Matcher]) | ||
print(adapter.dump_json(FETAL_ATLAS_MATCHERS).decode('utf-8')) |
Oops, something went wrong.