diff --git a/.dryrun_test_all.sh b/.dryrun_test_all.sh index 4dccdf95..bb0e5642 100755 --- a/.dryrun_test_all.sh +++ b/.dryrun_test_all.sh @@ -1,17 +1,17 @@ #!/bin/bash set -euxo pipefail HIPPUNFOLD_CACHE_DIR=`pwd`/test_data/fake_models -hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w -hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --hemi R -hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --hemi L -hippunfold test_data/bids_multiT2w test_out participant -np --modality T2w -hippunfold test_data/bids_T1w test_out participant -np --modality T1w -hippunfold test_data/bids_hippb500 test_out participant -np --modality hippb500 -hippunfold test_data/bids_T1w_longitudinal test_out participant -np --modality T1w -hippunfold test_data/bids_singleT2w_longitudinal test_out participant -np --modality T2w -hippunfold test_data/bids_segT2w test_out participant -np --modality segT2w -hippunfold . test_out participant -np --modality cropseg --path_cropseg test_data/data_cropseg/sub-{subject}_hemi-{hemi}_dseg.nii.gz -hippunfold . test_out participant -np --modality cropseg --path_cropseg test_data/data_cropseg_1hemi/sub-{subject}_hemi-{hemi}_dseg.nii.gz --hemi L -hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --t1_reg_template -hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --output_space T1w -hippunfold test_data/bids_T1w test_out participant -np --modality T1w --use-template-seg +hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w +hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --hemi R +hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --hemi L +hippunfold test_data/bids_multiT2w test_out participant -np --modality T2w +hippunfold test_data/bids_T1w test_out participant -np --modality T1w +hippunfold test_data/bids_hippb500 test_out participant -np --modality hippb500 +hippunfold test_data/bids_T1w_longitudinal test_out participant -np --modality T1w +hippunfold test_data/bids_singleT2w_longitudinal test_out participant -np --modality T2w +hippunfold test_data/bids_segT2w test_out participant -np --modality segT2w +hippunfold . test_out participant -np --modality cropseg --path_cropseg test_data/data_cropseg/sub-{subject}_hemi-{hemi}_dseg.nii.gz +hippunfold . test_out participant -np --modality cropseg --path_cropseg test_data/data_cropseg_1hemi/sub-{subject}_hemi-{hemi}_dseg.nii.gz --hemi L +hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --t1_reg_template +hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --output_space T1w +hippunfold test_data/bids_T1w test_out participant -np --modality T1w --use-template-seg diff --git a/.gitignore b/.gitignore index d40c0cdf..68bc17f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,160 @@ -hippunfold.egg-info -hippunfold/.snakemake -hippunfold/__pycache__ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ diff --git a/hippunfold/config/snakebids.yml b/hippunfold/config/snakebids.yml index 65044f32..e06cf178 100644 --- a/hippunfold/config/snakebids.yml +++ b/hippunfold/config/snakebids.yml @@ -10,6 +10,7 @@ debug: False derivatives: False #will search in bids/derivatives if True; can also be path(s) to derivatives datasets + #list of analysis levels in the bids app analysis_levels: &analysis_levels - participant @@ -35,8 +36,8 @@ pybids_inputs: suffix: 'T2w' extension: '.nii.gz' datatype: 'anat' - invalid_filters: 'allow' - space: null + # invalid_filters: 'allow' + # space: null wildcards: - subject - session @@ -58,8 +59,8 @@ pybids_inputs: suffix: 'T1w' extension: '.nii.gz' datatype: 'anat' - invalid_filters: 'allow' - space: null + # invalid_filters: 'allow' + # space: null wildcards: - subject - session @@ -75,6 +76,8 @@ pybids_inputs: wildcards: - subject - session + - acquisition + - run cropseg: filters: @@ -86,6 +89,9 @@ pybids_inputs: - subject - session - hemi + - acquisition + - run + @@ -178,17 +184,11 @@ parse_args: help: 'Scales the default smoothing sigma for gradient and warp in greedy registration for template-based segmentation. Using a value higher than 1 will use result in a smoother warp. (default: %(default)s)' default: 2.0 - - --derivatives: - help: 'Path to the derivatives folder (e.g. for finding manual segs) (default: %(default)s) ' - default: False - --skip_preproc: help: 'Set this flag if your inputs (e.g. T2w, dwi) are already pre-processed (default: %(default)s)' default: False action: 'store_true' - --skip_coreg: help: 'Set this flag if your inputs (e.g. T2w, dwi) are already registered to T1w space (default: %(default)s)' default: False @@ -330,6 +330,20 @@ parse_args: - synthseg_v0.2 - neonateT1w_v2 + --enable-bids-validation: + help: | + Enable validation of BIDS dataset. BIDS validation would be performed + using the bids-validator plugin (if installed/enabled) or with the pybids + validator implementation (if bids-validator is not installed/enabled). + dest: "plugins.validator.skip" + action: "store_false" + default: True + + + --version: + help: 'Print the version of HippUnfold' + action: version + version: "1.5.2-pre.2" @@ -700,6 +714,7 @@ output_density: laminar_coords_method: equivolume skip_preproc: False +plugins.validator.skip: False nnunet_enable_tta: False use_gpu: False skip_coreg: False diff --git a/hippunfold/pipeline_description.json b/hippunfold/pipeline_description.json index 745fe333..98892ec4 100644 --- a/hippunfold/pipeline_description.json +++ b/hippunfold/pipeline_description.json @@ -1,14 +1,15 @@ { - "Name": "Snakemake BIDS app for hippocampal unfolding & subfield segmentation", - "BIDSVersion": "1.4.0", - "DatasetType": "derivative", - "GeneratedBy": [ - { - "Name": "hippunfold", - "Version": "1.5.2-pre.2", - "CodeURL": "https://github.com/khanlab/hippunfold", - "Author": "Jordan DeKraker & Ali Khan", - "AuthorEmail": "ali.khan@uwo.ca" - } - ] + + "Name": "Snakemake BIDS app for hippocampal unfolding & subfield segmentation", + "BIDSVersion": "1.8.0", + "DatasetType": "derivative", + "GeneratedBy": [ + { + "Name": "hippunfold", + "Version": "1.5.4", + "CodeURL": "https://github.com/khanlab/hippunfold", + "Author": "Jordan DeKraker & Ali Khan", + "AuthorEmail": "ali.khan@uwo.ca" + } + ] } diff --git a/hippunfold/run.py b/hippunfold/run.py index 0565f7aa..e03b7be5 100755 --- a/hippunfold/run.py +++ b/hippunfold/run.py @@ -1,24 +1,27 @@ #!/usr/bin/env python3 -import os +from pathlib import Path -from snakebids.app import SnakeBidsApp -from snakebids.cli import add_dynamic_args +from snakebids import bidsapp, plugins +if "__file__" not in globals(): + __file__ = "../hippunfold/run.py" -def get_parser(): - """Exposes parser for sphinx doc generation, cwd is the docs dir""" - app = SnakeBidsApp("../hippunfold") - add_dynamic_args(app.parser, app.config["parse_args"], app.config["pybids_inputs"]) - return app.parser + +app = bidsapp.app( + [ + plugins.SnakemakeBidsApp(Path(__file__).resolve().parent), + plugins.BidsValidator(), + plugins.Version(distribution="hippunfold"), + plugins.CliConfig("parse_args"), + plugins.ComponentEdit("pybids_inputs"), + ] +) -def main(): - app = SnakeBidsApp( - os.path.abspath(os.path.dirname(__file__)), - configfile_path="config/snakebids.yml", - ) - app.run_snakemake() +def get_parser(): + """Exposes parser for sphinx doc generation, cwd is the docs dir.""" + return app.build_parser().parser if __name__ == "__main__": - main() + app.run() diff --git a/hippunfold/workflow/Snakefile b/hippunfold/workflow/Snakefile index 76894097..46b4a248 100644 --- a/hippunfold/workflow/Snakefile +++ b/hippunfold/workflow/Snakefile @@ -1,12 +1,14 @@ # ---- snakebids boilerplate import snakebids -from snakebids import bids +from snakebids import bids, set_bids_spec configfile: "config/snakebids.yml" +set_bids_spec("v0_0_0") + # consider moving this logic to another smk file to clean-up limit_to_list = set() @@ -74,17 +76,13 @@ else: if not config["atlas"] == ["multihist7"]: config["no_unfolded_reg"] = True -# writes inputs_config.yml and updates config dict -config.update( - snakebids.generate_inputs( - bids_dir=config["bids_dir"], - pybids_inputs=config["pybids_inputs"], - derivatives=config["derivatives"], - participant_label=config["participant_label"], - exclude_participant_label=config["exclude_participant_label"], - limit_to=list(limit_to_list), - use_bids_inputs=False, - ) +inputs = snakebids.generate_inputs( + bids_dir=config["bids_dir"], + pybids_inputs=config["pybids_inputs"], + derivatives=config["derivatives"], + participant_label=config["participant_label"], + exclude_participant_label=config["exclude_participant_label"], + limit_to=list(limit_to_list), ) @@ -106,13 +104,17 @@ wildcard_constraints: template="[a-zA-Z0-9]+", -root = os.path.join(config["root"], "hippunfold") -work = os.path.join(config["root"], "work") +root = os.path.normpath(os.path.join(config["root"], "hippunfold")) +work = os.path.normpath(os.path.join(config["root"], "work")) include: "rules/common.smk" include: "rules/download.smk" -include: "rules/preproc_t1.smk" + + +if "T1w" in limit_to_list: + + include: "rules/preproc_t1.smk" # include rules only as they are needed.. diff --git a/hippunfold/workflow/rules/autotop.smk b/hippunfold/workflow/rules/autotop.smk index e267fd82..22e1d4f3 100644 --- a/hippunfold/workflow/rules/autotop.smk +++ b/hippunfold/workflow/rules/autotop.smk @@ -16,7 +16,7 @@ def get_labels_for_laplace(wildcards): seg = bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="postproc", space="corobl", @@ -33,7 +33,7 @@ def get_inputs_laplace(wildcards): bids( root=work, datatype="coords", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", label="hipp", suffix="coords.nii.gz", @@ -64,7 +64,7 @@ rule laplace_coords_hipp: desc="laplace", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -73,7 +73,7 @@ rule laplace_coords_hipp: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", hemi="{hemi}", suffix="laplace-hipp.txt" @@ -89,7 +89,7 @@ rule laplace_coords_dentate: coords=bids( root=work, datatype="coords", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", label="dentate", suffix="coords.nii.gz", @@ -107,7 +107,7 @@ rule laplace_coords_dentate: desc="laplace", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -116,7 +116,7 @@ rule laplace_coords_dentate: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", hemi="{hemi}", suffix="laplace-dentate.txt" @@ -141,7 +141,7 @@ rule prep_equivolume_coords: suffix="mask.nii.gz", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), innerbin=bids( root=work, @@ -151,12 +151,12 @@ rule prep_equivolume_coords: suffix="mask.nii.gz", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", hemi="{hemi}", suffix="binarize.txt" @@ -179,7 +179,7 @@ rule equivolume_coords: suffix="mask.nii.gz", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), innerbin=bids( root=work, @@ -189,7 +189,7 @@ rule equivolume_coords: suffix="mask.nii.gz", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), params: script=os.path.join(workflow.basedir, "scripts/equivolume_coords.py"), @@ -203,7 +203,7 @@ rule equivolume_coords: desc="equivol", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -212,7 +212,7 @@ rule equivolume_coords: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", hemi="{hemi}", suffix="equivolume.txt" diff --git a/hippunfold/workflow/rules/common.smk b/hippunfold/workflow/rules/common.smk index 00d174ff..d273f50f 100644 --- a/hippunfold/workflow/rules/common.smk +++ b/hippunfold/workflow/rules/common.smk @@ -1,4 +1,27 @@ from appdirs import AppDirs +from snakebids.paths import bids_factory, specs + +from functools import partial + + +def get_single_bids_input(wildcards, component): + """Generic input function for getting the first instance of a bids component + from a dataset, and throw an error if more than one are found. + + Use this in a rule by using e.g.: + in_img = partial(get_single_bids_input,component='T1w') + """ + + subj_inputs = inputs[component].filter(**wildcards).expand() + if len(subj_inputs) > 1: + raise ValueError( + f"Expected 1 input for '{component}' {wildcards}, " + f"but found {len(subj_inputs)}: {subj_inputs}." + f"You can use the --filter-{component} option to filter your wildcards." + ) + else: + return subj_inputs[0] + # take mean of all scans if >1, otherwise just copy the one scan def get_avg_or_cp_scans_cmd(wildcards, input, output): @@ -27,7 +50,7 @@ def get_modality_suffix(modality): def get_final_spec(): if len(config["hemi"]) == 2: - specs = expand( + specs = inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="surf", @@ -35,7 +58,7 @@ def get_final_spec(): space="{space}", label="{autotop}", suffix="surfaces.spec", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), density=config["output_density"], space=ref_spaces, @@ -43,7 +66,7 @@ def get_final_spec(): allow_missing=True, ) else: - specs = expand( + specs = inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="surf", @@ -52,7 +75,7 @@ def get_final_spec(): hemi="{hemi}", label="{autotop}", suffix="surfaces.spec", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), density=config["output_density"], space=ref_spaces, @@ -66,7 +89,7 @@ def get_final_spec(): def get_final_surf(): gii = [] gii.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="surf", @@ -75,7 +98,7 @@ def get_final_surf(): space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), density=config["output_density"], space=ref_spaces, @@ -86,7 +109,7 @@ def get_final_surf(): ) ) gii.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="surf", @@ -95,7 +118,7 @@ def get_final_surf(): space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), density=config["output_density"], space=ref_spaces, @@ -109,7 +132,7 @@ def get_final_surf(): def get_final_subfields(): - return expand( + return inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="anat", @@ -118,7 +141,7 @@ def get_final_subfields(): space="{space}", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), hemi=config["hemi"], space=crop_ref_spaces, @@ -136,7 +159,7 @@ def get_final_coords(): coords = [] # compute all laplace coords by default (incl IO) coords.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="coords", @@ -146,7 +169,7 @@ def get_final_coords(): space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), desc="laplace", dir=["AP", "PD", "IO"], @@ -157,7 +180,7 @@ def get_final_coords(): ) ) coords.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="coords", @@ -167,7 +190,7 @@ def get_final_coords(): space="{space}", hemi="{hemi}", label="hipp", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), desc=[desc_io], dir=["IO"], @@ -183,11 +206,11 @@ def get_final_transforms(): xfms = [] xfms.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="{autotop}", suffix="xfm.nii.gz", hemi="{hemi}", @@ -203,11 +226,11 @@ def get_final_transforms(): ) xfms.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="{autotop}", suffix="xfm.nii.gz", hemi="{hemi}", @@ -223,11 +246,11 @@ def get_final_transforms(): ) xfms.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="{autotop}", suffix="refvol.nii.gz", space="unfold", @@ -245,7 +268,7 @@ def get_final_anat(): if "T1w" in ref_spaces or "T2w" in ref_spaces: anat.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="anat", @@ -255,7 +278,7 @@ def get_final_anat(): ), space="{space}", hemi="{hemi}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), space=crop_ref_spaces, hemi=config["hemi"], @@ -270,21 +293,21 @@ def get_final_qc(): if not template_modality == False: qc.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="qc", suffix="regqc.png", from_="{native_modality}", to=config["template"], - **config["subj_wildcards"], + **inputs.subj_wildcards, ), native_modality=template_modality, allow_missing=True, ) ) qc.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="qc", @@ -293,7 +316,7 @@ def get_final_qc(): space="{space}", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), hemi=config["hemi"], atlas=config["atlas"], @@ -302,7 +325,7 @@ def get_final_qc(): ) ) qc.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="qc", @@ -312,7 +335,7 @@ def get_final_qc(): space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), hemi=config["hemi"], autotop=config["autotop_labels"], @@ -323,7 +346,7 @@ def get_final_qc(): ) if len(config["hemi"]) == 2: qc.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="qc", @@ -331,7 +354,7 @@ def get_final_qc(): space="{space}", atlas="{atlas}", suffix="volumes.png", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), space=crop_ref_spaces, atlas=config["atlas"], @@ -341,14 +364,14 @@ def get_final_qc(): if (config["modality"] == "T1w") or (config["modality"] == "T2w"): if not config["use_template_seg"]: qc.extend( - expand( + inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="qc", desc="unetf3d", suffix="dice.tsv", hemi="{hemi}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ), hemi=config["hemi"], allow_missing=True, @@ -381,9 +404,16 @@ def get_final_output(): modality_key = get_modality_key(config["modality"]) # use a zip list for subject/session: - zip_list = config["input_zip_lists"][modality_key] + zip_list = inputs[modality_key].zip_lists if "session" in zip_list: - zip_list = snakebids.filter_list(zip_list, {"session": config["sessions"]}) + zip_list = snakebids.filter_list( + zip_list, + { + "session": inputs[get_modality_key(config["modality"])].zip_lists[ + "session" + ] + }, + ) final_output.extend( expand( @@ -429,17 +459,14 @@ if "corobl" in ref_spaces: def get_final_work_tar(): - return bids( - root=work, - suffix="work.tar.gz", - include_subject_dir=False, - include_session_dir=False, - **config["subj_wildcards"] - ) + bids = bids_factory(specs.v0_0_0(subject_dir=False, session_dir=False)) + return bids(root=work, suffix="work.tar.gz", **inputs.subj_wildcards) def get_work_dir(wildcards): - folder_with_file = expand(bids(root=work, **config["subj_wildcards"]), **wildcards) + folder_with_file = inputs[get_modality_key(config["modality"])].expand( + bids(root=work, **inputs.subj_wildcards), **wildcards + ) folder_without_file = os.path.dirname(folder_with_file[0]) return folder_without_file diff --git a/hippunfold/workflow/rules/gifti.smk b/hippunfold/workflow/rules/gifti.smk index 309e380e..884662c0 100644 --- a/hippunfold/workflow/rules/gifti.smk +++ b/hippunfold/workflow/rules/gifti.smk @@ -30,7 +30,7 @@ rule cp_template_to_unfold: space="unfold", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -69,7 +69,7 @@ rule calc_unfold_template_coords: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -101,7 +101,7 @@ rule constrain_surf_to_bbox: space="unfold", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), ref_nii=bids( root=root, @@ -109,7 +109,7 @@ rule constrain_surf_to_bbox: space="unfold", label="{autotop}", suffix="refvol.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -122,7 +122,7 @@ rule constrain_surf_to_bbox: unfoldreg="none", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), log: bids( @@ -132,7 +132,7 @@ rule constrain_surf_to_bbox: desc="constrainbbox", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -151,7 +151,7 @@ rule warp_gii_unfold2corobl1: warp=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="hipp", suffix="xfm.nii.gz", hemi="{hemi}", @@ -169,7 +169,7 @@ rule warp_gii_unfold2corobl1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), params: structure_type=lambda wildcards: hemi_to_structure[wildcards.hemi], @@ -186,7 +186,7 @@ rule warp_gii_unfold2corobl1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -211,7 +211,7 @@ rule correct_nan_vertices1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -223,7 +223,7 @@ rule correct_nan_vertices1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -245,7 +245,7 @@ rule calculate_surface_area1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -257,7 +257,7 @@ rule calculate_surface_area1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -280,7 +280,7 @@ rule calculate_gyrification1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), unfold_surfarea=os.path.join( workflow.basedir, @@ -299,7 +299,7 @@ rule calculate_gyrification1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), log: bids( @@ -310,7 +310,7 @@ rule calculate_gyrification1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -332,7 +332,7 @@ rule calculate_curvature_from_surface1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -345,7 +345,7 @@ rule calculate_curvature_from_surface1: hemi="{hemi}", desc="unnorm", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -367,7 +367,7 @@ rule normalize_curvature1: hemi="{hemi}", desc="unnorm", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -379,7 +379,7 @@ rule normalize_curvature1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -400,7 +400,7 @@ rule calculate_thickness_from_surface1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), outer=bids( root=work, @@ -411,7 +411,7 @@ rule calculate_thickness_from_surface1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -423,7 +423,7 @@ rule calculate_thickness_from_surface1: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -448,7 +448,7 @@ rule metric_to_nii: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), unfoldedsurf=bids( root=work, @@ -460,7 +460,7 @@ rule metric_to_nii: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), atlas_dir=Path(download_dir) / "atlas" / "multihist7", params: @@ -477,7 +477,7 @@ rule metric_to_nii: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -500,7 +500,7 @@ rule unfolded_registration: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), curvature=bids( root=work, @@ -511,7 +511,7 @@ rule unfolded_registration: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), gyrification=bids( root=work, @@ -522,7 +522,7 @@ rule unfolded_registration: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), atlas_dir=lambda wildcards: Path(download_dir) / "atlas" / wildcards.atlas, params: @@ -539,7 +539,7 @@ rule unfolded_registration: output: warp=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="SyN", @@ -551,7 +551,7 @@ rule unfolded_registration: ), invwarp=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="SyN", @@ -574,7 +574,7 @@ rule unfolded_registration: unfoldreg="{atlas}", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), shadow: "minimal" @@ -594,7 +594,7 @@ rule warp_gii_unfoldreg: invwarp=expand( bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="SyN", @@ -617,7 +617,7 @@ rule warp_gii_unfoldreg: unfoldreg="none", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -629,7 +629,7 @@ rule warp_gii_unfoldreg: space="unfold", hemi="{hemi}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -651,7 +651,7 @@ rule dentate_skip_unfoldreg: unfoldreg="none", hemi="{hemi}", label="dentate", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -663,7 +663,7 @@ rule dentate_skip_unfoldreg: space="unfold", hemi="{hemi}", label="dentate", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -688,7 +688,7 @@ def skip_unfoldreg_option(wildcards): unfoldreg="none", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ) else: gii = bids( @@ -700,7 +700,7 @@ def skip_unfoldreg_option(wildcards): space="unfold", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ) return gii @@ -711,7 +711,7 @@ rule warp_gii_unfold2corobl2: warp=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="{autotop}", suffix="xfm.nii.gz", hemi="{hemi}", @@ -734,7 +734,7 @@ rule warp_gii_unfold2corobl2: space="corobl", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -758,7 +758,7 @@ rule correct_nan_vertices2: space="corobl", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -769,7 +769,7 @@ rule correct_nan_vertices2: space="corobl", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -790,7 +790,7 @@ rule cp_corobl_root: space="corobl", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -801,7 +801,7 @@ rule cp_corobl_root: space="corobl", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -822,12 +822,12 @@ rule affine_gii_to_native: space="corobl", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), xfm=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="{native_modality}", to="corobl", @@ -843,7 +843,7 @@ rule affine_gii_to_native: space="{native_modality}", hemi="{hemi}", label="{autotop,hipp|dentate}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -864,7 +864,7 @@ rule calculate_surface_area2: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -875,7 +875,7 @@ rule calculate_surface_area2: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -897,7 +897,7 @@ rule calculate_gyrification2: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), unfold_surfarea=os.path.join( workflow.basedir, @@ -915,7 +915,7 @@ rule calculate_gyrification2: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), log: bids( @@ -925,7 +925,7 @@ rule calculate_gyrification2: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -946,7 +946,7 @@ rule calculate_curvature_from_surface2: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -958,7 +958,7 @@ rule calculate_curvature_from_surface2: hemi="{hemi}", desc="unnorm", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -979,7 +979,7 @@ rule normalize_curvature2: hemi="{hemi}", desc="unnorm", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -990,7 +990,7 @@ rule normalize_curvature2: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -1010,7 +1010,7 @@ rule calculate_thickness_from_surface2: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), outer=bids( root=root, @@ -1020,7 +1020,7 @@ rule calculate_thickness_from_surface2: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: gii=bids( @@ -1031,7 +1031,7 @@ rule calculate_thickness_from_surface2: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -1053,7 +1053,7 @@ rule resample_atlas_to_refvol: label="hipp", datatype="warps", suffix="refvol.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), atlas_dir=lambda wildcards: Path(download_dir) / "atlas" / wildcards.atlas, params: @@ -1068,7 +1068,7 @@ rule resample_atlas_to_refvol: hemi="{hemi}", label="hipp", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), log: bids( @@ -1078,7 +1078,7 @@ rule resample_atlas_to_refvol: hemi="{hemi}", label="hipp", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -1098,7 +1098,7 @@ rule nii_to_label_gii: hemi="{hemi}", label="hipp", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), surf=os.path.join( workflow.basedir, @@ -1122,7 +1122,7 @@ rule nii_to_label_gii: hemi="{hemi}", label="hipp", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -1157,7 +1157,7 @@ def get_inputs_cifti_metric(wildcards): space="{space}", hemi="L", label="{autotop}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ).format(**wildcards), ) if "R" in config["hemi"]: @@ -1170,7 +1170,7 @@ def get_inputs_cifti_metric(wildcards): space="{space}", hemi="R", label="{autotop}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ).format(**wildcards), ) return files @@ -1189,7 +1189,7 @@ rule create_dscalar_metric_cifti: suffix="{metric}.dscalar.nii", space="{space}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -1212,7 +1212,7 @@ def get_inputs_cifti_label(wildcards): space="{space}", hemi="L", label="hipp", - **config["subj_wildcards"], + **inputs.subj_wildcards, ).format(**wildcards), ) if "R" in config["hemi"]: @@ -1226,7 +1226,7 @@ def get_inputs_cifti_label(wildcards): space="{space}", hemi="R", label="hipp", - **config["subj_wildcards"], + **inputs.subj_wildcards, ).format(**wildcards), ) return files @@ -1255,7 +1255,7 @@ rule create_dlabel_cifti_subfields: suffix="subfields.dlabel.nii", space="{space}", label="hipp", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -1305,7 +1305,7 @@ rule cp_unfolded_noconstrain: space="unfold", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -1326,12 +1326,14 @@ rule create_spec_file_hipp: space="{space}", hemi="{hemi}", label="{label}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), metric=get_gifti_metric_types(wildcards.label), allow_missing=True, ), - subfields=lambda wildcards: expand( + subfields=lambda wildcards: inputs[ + get_modality_key(config["modality"]) + ].expand( bids( root=root, datatype="surf", @@ -1341,7 +1343,7 @@ rule create_spec_file_hipp: hemi="{hemi}", label="{label}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), atlas=config["atlas"], allow_missing=True, @@ -1355,13 +1357,15 @@ rule create_spec_file_hipp: space="{space}", hemi="{hemi}", label="{label}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), surfname=["midthickness"], space=["{space}", "unfold"], allow_missing=True, ), - cifti_metrics=lambda wildcards: expand( + cifti_metrics=lambda wildcards: inputs[ + get_modality_key(config["modality"]) + ].expand( bids( root=root, datatype="surf", @@ -1369,12 +1373,14 @@ rule create_spec_file_hipp: suffix="{cifti}.nii", space="{space}", label="{label}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), cifti=get_cifti_metric_types(wildcards.label), allow_missing=True, ), - cifti_labels=lambda wildcards: expand( + cifti_labels=lambda wildcards: inputs[ + get_modality_key(config["modality"]) + ].expand( bids( root=root, datatype="surf", @@ -1383,7 +1389,7 @@ rule create_spec_file_hipp: atlas="{atlas}", space="{space}", label="{label}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), atlas=config["atlas"], allow_missing=True, @@ -1399,7 +1405,7 @@ rule create_spec_file_hipp: hemi="{hemi,L|R}", space="{space}", label="{label,hipp}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -1420,7 +1426,7 @@ rule create_spec_file_dentate: space="{space}", hemi="{hemi}", label="{label}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), metric=get_gifti_metric_types(wildcards.label), allow_missing=True, @@ -1434,7 +1440,7 @@ rule create_spec_file_dentate: space="{space}", hemi="{hemi}", label="{label}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), surfname=["midthickness"], space=["{space}", "unfold"], @@ -1448,7 +1454,7 @@ rule create_spec_file_dentate: suffix="{cifti}.nii", space="{space}", label="{label}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), cifti=get_cifti_metric_types(wildcards.label), allow_missing=True, @@ -1464,7 +1470,7 @@ rule create_spec_file_dentate: hemi="{hemi,L|R}", space="{space}", label="{label,dentate}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -1485,7 +1491,7 @@ rule merge_lr_spec_file: hemi="{hemi}", space="{space}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), hemi=["L", "R"], allow_missing=True, @@ -1498,7 +1504,7 @@ rule merge_lr_spec_file: space="{space}", suffix="surfaces.spec", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] diff --git a/hippunfold/workflow/rules/myelin_map.smk b/hippunfold/workflow/rules/myelin_map.smk index 057e3ffb..573580fd 100644 --- a/hippunfold/workflow/rules/myelin_map.smk +++ b/hippunfold/workflow/rules/myelin_map.smk @@ -8,7 +8,7 @@ rule divide_t1_by_t2: space="corobl", desc="preproc", suffix="T1w.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), t2=bids( root=work, @@ -17,7 +17,7 @@ rule divide_t1_by_t2: space="corobl", desc="preproc", suffix="T2w.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: t1overt2=bids( @@ -27,7 +27,7 @@ rule divide_t1_by_t2: space="corobl", desc="preproc", suffix="T1wDividedByT2w.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -48,7 +48,7 @@ rule create_ribbon: space="{space}", desc="laplace", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: ribbon=bids( @@ -59,7 +59,7 @@ rule create_ribbon: space="{space}", desc="ribbon", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -80,7 +80,7 @@ rule sample_myelin_map_surf: hemi="{hemi}", desc="preproc", suffix="T1wDividedByT2w.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), mid=bids( root=root, @@ -90,7 +90,7 @@ rule sample_myelin_map_surf: space="corobl", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), inner=bids( root=root, @@ -100,7 +100,7 @@ rule sample_myelin_map_surf: space="corobl", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), outer=bids( root=root, @@ -110,7 +110,7 @@ rule sample_myelin_map_surf: space="corobl", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), ribbon=bids( root=work, @@ -120,7 +120,7 @@ rule sample_myelin_map_surf: space="corobl", desc="ribbon", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: metric=bids( @@ -131,7 +131,7 @@ rule sample_myelin_map_surf: space="{space}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" diff --git a/hippunfold/workflow/rules/nnunet.smk b/hippunfold/workflow/rules/nnunet.smk index ab21a4b0..ae65a5fa 100644 --- a/hippunfold/workflow/rules/nnunet.smk +++ b/hippunfold/workflow/rules/nnunet.smk @@ -29,6 +29,7 @@ def get_nnunet_input(wildcards): return T2w_nii elif config["modality"] == "T1w": return T1w_nii + elif config["modality"] == "hippb500": return bids( root=work, @@ -36,7 +37,7 @@ def get_nnunet_input(wildcards): hemi="{hemi}", space="corobl", suffix="b500.nii.gz", - **config["subj_wildcards"], + **inputs.subj_wildcards, ) else: raise ValueError("modality not supported for nnunet!") @@ -129,7 +130,7 @@ rule run_inference: nnunet_seg=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="nnunet", space="corobl", @@ -138,7 +139,7 @@ rule run_inference: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="nnunet.txt", space="corobl", hemi="{hemi,Lflip|R}" @@ -177,7 +178,7 @@ rule unflip_nnunet_nii: nnunet_seg=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="nnunet", space="corobl", @@ -187,7 +188,7 @@ rule unflip_nnunet_nii: bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="{modality}.nii.gz".format(modality=config["modality"]), space="corobl", desc="preproc", @@ -198,7 +199,7 @@ rule unflip_nnunet_nii: nnunet_seg=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="nnunet", space="corobl", @@ -233,7 +234,7 @@ rule qc_nnunet_f3d: bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="{modality}.nii.gz".format(modality=config["modality"]), space="corobl", desc="preproc", @@ -243,7 +244,7 @@ rule qc_nnunet_f3d: seg=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="nnunet", space="corobl", @@ -256,7 +257,7 @@ rule qc_nnunet_f3d: cpp=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="cpp.nii.gz", desc="f3d", space="corobl", @@ -265,7 +266,7 @@ rule qc_nnunet_f3d: res=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="{modality}.nii.gz".format(modality=config["modality"]), desc="f3d", space="template", @@ -274,7 +275,7 @@ rule qc_nnunet_f3d: res_mask=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="mask.nii.gz", desc="f3d", space="template", @@ -285,7 +286,7 @@ rule qc_nnunet_f3d: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="qcreg.txt", desc="f3d", space="corobl", @@ -303,7 +304,7 @@ rule qc_nnunet_dice: res_mask=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="mask.nii.gz", desc="f3d", space="template", @@ -326,7 +327,7 @@ rule qc_nnunet_dice: suffix="dice.tsv", desc="unetf3d", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), caption="../report/nnunet_qc.rst", category="Segmentation QC", diff --git a/hippunfold/workflow/rules/preproc_cropseg.smk b/hippunfold/workflow/rules/preproc_cropseg.smk index 7e73dd28..aface7f0 100644 --- a/hippunfold/workflow/rules/preproc_cropseg.smk +++ b/hippunfold/workflow/rules/preproc_cropseg.smk @@ -1,11 +1,12 @@ + rule import_cropseg: input: - config["input_path"]["cropseg"], + in_img=partial(get_single_bids_input, component="cropseg"), output: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", space="corobl", hemi="{hemi,L|R}" @@ -23,7 +24,7 @@ rule lr_flip_seg: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", space="corobl", hemi="{hemi}" @@ -32,7 +33,7 @@ rule lr_flip_seg: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", space="corobl", hemi="{hemi,L}flip" diff --git a/hippunfold/workflow/rules/preproc_hippb500.smk b/hippunfold/workflow/rules/preproc_hippb500.smk index 2bdacb2a..1f07a2ee 100644 --- a/hippunfold/workflow/rules/preproc_hippb500.smk +++ b/hippunfold/workflow/rules/preproc_hippb500.smk @@ -7,7 +7,7 @@ rule resample_hippdwi_to_template: bounding boxes, and keep all Z slices (since is Z is smaller than in template). """ input: - b500=config["input_path"]["hippb500"], + b500=inputs["hippb500"].path, params: resample_dim=config["hippdwi_opts"]["resample_dim"], bbox_x=lambda wildcards: config["hippdwi_opts"]["bbox_x"][wildcards.hemi], @@ -19,7 +19,7 @@ rule resample_hippdwi_to_template: hemi="{hemi,L|R}", space="corobl", suffix="b500.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -40,7 +40,7 @@ rule lr_flip_b500: nii=bids( root=work, datatype="dwi", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="b500.nii.gz", space="corobl", hemi="{hemi}" @@ -49,7 +49,7 @@ rule lr_flip_b500: nii=bids( root=work, datatype="dwi", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="b500.nii.gz", space="corobl", hemi="{hemi,L}flip" @@ -67,7 +67,7 @@ rule cp_b500_to_anat_dir: nii=bids( root=work, datatype="dwi", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="b500.nii.gz", space="corobl", hemi="{hemi}" @@ -80,7 +80,7 @@ rule cp_b500_to_anat_dir: suffix="hippb500.nii.gz", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" diff --git a/hippunfold/workflow/rules/preproc_seg.smk b/hippunfold/workflow/rules/preproc_seg.smk index 1bfbcf86..fbb221cb 100644 --- a/hippunfold/workflow/rules/preproc_seg.smk +++ b/hippunfold/workflow/rules/preproc_seg.smk @@ -1,17 +1,8 @@ rule import_seg: input: - lambda wildcards: expand( - config["input_path"]["seg"], - zip, - **snakebids.filter_list(config["input_zip_lists"]["seg"], wildcards) - )[0], + in_img=partial(get_single_bids_input, component="seg"), output: - bids( - root=work, - datatype="anat", - **config["input_wildcards"]["seg"], - suffix="dseg.nii.gz" - ), + bids(root=work, datatype="anat", **inputs.subj_wildcards, suffix="dseg.nii.gz"), group: "subj" container: @@ -24,15 +15,12 @@ rule import_seg: rule warp_seg_to_corobl_crop: input: nii=bids( - root=work, - datatype="anat", - **config["input_wildcards"]["seg"], - suffix="dseg.nii.gz" + root=work, datatype="anat", **inputs.subj_wildcards, suffix="dseg.nii.gz" ), xfm=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="{space}", to="corobl", @@ -47,7 +35,7 @@ rule warp_seg_to_corobl_crop: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", space="corobl", hemi="{hemi,L|R}", @@ -67,7 +55,7 @@ rule lr_flip_seg: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", space="corobl", hemi="{hemi}", @@ -77,7 +65,7 @@ rule lr_flip_seg: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", space="corobl", hemi="{hemi,L}flip", diff --git a/hippunfold/workflow/rules/preproc_t1.smk b/hippunfold/workflow/rules/preproc_t1.smk index 038b0dfb..334f7fe8 100644 --- a/hippunfold/workflow/rules/preproc_t1.smk +++ b/hippunfold/workflow/rules/preproc_t1.smk @@ -2,18 +2,11 @@ ruleorder: compose_template_xfm_corobl > convert_template_xfm_ras2itk rule import_t1: - """Note: this rule only grabs the first T1w - TODO: add motion-corrected averaging, like we do for T2w""" + """TODO: add motion-corrected averaging, like we do for T2w""" input: - lambda wildcards: expand( - config["input_path"]["T1w"], - zip, - **snakebids.filter_list(config["input_zip_lists"]["T1w"], wildcards) - )[0], + in_img=partial(get_single_bids_input, component="T1w"), output: - bids( - root=work, datatype="anat", **config["subj_wildcards"], suffix="T1w.nii.gz" - ), + bids(root=work, datatype="anat", **inputs.subj_wildcards, suffix="T1w.nii.gz"), group: "subj" shell: @@ -24,16 +17,12 @@ if config["skip_preproc"]: rule import_preproc_t1: input: - lambda wildcards: expand( - config["input_path"]["T1w"], - zip, - **snakebids.filter_list(config["input_zip_lists"]["T1w"], wildcards) - )[0], + in_img=partial(get_single_bids_input, component="T1w"), output: bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T1w.nii.gz", desc="preproc" ), @@ -49,14 +38,14 @@ else: t1=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T1w.nii.gz" ), output: t1=bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, desc="preproc", suffix="T1w.nii.gz" ), @@ -70,218 +59,20 @@ else: "N4BiasFieldCorrection -d 3 -i {input.t1} -o {output}" -def reg_to_template_cmd(wildcards, input, output): - ref = str( - Path(input.template_dir) - / config["template_files"][config["template"]][wildcards.modality].format( - **wildcards - ), - ) - if config["no_reg_template"]: - cmd = f"reg_resample -flo {input.flo} -ref {ref} -res {output.warped_subj} -aff {input.xfm_identity}; cp {input.xfm_identity} {output.xfm_ras}" - elif config["rigid_reg_template"]: - cmd = f"reg_aladin -flo {input.flo} -ref {ref} -res {output.warped_subj} -aff {output.xfm_ras} -rigOnly" - else: - cmd = f"reg_aladin -flo {input.flo} -ref {ref} -res {output.warped_subj} -aff {output.xfm_ras}" - return cmd - - -rule reg_to_template: - """ generic for T1w or T2w right now """ - input: - flo=bids( - root=root, - datatype="anat", - **config["subj_wildcards"], - desc="preproc", - suffix="{modality}.nii.gz" - ), - xfm_identity=os.path.join(workflow.basedir, "..", config["xfm_identity"]), - template_dir=Path(download_dir) / "template" / config["template"], - params: - cmd=reg_to_template_cmd, - output: - warped_subj=bids( - root=work, - datatype="anat", - **config["subj_wildcards"], - suffix="{modality,T1w|T2w}.nii.gz", - space=config["template"], - desc="affine" - ), - xfm_ras=bids( - root=work, - datatype="warps", - **config["subj_wildcards"], - suffix="xfm.txt", - from_="{modality,T1w|T2w}", - to=config["template"], - desc="affine", - type_="ras" - ), - log: - bids( - root="logs", - **config["subj_wildcards"], - suffix="reg.txt", - from_="{modality,T1w|T2w}", - to=config["template"], - desc="affine", - type_="ras" - ), - container: - config["singularity"]["autotop"] - group: - "subj" - shell: - "{params.cmd}" - - -rule convert_template_xfm_ras2itk: - input: - bids( - root=work, - datatype="warps", - **config["subj_wildcards"], - suffix="xfm.txt", - from_="{reg_suffix}", - to=config["template"], - desc="affine", - type_="ras" - ), - output: - bids( - root=work, - datatype="warps", - **config["subj_wildcards"], - suffix="xfm.txt", - from_="{reg_suffix}", - to=config["template"], - desc="affine", - type_="itk" - ), - container: - config["singularity"]["autotop"] - group: - "subj" - shell: - "c3d_affine_tool {input} -oitk {output}" - - -# now have subject -> template transform, can compose that with template -> corobl to get subject -> corobl -rule compose_template_xfm_corobl: - input: - sub_to_std=bids( - root=work, - datatype="warps", - **config["subj_wildcards"], - suffix="xfm.txt", - from_="T1w", - to=config["template"], - desc="affine", - type_="itk" - ), - template_dir=Path(download_dir) / "template" / config["template"], - params: - std_to_cor=lambda wildcards, input: Path(input.template_dir) - / config["template_files"][config["template"]]["xfm_corobl"].format( - **wildcards - ), - output: - sub_to_cor=bids( - root=work, - datatype="warps", - **config["subj_wildcards"], - suffix="xfm.txt", - from_="T1w", - to="corobl", - desc="affine", - type_="itk" - ), - container: - config["singularity"]["autotop"] - group: - "subj" - shell: - "c3d_affine_tool -itk {input.sub_to_std} -itk {params.std_to_cor} -mult -oitk {output}" - - -rule invert_template_xfm_itk2ras: - input: - xfm_ras=bids( - root=work, - datatype="warps", - **config["subj_wildcards"], - suffix="xfm.txt", - from_="T1w", - to="corobl", - desc="affine", - type_="itk" - ), - output: - xfm_ras=bids( - root=work, - datatype="warps", - **config["subj_wildcards"], - suffix="xfm.txt", - from_="T1w", - to="corobl", - desc="affineInverse", - type_="ras" - ), - container: - config["singularity"]["autotop"] - group: - "subj" - shell: - "c3d_affine_tool -itk {input} -inv -o {output}" - - -rule template_xfm_itk2ras: - input: - xfm_ras=bids( - root=work, - datatype="warps", - **config["subj_wildcards"], - suffix="xfm.txt", - from_="{native_modality}", - to="corobl", - desc="affine", - type_="itk" - ), - output: - xfm_ras=bids( - root=work, - datatype="warps", - **config["subj_wildcards"], - suffix="xfm.txt", - from_="{native_modality,T1w|T2w}", - to="corobl", - desc="affine", - type_="ras" - ), - container: - config["singularity"]["autotop"] - group: - "subj" - shell: - "c3d_affine_tool -itk {input} -o {output}" - - # apply transform to get subject in corobl cropped space rule warp_t1_to_corobl_crop: input: t1=bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, desc="preproc", suffix="T1w.nii.gz" ), xfm=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T1w", to="corobl", @@ -298,7 +89,7 @@ rule warp_t1_to_corobl_crop: t1=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T1w.nii.gz", space="corobl", desc="preproc", @@ -318,7 +109,7 @@ rule lr_flip_t1: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T1w.nii.gz", space="corobl", desc="{desc}", @@ -328,7 +119,7 @@ rule lr_flip_t1: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T1w.nii.gz", space="corobl", desc="{desc}", diff --git a/hippunfold/workflow/rules/preproc_t2.smk b/hippunfold/workflow/rules/preproc_t2.smk index a05246a7..5b6b066a 100644 --- a/hippunfold/workflow/rules/preproc_t2.smk +++ b/hippunfold/workflow/rules/preproc_t2.smk @@ -1,12 +1,12 @@ rule import_t2: input: - config["input_path"]["T2w"], + inputs["T2w"].path, output: bids( root=work, datatype="anat", - **config["input_wildcards"]["T2w"], - suffix="T2w.nii.gz" + suffix="T2w.nii.gz", + **inputs["T2w"].wildcards, ), group: "subj" @@ -19,16 +19,16 @@ rule n4_t2: bids( root=work, datatype="anat", - **config["input_wildcards"]["T2w"], - suffix="T2w.nii.gz" + suffix="T2w.nii.gz", + **inputs["T2w"].wildcards, ), output: bids( root=work, datatype="anat", - **config["input_wildcards"]["T2w"], + desc="n4", suffix="T2w.nii.gz", - desc="n4" + **inputs["T2w"].wildcards, ), threads: 8 container: @@ -42,31 +42,36 @@ rule n4_t2: def get_ref_n4_t2(wildcards): # get the first image - t2_imgs = expand( - bids( - root=work, - datatype="anat", - **config["input_wildcards"]["T2w"], - suffix="T2w.nii.gz", - desc="n4" - ), - zip, - **snakebids.filter_list(config["input_zip_lists"]["T2w"], wildcards) + t2_imgs = ( + inputs["T2w"] + .filter(**wildcards) + .expand( + bids( + root=work, + datatype="anat", + desc="n4", + suffix="T2w.nii.gz", + **inputs["T2w"].wildcards, + ) + ) ) + return t2_imgs[0] def get_floating_n4_t2(wildcards): - t2_imgs = expand( - bids( - root=work, - datatype="anat", - **config["input_wildcards"]["T2w"], - suffix="T2w.nii.gz", - desc="n4" - ), - zip, - **snakebids.filter_list(config["input_zip_lists"]["T2w"], wildcards) + t2_imgs = ( + inputs["T2w"] + .filter(**wildcards) + .expand( + bids( + root=work, + datatype="anat", + suffix="T2w.nii.gz", + desc="n4", + **inputs["T2w"].wildcards, + ), + ) ) return t2_imgs[int(wildcards.idx)] @@ -79,7 +84,7 @@ rule reg_t2_to_ref: xfm_ras=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T2w{idx}", to="T2w0", @@ -89,7 +94,7 @@ rule reg_t2_to_ref: xfm_itk=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T2w{idx}", to="T2w0", @@ -99,10 +104,10 @@ rule reg_t2_to_ref: warped=bids( root=work, datatype="anat", - **config["subj_wildcards"], suffix="T2w.nii.gz", desc="aligned", - floating="{idx}" + floating="{idx}", + **inputs.subj_wildcards, ), container: config["singularity"]["autotop"] @@ -115,40 +120,38 @@ rule reg_t2_to_ref: def get_aligned_n4_t2(wildcards): # first get the number of floating t2s - filtered = snakebids.filter_list(config["input_zip_lists"]["T2w"], wildcards) - num_scans = len(filtered["subject"]) + num_scans = len(inputs["T2w"].filter(**wildcards).expand()) # then, return the path, expanding over range(1,num_scans) -i.e excludes 0 (ref image) - t2_imgs = expand( - bids( - root=work, - datatype="anat", - **config["subj_wildcards"], - suffix="T2w.nii.gz", - desc="aligned", - floating="{idx}" - ), - **wildcards, - idx=range(1, num_scans) + t2_imgs = ( + inputs["T2w"] + .filter(**wildcards) + .expand( + bids( + root=work, + datatype="anat", + desc="aligned", + floating="{idx}", + suffix="T2w.nii.gz", + **inputs.subj_wildcards, + ), + idx=range(1, num_scans), + ) ) return t2_imgs if config["skip_preproc"]: - # grabs the first t2w only + # for preproc T2, we expect the user to use bids filters/wildcards to ensure only 1 T1w is matched per subject rule import_preproc_t2: input: - lambda wildcards: expand( - config["input_path"]["T2w"], - zip, - **snakebids.filter_list(config["input_zip_lists"]["T2w"], wildcards) - )[0], + lambda wildcards: inputs["T2w"].filter(**wildcards).expand()[0], output: bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T2w.nii.gz", desc="preproc" ), @@ -170,7 +173,7 @@ else: bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T2w.nii.gz", desc="preproc" ), @@ -187,14 +190,14 @@ rule reg_t2_to_t1: flo=bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T2w.nii.gz", desc="preproc" ), ref=bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, desc="preproc", suffix="T1w.nii.gz" ), @@ -202,7 +205,7 @@ rule reg_t2_to_t1: warped=bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T2w.nii.gz", desc="preproc", space="T1w" @@ -210,7 +213,7 @@ rule reg_t2_to_t1: xfm_ras=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T2w", to="T1w", @@ -220,7 +223,7 @@ rule reg_t2_to_t1: xfm_itk=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T2w", to="T1w", @@ -230,7 +233,7 @@ rule reg_t2_to_t1: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="reg.txt", from_="T2w", to="T1w", @@ -254,7 +257,7 @@ def get_inputs_compose_t2_xfm_corobl(wildcards): bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T2w", to="T1w", @@ -266,7 +269,7 @@ def get_inputs_compose_t2_xfm_corobl(wildcards): bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T1w", to="corobl", @@ -282,7 +285,7 @@ def get_inputs_compose_t2_xfm_corobl(wildcards): bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T2w", to=config["template"], @@ -323,7 +326,7 @@ rule compose_t2_xfm_corobl: t2_to_cor=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T2w", to="corobl", @@ -333,7 +336,7 @@ rule compose_t2_xfm_corobl: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="composecorobl.txt", from_="T2w", to="corobl", @@ -354,7 +357,7 @@ def get_xfm_to_corobl(): xfm = bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T1w", to="corobl", @@ -366,7 +369,7 @@ def get_xfm_to_corobl(): bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T2w", to="corobl", @@ -383,7 +386,7 @@ rule warp_t2_to_corobl_crop: nii=bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T2w.nii.gz", desc="preproc" ), @@ -396,7 +399,7 @@ rule warp_t2_to_corobl_crop: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T2w.nii.gz", space="corobl", desc="preproc", @@ -416,7 +419,7 @@ rule lr_flip_t2: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T2w.nii.gz", space="corobl", desc="{desc}", @@ -426,7 +429,7 @@ rule lr_flip_t2: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T2w.nii.gz", space="corobl", desc="{desc}", diff --git a/hippunfold/workflow/rules/qc.smk b/hippunfold/workflow/rules/qc.smk index 076fd9aa..6dbeb1ae 100644 --- a/hippunfold/workflow/rules/qc.smk +++ b/hippunfold/workflow/rules/qc.smk @@ -3,7 +3,7 @@ rule qc_reg_to_template: flo=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="{native_modality}.nii.gz", space=config["template"], desc="affine" @@ -21,7 +21,7 @@ rule qc_reg_to_template: bids( root=root, datatype="qc", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="regqc.png", from_="{native_modality}", to=config["template"] @@ -40,10 +40,10 @@ rule qc_reg_to_template: rule get_subfield_vols_subj: """Export segmentation volume for a subject to TSV""" input: - segs=expand( + segs=inputs[get_modality_key(config["modality"])].expand( bids( root=root, - **config["subj_wildcards"], + **inputs.subj_wildcards, datatype="anat", hemi="{hemi}", space="{crop_ref_spaces}", @@ -68,7 +68,7 @@ rule get_subfield_vols_subj: desc="subfields", atlas="{atlas}", suffix="volumes.tsv", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -85,7 +85,7 @@ rule plot_subj_subfields: desc="subfields", atlas="{atlas}", suffix="volumes.tsv", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: png=report( @@ -96,7 +96,7 @@ rule plot_subj_subfields: desc="subfields", atlas="{atlas}", suffix="volumes.png", - **config["subj_wildcards"] + **inputs.subj_wildcards ), caption="../report/subj_volume_plot.rst", category="Subfield Volumes", @@ -118,7 +118,7 @@ def get_bg_img_for_subfield_qc(wildcards): suffix="hippb500.nii.gz", space="{space}", hemi="{hemi}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ) elif config["modality"] == "cropseg": # blank image as bg @@ -128,7 +128,7 @@ def get_bg_img_for_subfield_qc(wildcards): suffix="cropref.nii.gz", space="{space}", hemi="{hemi}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ) elif config["modality"][:3] == "seg": @@ -140,7 +140,7 @@ def get_bg_img_for_subfield_qc(wildcards): suffix=f"{bg_modality}.nii.gz", space="{space}", hemi="{hemi}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ) else: @@ -152,7 +152,7 @@ def get_bg_img_for_subfield_qc(wildcards): suffix=f"{bg_modality}.nii.gz", space="{space}", hemi="{hemi}", - **config["subj_wildcards"], + **inputs.subj_wildcards, ) @@ -167,7 +167,7 @@ rule qc_subfield: space="{space}", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: png=report( @@ -179,7 +179,7 @@ rule qc_subfield: space="{space}", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), caption="../report/subfield_qc.rst", category="Segmentation QC", @@ -202,7 +202,7 @@ rule qc_subfield_surf: space="{ref_spaces}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: png=report( @@ -215,7 +215,7 @@ rule qc_subfield_surf: space="{ref_spaces}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), caption="../report/subfield_qc.rst", category="Segmentation QC", @@ -231,7 +231,7 @@ rule qc_subfield_surf: rule concat_subj_vols_tsv: """Concatenate all subject tsv files into a single tsv""" input: - tsv=lambda wildcards: expand( + tsv=lambda wildcards: inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="anat", @@ -239,12 +239,10 @@ rule concat_subj_vols_tsv: space="{space}", atlas="{atlas}", suffix="volumes.tsv", - **config["subj_wildcards"] + **inputs.subj_wildcards ), - subject=config["input_lists"][get_modality_key(config["modality"])][ - "subject" - ], - session=config["sessions"], + subject=inputs[get_modality_key(config["modality"])].zip_lists["subject"], + session=inputs[get_modality_key(config["modality"])].zip_lists["session"], space=wildcards.space, atlas=wildcards.atlas, ), diff --git a/hippunfold/workflow/rules/resample_final_to_crop_native.smk b/hippunfold/workflow/rules/resample_final_to_crop_native.smk index 417ae5ce..04e04ba2 100644 --- a/hippunfold/workflow/rules/resample_final_to_crop_native.smk +++ b/hippunfold/workflow/rules/resample_final_to_crop_native.smk @@ -2,7 +2,7 @@ rule create_native_crop_ref: """Create ref space for hires crop in native space TODO: expose the resampling factor and size as cmd line args""" input: - seg=expand( + seg=inputs[get_modality_key(config["modality"])].expand( bids( root=root, datatype="anat", @@ -11,7 +11,7 @@ rule create_native_crop_ref: space="{native_modality}", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), atlas=config["atlas"][0], allow_missing=True, @@ -26,7 +26,7 @@ rule create_native_crop_ref: suffix="cropref.nii.gz", space="{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -41,7 +41,7 @@ rule resample_unet_native_crop: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="nnunet", space="corobl", @@ -50,7 +50,7 @@ rule resample_unet_native_crop: xfm=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="{native_modality}", to="corobl", @@ -63,7 +63,7 @@ rule resample_unet_native_crop: suffix="cropref.nii.gz", space="{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: nii=bids( @@ -73,7 +73,7 @@ rule resample_unet_native_crop: desc="unet", space="crop{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -89,7 +89,7 @@ rule resample_postproc_native_crop: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="postproc", space="corobl", @@ -98,7 +98,7 @@ rule resample_postproc_native_crop: xfm=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="{native_modality}", to="corobl", @@ -111,7 +111,7 @@ rule resample_postproc_native_crop: suffix="cropref.nii.gz", space="{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: nii=bids( @@ -121,7 +121,7 @@ rule resample_postproc_native_crop: desc="postproc", space="crop{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -142,12 +142,12 @@ rule resample_subfields_native_crop: space="corobl", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), xfm=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="{native_modality}", to="corobl", @@ -160,7 +160,7 @@ rule resample_subfields_native_crop: suffix="cropref.nii.gz", space="{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: nii=bids( @@ -171,7 +171,7 @@ rule resample_subfields_native_crop: space="crop{native_modality}", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -193,12 +193,12 @@ rule resample_coords_native_crop: desc="{desc}", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), xfm=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="{native_modality}", to="corobl", @@ -211,7 +211,7 @@ rule resample_coords_native_crop: suffix="cropref.nii.gz", space="{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: nii=bids( @@ -223,7 +223,7 @@ rule resample_coords_native_crop: space="crop{native_modality}", hemi="{hemi}", label="{autotop}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -239,7 +239,7 @@ rule resample_native_to_crop: nii=bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, desc="preproc", suffix="{native_modality}.nii.gz" ), @@ -249,7 +249,7 @@ rule resample_native_to_crop: suffix="cropref.nii.gz", space="{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: nii=bids( @@ -259,7 +259,7 @@ rule resample_native_to_crop: suffix="{native_modality}.nii.gz", space="crop{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -277,7 +277,7 @@ def get_xfm_t2_to_t1(): xfm = bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="T2w", to="{native_modality}", @@ -292,7 +292,7 @@ rule resample_t2_to_crop: nii=bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="T2w.nii.gz", desc="preproc" ), @@ -302,7 +302,7 @@ rule resample_t2_to_crop: suffix="cropref.nii.gz", space="{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), xfm=get_xfm_t2_to_t1(), params: @@ -317,7 +317,7 @@ rule resample_t2_to_crop: suffix="T2w.nii.gz", space="crop{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] diff --git a/hippunfold/workflow/rules/shape_inject.smk b/hippunfold/workflow/rules/shape_inject.smk index 635333a1..2851fe7a 100644 --- a/hippunfold/workflow/rules/shape_inject.smk +++ b/hippunfold/workflow/rules/shape_inject.smk @@ -36,7 +36,7 @@ def get_input_for_shape_inject(wildcards): seg = bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", space="corobl", hemi="{hemi}", @@ -47,7 +47,7 @@ def get_input_for_shape_inject(wildcards): bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", space="corobl", hemi="{hemi}", @@ -58,7 +58,7 @@ def get_input_for_shape_inject(wildcards): seg = bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="nnunet", space="corobl", @@ -72,7 +72,7 @@ def get_input_splitseg_for_shape_inject(wildcards): seg = bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dsegsplit", space="corobl", hemi="{hemi}", @@ -83,7 +83,7 @@ def get_input_splitseg_for_shape_inject(wildcards): seg = bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dsegsplit", space="corobl", hemi="{hemi}", @@ -93,7 +93,7 @@ def get_input_splitseg_for_shape_inject(wildcards): seg = bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dsegsplit", desc="nnunet", space="corobl", @@ -132,7 +132,7 @@ rule import_template_shape: root=work, datatype="anat", space="template", - **config["subj_wildcards"], + **inputs.subj_wildcards, desc="hipptissue", hemi=hemi_constrained_wildcard, suffix="dseg.nii.gz" @@ -196,7 +196,7 @@ rule template_shape_reg: root=work, datatype="anat", space="template", - **config["subj_wildcards"], + **inputs.subj_wildcards, desc="hipptissue", hemi="{hemi}", suffix="dsegsplit" @@ -210,7 +210,7 @@ rule template_shape_reg: output: matrix=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", datatype="warps", desc="moments", @@ -222,7 +222,7 @@ rule template_shape_reg: ), warp=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="greedy", @@ -239,7 +239,7 @@ rule template_shape_reg: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, hemi=hemi_constrained_wildcard, suffix="templateshapereg.txt" ), @@ -255,7 +255,7 @@ rule template_shape_inject: root=work, datatype="anat", space="template", - **config["subj_wildcards"], + **inputs.subj_wildcards, desc="hipptissue", hemi="{hemi}", suffix="dseg.nii.gz" @@ -263,7 +263,7 @@ rule template_shape_inject: subject_seg=get_input_for_shape_inject, matrix=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", datatype="warps", desc="moments", @@ -275,7 +275,7 @@ rule template_shape_inject: ), warp=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="greedy", @@ -290,7 +290,7 @@ rule template_shape_inject: inject_seg=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="inject", space="corobl", @@ -299,7 +299,7 @@ rule template_shape_inject: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="templateshapeinject.txt", hemi=hemi_constrained_wildcard, ), @@ -317,7 +317,7 @@ rule inject_init_laplace_coords: subject_seg=get_input_for_shape_inject, matrix=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", datatype="warps", desc="moments", @@ -329,7 +329,7 @@ rule inject_init_laplace_coords: ), warp=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="greedy", @@ -349,7 +349,7 @@ rule inject_init_laplace_coords: init_coords=bids( root=work, datatype="coords", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", label="{autotop}", suffix="coords.nii.gz", @@ -360,7 +360,7 @@ rule inject_init_laplace_coords: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", label="{autotop}", suffix="injectcoords.txt", @@ -382,7 +382,7 @@ rule unflip_init_coords: nnunet_seg=bids( root=work, datatype="coords", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", label="{autotop}", suffix="coords.nii.gz", @@ -395,7 +395,7 @@ rule unflip_init_coords: nnunet_seg=bids( root=work, datatype="coords", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", label="{autotop}", suffix="coords.nii.gz", @@ -417,7 +417,7 @@ rule reinsert_subject_labels: inject_seg=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="inject", space="corobl", @@ -432,7 +432,7 @@ rule reinsert_subject_labels: postproc_seg=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="postproc", space="corobl", @@ -455,7 +455,7 @@ rule unflip_postproc: desc="postproc", space="corobl", hemi="{hemi}flip", - **config["subj_wildcards"] + **inputs.subj_wildcards ), unflip_ref=get_input_for_shape_inject, output: @@ -466,7 +466,7 @@ rule unflip_postproc: desc="postproc", space="corobl", hemi="{hemi,L|R}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] diff --git a/hippunfold/workflow/rules/subfields.smk b/hippunfold/workflow/rules/subfields.smk index 7a3397b6..229b5b87 100644 --- a/hippunfold/workflow/rules/subfields.smk +++ b/hippunfold/workflow/rules/subfields.smk @@ -9,11 +9,11 @@ rule resample_unfoldreg_subfields: hemi="{hemi}", label="hipp", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), warp=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="SyN", @@ -32,7 +32,7 @@ rule resample_unfoldreg_subfields: hemi="{hemi}", label="hipp", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -57,7 +57,7 @@ def skip_unfoldreg_option_subfields(wildcards): hemi="{hemi}", label="hipp", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ) else: label_nii = bids( @@ -68,7 +68,7 @@ def skip_unfoldreg_option_subfields(wildcards): hemi="{hemi}", label="hipp", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ) return label_nii @@ -86,7 +86,7 @@ rule label_subfields_from_vol_coords_corobl: desc="laplace", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), nii_pd=bids( root=work, @@ -97,7 +97,7 @@ rule label_subfields_from_vol_coords_corobl: desc="laplace", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), nii_io=get_laminar_coords, labelmap=get_labels_for_laplace, @@ -112,7 +112,7 @@ rule label_subfields_from_vol_coords_corobl: space="corobl", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -154,7 +154,7 @@ rule combine_tissue_subfield_labels_corobl: space="corobl", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), params: remap=get_tissue_atlas_remapping, @@ -167,7 +167,7 @@ rule combine_tissue_subfield_labels_corobl: space="corobl", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -188,12 +188,12 @@ rule resample_subfields_to_native: space="corobl", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), xfm=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="{native_modality}", to="corobl", @@ -203,7 +203,7 @@ rule resample_subfields_to_native: ref=bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, desc="preproc", suffix="{native_modality}.nii.gz" ), @@ -216,7 +216,7 @@ rule resample_subfields_to_native: space="{native_modality,T1w|T2w}", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -233,7 +233,7 @@ rule resample_postproc_to_native: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="postproc", space="corobl", @@ -242,7 +242,7 @@ rule resample_postproc_to_native: xfm=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="{native_modality}", to="corobl", @@ -252,7 +252,7 @@ rule resample_postproc_to_native: ref=bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, desc="preproc", suffix="{native_modality}.nii.gz" ), @@ -264,7 +264,7 @@ rule resample_postproc_to_native: desc="postproc", space="{native_modality,T2w|T2w}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -281,7 +281,7 @@ rule resample_unet_to_native: nii=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="nnunet", space="corobl", @@ -290,7 +290,7 @@ rule resample_unet_to_native: xfm=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="{native_modality}", to="corobl", @@ -300,7 +300,7 @@ rule resample_unet_to_native: ref=bids( root=root, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, desc="preproc", suffix="{native_modality}.nii.gz" ), @@ -312,7 +312,7 @@ rule resample_unet_to_native: desc="unet", space="{native_modality,T1w|T2w}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -334,12 +334,12 @@ rule resample_subfields_to_unfold: space="corobl", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), xfm=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", hemi="{hemi}", from_="corobl", @@ -355,7 +355,7 @@ rule resample_subfields_to_unfold: space="unfold", hemi="{hemi}", atlas="{atlas}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] diff --git a/hippunfold/workflow/rules/templateseg.smk b/hippunfold/workflow/rules/templateseg.smk index 8620f2a7..bbcbc4e9 100644 --- a/hippunfold/workflow/rules/templateseg.smk +++ b/hippunfold/workflow/rules/templateseg.smk @@ -45,7 +45,7 @@ rule template_reg: fixed_img=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="{modality}.nii.gz".format( modality=get_modality_suffix(config["modality"]) ), @@ -69,7 +69,7 @@ rule template_reg: output: warp=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="greedytemplatereg", @@ -94,7 +94,7 @@ rule warp_template_dseg: ref=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix=f"{config['modality']}.nii.gz", space="corobl", desc="preproc", @@ -102,7 +102,7 @@ rule warp_template_dseg: ), warp=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="greedytemplatereg", @@ -122,7 +122,7 @@ rule warp_template_dseg: inject_seg=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="dseg.nii.gz", desc="postproc", space="corobl", @@ -143,7 +143,7 @@ rule warp_template_coords: ref=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix=f"{config['modality']}.nii.gz", space="corobl", desc="preproc", @@ -151,7 +151,7 @@ rule warp_template_coords: ), warp=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="greedytemplatereg", @@ -170,7 +170,7 @@ rule warp_template_coords: init_coords=bids( root=work, datatype="coords", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", label="{autotop}", suffix="coords.nii.gz", @@ -192,7 +192,7 @@ rule warp_template_anat: ref=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix=f"{config['modality']}.nii.gz", space="corobl", desc="preproc", @@ -200,7 +200,7 @@ rule warp_template_anat: ), warp=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="greedytemplatereg", @@ -223,7 +223,7 @@ rule warp_template_anat: warped=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix=f"{config['modality']}.nii.gz", desc="warpedtemplate", space="corobl", @@ -247,12 +247,12 @@ rule unflip_template_dseg: desc="postproc", space="corobl", hemi="{hemi}flip", - **config["subj_wildcards"] + **inputs.subj_wildcards ), unflip_ref=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix=f"{config['modality']}.nii.gz", space="corobl", desc="preproc", @@ -266,7 +266,7 @@ rule unflip_template_dseg: desc="postproc", space="corobl", hemi="{hemi,L|R}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), container: config["singularity"]["autotop"] @@ -282,7 +282,7 @@ rule unflip_template_coords: nii=bids( root=work, datatype="coords", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", label="{autotop}", suffix="coords.nii.gz", @@ -293,7 +293,7 @@ rule unflip_template_coords: unflip_ref=bids( root=work, datatype="anat", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix=f"{config['modality']}.nii.gz", space="corobl", desc="preproc", @@ -303,7 +303,7 @@ rule unflip_template_coords: nii=bids( root=work, datatype="coords", - **config["subj_wildcards"], + **inputs.subj_wildcards, dir="{dir}", label="{autotop}", suffix="coords.nii.gz", diff --git a/hippunfold/workflow/rules/warps.smk b/hippunfold/workflow/rules/warps.smk index 1dd4a1d4..e2e62854 100644 --- a/hippunfold/workflow/rules/warps.smk +++ b/hippunfold/workflow/rules/warps.smk @@ -1,3 +1,201 @@ +def reg_to_template_cmd(wildcards, input, output): + ref = str( + Path(input.template_dir) + / config["template_files"][config["template"]][wildcards.modality].format( + **wildcards + ), + ) + if config["no_reg_template"]: + cmd = f"reg_resample -flo {input.flo} -ref {ref} -res {output.warped_subj} -aff {input.xfm_identity}; cp {input.xfm_identity} {output.xfm_ras}" + elif config["rigid_reg_template"]: + cmd = f"reg_aladin -flo {input.flo} -ref {ref} -res {output.warped_subj} -aff {output.xfm_ras} -rigOnly" + else: + cmd = f"reg_aladin -flo {input.flo} -ref {ref} -res {output.warped_subj} -aff {output.xfm_ras}" + return cmd + + +rule reg_to_template: + """ generic for T1w or T2w right now """ + input: + flo=bids( + root=root, + datatype="anat", + **inputs.subj_wildcards, + desc="preproc", + suffix="{modality}.nii.gz" + ), + xfm_identity=os.path.join(workflow.basedir, "..", config["xfm_identity"]), + template_dir=Path(download_dir) / "template" / config["template"], + params: + cmd=reg_to_template_cmd, + output: + warped_subj=bids( + root=work, + datatype="anat", + **inputs.subj_wildcards, + suffix="{modality,T1w|T2w}.nii.gz", + space=config["template"], + desc="affine" + ), + xfm_ras=bids( + root=work, + datatype="warps", + **inputs.subj_wildcards, + suffix="xfm.txt", + from_="{modality,T1w|T2w}", + to=config["template"], + desc="affine", + type_="ras" + ), + log: + bids( + root="logs", + **inputs.subj_wildcards, + suffix="reg.txt", + from_="{modality,T1w|T2w}", + to=config["template"], + desc="affine", + type_="ras" + ), + container: + config["singularity"]["autotop"] + group: + "subj" + shell: + "{params.cmd}" + + +rule convert_template_xfm_ras2itk: + input: + bids( + root=work, + datatype="warps", + **inputs.subj_wildcards, + suffix="xfm.txt", + from_="{reg_suffix}", + to=config["template"], + desc="affine", + type_="ras" + ), + output: + bids( + root=work, + datatype="warps", + **inputs.subj_wildcards, + suffix="xfm.txt", + from_="{reg_suffix}", + to=config["template"], + desc="affine", + type_="itk" + ), + container: + config["singularity"]["autotop"] + group: + "subj" + shell: + "c3d_affine_tool {input} -oitk {output}" + + +# now have subject -> template transform, can compose that with template -> corobl to get subject -> corobl +rule compose_template_xfm_corobl: + input: + sub_to_std=bids( + root=work, + datatype="warps", + **inputs.subj_wildcards, + suffix="xfm.txt", + from_="T1w", + to=config["template"], + desc="affine", + type_="itk" + ), + template_dir=Path(download_dir) / "template" / config["template"], + params: + std_to_cor=lambda wildcards, input: Path(input.template_dir) + / config["template_files"][config["template"]]["xfm_corobl"].format( + **wildcards + ), + output: + sub_to_cor=bids( + root=work, + datatype="warps", + **inputs.subj_wildcards, + suffix="xfm.txt", + from_="T1w", + to="corobl", + desc="affine", + type_="itk" + ), + container: + config["singularity"]["autotop"] + group: + "subj" + shell: + "c3d_affine_tool -itk {input.sub_to_std} -itk {params.std_to_cor} -mult -oitk {output}" + + +rule invert_template_xfm_itk2ras: + input: + xfm_ras=bids( + root=work, + datatype="warps", + **inputs.subj_wildcards, + suffix="xfm.txt", + from_="T1w", + to="corobl", + desc="affine", + type_="itk" + ), + output: + xfm_ras=bids( + root=work, + datatype="warps", + **inputs.subj_wildcards, + suffix="xfm.txt", + from_="T1w", + to="corobl", + desc="affineInverse", + type_="ras" + ), + container: + config["singularity"]["autotop"] + group: + "subj" + shell: + "c3d_affine_tool -itk {input} -inv -o {output}" + + +rule template_xfm_itk2ras: + input: + xfm_ras=bids( + root=work, + datatype="warps", + **inputs.subj_wildcards, + suffix="xfm.txt", + from_="{native_modality}", + to="corobl", + desc="affine", + type_="itk" + ), + output: + xfm_ras=bids( + root=work, + datatype="warps", + **inputs.subj_wildcards, + suffix="xfm.txt", + from_="{native_modality,T1w|T2w}", + to="corobl", + desc="affine", + type_="ras" + ), + container: + config["singularity"]["autotop"] + group: + "subj" + shell: + "c3d_affine_tool -itk {input} -o {output}" + + rule create_native_coord_ref: input: coords_ap=bids( @@ -9,7 +207,7 @@ rule create_native_coord_ref: desc="laplace", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: nii=bids( @@ -19,7 +217,7 @@ rule create_native_coord_ref: hemi="{hemi}", label="{autotop}", suffix="refcoords.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -49,7 +247,7 @@ rule create_unfold_ref: label="{autotop}", datatype="warps", suffix="refvol.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -68,7 +266,7 @@ rule create_unfold_coord_map: label="{autotop}", datatype="warps", suffix="refvol.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: nii=bids( @@ -77,7 +275,7 @@ rule create_unfold_coord_map: space="unfold", label="{autotop}", suffix="refcoords.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), group: "subj" @@ -98,7 +296,7 @@ def get_laminar_coords(wildcards): desc="laplace", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ) elif "equivolume" in config["laminar_coords_method"]: coords_io = bids( @@ -110,7 +308,7 @@ def get_laminar_coords(wildcards): desc="equivol", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ) return coords_io @@ -123,7 +321,7 @@ rule create_warps_hipp: label="hipp", datatype="warps", suffix="refvol.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), unfold_phys_coords_nii=bids( root=work, @@ -131,7 +329,7 @@ rule create_warps_hipp: label="hipp", datatype="coords", suffix="refcoords.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), coords_ap=bids( root=work, @@ -142,7 +340,7 @@ rule create_warps_hipp: desc="laplace", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), coords_pd=bids( root=work, @@ -153,7 +351,7 @@ rule create_warps_hipp: desc="laplace", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), coords_io=get_laminar_coords, native_ref_coords_nii=bids( @@ -163,7 +361,7 @@ rule create_warps_hipp: hemi="{hemi}", label="hipp", suffix="refcoords.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), labelmap=get_labels_for_laplace, params: @@ -174,7 +372,7 @@ rule create_warps_hipp: warp_unfold2native=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="hipp", suffix="xfm.nii.gz", hemi="{hemi}", @@ -185,7 +383,7 @@ rule create_warps_hipp: warp_native2unfold=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="hipp", suffix="xfm.nii.gz", hemi="{hemi}", @@ -196,7 +394,7 @@ rule create_warps_hipp: warpitk_unfold2native=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="hipp", suffix="xfm.nii.gz", hemi="{hemi}", @@ -207,7 +405,7 @@ rule create_warps_hipp: warpitk_native2unfold=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="hipp", suffix="xfm.nii.gz", hemi="{hemi}", @@ -220,7 +418,7 @@ rule create_warps_hipp: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, hemi="{hemi}", suffix="create_warps-hipp.txt" ), @@ -238,7 +436,7 @@ rule create_warps_dentate: label="dentate", datatype="warps", suffix="refvol.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), unfold_phys_coords_nii=bids( root=work, @@ -246,7 +444,7 @@ rule create_warps_dentate: label="dentate", datatype="coords", suffix="refcoords.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), coords_ap=bids( root=work, @@ -257,7 +455,7 @@ rule create_warps_dentate: desc="laplace", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), coords_pd=bids( root=work, @@ -268,7 +466,7 @@ rule create_warps_dentate: desc="laplace", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), coords_io=bids( root=work, @@ -279,7 +477,7 @@ rule create_warps_dentate: desc="laplace", space="corobl", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), native_ref_coords_nii=bids( root=work, @@ -288,7 +486,7 @@ rule create_warps_dentate: hemi="{hemi}", label="dentate", suffix="refcoords.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), labelmap=get_labels_for_laplace, params: @@ -299,7 +497,7 @@ rule create_warps_dentate: warp_unfold2native=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="dentate", suffix="xfm.nii.gz", hemi="{hemi}", @@ -310,7 +508,7 @@ rule create_warps_dentate: warp_native2unfold=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="dentate", suffix="xfm.nii.gz", hemi="{hemi}", @@ -321,7 +519,7 @@ rule create_warps_dentate: warpitk_unfold2native=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="dentate", suffix="xfm.nii.gz", hemi="{hemi}", @@ -332,7 +530,7 @@ rule create_warps_dentate: warpitk_native2unfold=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="dentate", suffix="xfm.nii.gz", hemi="{hemi}", @@ -345,7 +543,7 @@ rule create_warps_dentate: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, hemi="{hemi}", suffix="create_warps-dentate.txt" ), @@ -360,7 +558,7 @@ rule expand_unfolded_warps: input: warp2d=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="SyN", @@ -376,12 +574,12 @@ rule expand_unfolded_warps: label="hipp", datatype="coords", suffix="refcoords.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: warp3d=bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="SyN3D", @@ -406,7 +604,7 @@ def get_unfold2unfoldatlas(wildcards): fn = ( bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="SyN3D", @@ -427,7 +625,7 @@ rule compose_warps_native_to_unfold: corobl2unfold=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="{autotop}", suffix="xfm.nii.gz", hemi="{hemi}", @@ -441,12 +639,12 @@ rule compose_warps_native_to_unfold: label="{autotop}", datatype="warps", suffix="refvol.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), native2corobl=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="{native_modality}", to="corobl", @@ -457,7 +655,7 @@ rule compose_warps_native_to_unfold: bids( root=root, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="{autotop}", suffix="xfm.nii.gz", hemi="{hemi}", @@ -468,7 +666,7 @@ rule compose_warps_native_to_unfold: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="{autotop}", suffix="composexfm.txt", hemi="{hemi}", @@ -491,7 +689,7 @@ def get_unfoldatlas2unfold(wildcards): fn = ( bids( root=work, - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.nii.gz", datatype="warps", desc="SyN3D", @@ -520,7 +718,7 @@ rule compose_warps_unfold_to_crop_native: unfold2corobl=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="{autotop}", suffix="xfm.nii.gz", hemi="{hemi}", @@ -534,12 +732,12 @@ rule compose_warps_unfold_to_crop_native: suffix="cropref.nii.gz", space="{native_modality}", hemi="{hemi}", - **config["subj_wildcards"] + **inputs.subj_wildcards ), native2corobl=bids( root=work, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, suffix="xfm.txt", from_="{native_modality}", to="corobl", @@ -552,13 +750,13 @@ rule compose_warps_unfold_to_crop_native: label="{autotop}", datatype="warps", suffix="refvol.nii.gz", - **config["subj_wildcards"] + **inputs.subj_wildcards ), output: unfold2cropnative=bids( root=root, datatype="warps", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="{autotop}", suffix="xfm.nii.gz", hemi="{hemi}", @@ -569,7 +767,7 @@ rule compose_warps_unfold_to_crop_native: log: bids( root="logs", - **config["subj_wildcards"], + **inputs.subj_wildcards, label="{autotop}", suffix="composexfm.txt", hemi="{hemi}", diff --git a/poetry.lock b/poetry.lock index b9c00715..db77b3fd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,5 +1,19 @@ # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +[[package]] +name = "annotated-types" +version = "0.7.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.8" +files = [ + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} + [[package]] name = "appdirs" version = "1.4.4" @@ -11,6 +25,17 @@ files = [ {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, ] +[[package]] +name = "argparse-dataclass" +version = "2.0.0" +description = "Declarative CLIs with argparse and dataclasses" +optional = false +python-versions = ">=3.8" +files = [ + {file = "argparse_dataclass-2.0.0-py3-none-any.whl", hash = "sha256:3ffc8852a88d9d98d1364b4441a712491320afb91fb56049afd8a51d74bb52d2"}, + {file = "argparse_dataclass-2.0.0.tar.gz", hash = "sha256:09ab641c914a2f12882337b9c3e5086196dbf2ee6bf0ef67895c74002cc9297f"}, +] + [[package]] name = "arrow" version = "1.3.0" @@ -55,7 +80,10 @@ files = [ [package.dependencies] lazy-object-proxy = ">=1.4.0" typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} -wrapt = {version = ">=1.11,<2", markers = "python_version < \"3.11\""} +wrapt = [ + {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, + {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, +] [[package]] name = "atomicwrites" @@ -97,20 +125,6 @@ files = [ {file = "bids_validator-1.14.6.tar.gz", hash = "sha256:df2b6b5d1aaad61d34ccad0494f2ed73ce3082825ada31954c4e14c2538d485c"}, ] -[[package]] -name = "binaryornot" -version = "0.4.4" -description = "Ultra-lightweight pure Python package to check if a file is binary or text." -optional = false -python-versions = "*" -files = [ - {file = "binaryornot-0.4.4-py2.py3-none-any.whl", hash = "sha256:b8b71173c917bddcd2c16070412e369c3ed7f0528926f70cac18a6c97fd563e4"}, - {file = "binaryornot-0.4.4.tar.gz", hash = "sha256:359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061"}, -] - -[package.dependencies] -chardet = ">=3.0.2" - [[package]] name = "black" version = "22.12.0" @@ -165,17 +179,6 @@ termcolor = "*" [package.extras] all = ["coverage", "docopt", "mock", "nexus-sdk", "oyaml", "pytest", "pytest-runner", "requests", "toml"] -[[package]] -name = "cached-property" -version = "1.5.2" -description = "A decorator for caching properties in classes." -optional = false -python-versions = "*" -files = [ - {file = "cached-property-1.5.2.tar.gz", hash = "sha256:9fa5755838eecbb2d234c3aa390bd80fbd3ac6b6869109bfc1b499f7bd89a130"}, - {file = "cached_property-1.5.2-py2.py3-none-any.whl", hash = "sha256:df4f613cf7ad9a588cc381aaf4a512d26265ecebd5eb9e1ba12f1319eb85a6a0"}, -] - [[package]] name = "certifi" version = "2024.7.4" @@ -187,17 +190,6 @@ files = [ {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, ] -[[package]] -name = "chardet" -version = "5.2.0" -description = "Universal encoding detector for Python 3" -optional = false -python-versions = ">=3.7" -files = [ - {file = "chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970"}, - {file = "chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7"}, -] - [[package]] name = "charset-normalizer" version = "3.3.2" @@ -322,6 +314,20 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "conda-inject" +version = "1.3.2" +description = "Helper functions for injecting a conda environment into the current python environment (by modifying sys.path, without actually changing the current python environment)." +optional = false +python-versions = "<4.0,>=3.9" +files = [ + {file = "conda_inject-1.3.2-py3-none-any.whl", hash = "sha256:6e641b408980c2814e3e527008c30749117909a21ff47392f07ef807da93a564"}, + {file = "conda_inject-1.3.2.tar.gz", hash = "sha256:0b8cde8c47998c118d8ff285a04977a3abcf734caf579c520fca469df1cd0aac"}, +] + +[package.dependencies] +pyyaml = ">=6.0,<7.0" + [[package]] name = "configargparse" version = "1.7" @@ -348,25 +354,31 @@ files = [ ] [[package]] -name = "cookiecutter" -version = "2.6.0" -description = "A command-line utility that creates projects from project templates, e.g. creating a Python package project from a Python package project template." +name = "copier" +version = "9.3.1" +description = "A library for rendering project templates." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "cookiecutter-2.6.0-py3-none-any.whl", hash = "sha256:a54a8e37995e4ed963b3e82831072d1ad4b005af736bb17b99c2cbd9d41b6e2d"}, - {file = "cookiecutter-2.6.0.tar.gz", hash = "sha256:db21f8169ea4f4fdc2408d48ca44859349de2647fbe494a9d6c3edfc0542c21c"}, + {file = "copier-9.3.1-py3-none-any.whl", hash = "sha256:20d60383a3fb99054ea4d24a8f71c6f9219b40ac50db1d97d412583d739bce99"}, + {file = "copier-9.3.1.tar.gz", hash = "sha256:e8515c082149f771268e8bc7fe400891d96e765797f5dac9fbae191f6427a24c"}, ] [package.dependencies] -arrow = "*" -binaryornot = ">=0.4.4" -click = ">=7.0,<9.0.0" -Jinja2 = ">=2.7,<4.0.0" -python-slugify = ">=4.0.0" +colorama = ">=0.4.6" +dunamai = ">=1.7.0" +eval-type-backport = {version = ">=0.1.3,<0.3.0", markers = "python_version < \"3.10\""} +funcy = ">=1.17" +jinja2 = ">=3.1.4" +jinja2-ansible-filters = ">=1.3.1" +packaging = ">=23.0" +pathspec = ">=0.9.0" +plumbum = ">=1.6.9" +pydantic = ">=2.4.2" +pygments = ">=2.7.1" pyyaml = ">=5.3.1" -requests = ">=2.23.0" -rich = "*" +questionary = ">=1.8.1" +typing-extensions = {version = ">=3.7.4,<5.0.0", markers = "python_version < \"3.9\""} [[package]] name = "datrie" @@ -432,8 +444,11 @@ name = "docutils" version = "0.20.1" description = "Docutils -- Python Documentation Utilities" optional = false -python-versions = "*" -files = [] +python-versions = ">=3.7" +files = [ + {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, + {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, +] [[package]] name = "dpath" @@ -446,6 +461,34 @@ files = [ {file = "dpath-2.2.0.tar.gz", hash = "sha256:34f7e630dc55ea3f219e555726f5da4b4b25f2200319c8e6902c394258dd6a3e"}, ] +[[package]] +name = "dunamai" +version = "1.22.0" +description = "Dynamic version generation" +optional = false +python-versions = ">=3.5" +files = [ + {file = "dunamai-1.22.0-py3-none-any.whl", hash = "sha256:eab3894b31e145bd028a74b13491c57db01986a7510482c9b5fff3b4e53d77b7"}, + {file = "dunamai-1.22.0.tar.gz", hash = "sha256:375a0b21309336f0d8b6bbaea3e038c36f462318c68795166e31f9873fdad676"}, +] + +[package.dependencies] +packaging = ">=20.9" + +[[package]] +name = "eval-type-backport" +version = "0.2.0" +description = "Like `typing._eval_type`, but lets older Python versions use newer typing features." +optional = false +python-versions = ">=3.8" +files = [ + {file = "eval_type_backport-0.2.0-py3-none-any.whl", hash = "sha256:ac2f73d30d40c5a30a80b8739a789d6bb5e49fdffa66d7912667e2015d9c9933"}, + {file = "eval_type_backport-0.2.0.tar.gz", hash = "sha256:68796cfbc7371ebf923f03bdf7bef415f3ec098aeced24e054b253a0e78f7b37"}, +] + +[package.extras] +tests = ["pytest"] + [[package]] name = "fastjsonschema" version = "2.20.0" @@ -501,6 +544,17 @@ wrapt = ">=1.0" arrow = ["pyarrow (>=1)"] calculus = ["sympy (>=1.3,<1.10)"] +[[package]] +name = "funcy" +version = "2.0" +description = "A fancy and practical functional tools" +optional = false +python-versions = "*" +files = [ + {file = "funcy-2.0-py2.py3-none-any.whl", hash = "sha256:53df23c8bb1651b12f095df764bfb057935d49537a56de211b098f4c79614bb0"}, + {file = "funcy-2.0.tar.gz", hash = "sha256:3963315d59d41c6f30c04bc910e10ab50a3ac4a225868bfa96feed133df075cb"}, +] + [[package]] name = "gitdb" version = "4.0.11" @@ -640,6 +694,67 @@ files = [ {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] +[[package]] +name = "immutables" +version = "0.21" +description = "Immutable Collections" +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "immutables-0.21-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:14cb09d4f4577ad9ab8770a340dc2158e0a5ab5775cb34c75960167a31104212"}, + {file = "immutables-0.21-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:22ba593f95044ac60d2af463f3dc86cd0e223f8c51df85dff65d663d93e19f51"}, + {file = "immutables-0.21-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25afc81a7bcf26c8364f85e52a14e0095344343e79493c73b0e9a765310a0bed"}, + {file = "immutables-0.21-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eac6e2868567289f88c6810f296940c328a1d38c9abc841eed04963102a27d12"}, + {file = "immutables-0.21-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ba8bca21a1d034f4577ede1e9553a681dd01199c06b563f1a8316f2623b64985"}, + {file = "immutables-0.21-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:39337bfb42f83dd787a81e2d00e90efa17c4a39a9cf1210b8a50dafe32438aae"}, + {file = "immutables-0.21-cp310-cp310-win32.whl", hash = "sha256:b24aa98f6cdae4ba15baf3aa00e84223bafcd0d3fd7f0443474527ec951845e1"}, + {file = "immutables-0.21-cp310-cp310-win_amd64.whl", hash = "sha256:715f8e5f8e1c35f036f9ac62eaf8b672eec1cdc2b4f9b73864cc64eccc76661c"}, + {file = "immutables-0.21-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5d780c38067047911a2e06a86ba063ba0055618ab5573c8198ef3f368e321303"}, + {file = "immutables-0.21-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9aab9d0f0016f6e0bfe7e4a4cb831ef20063da6468b1bbc71d06ef285781ee9e"}, + {file = "immutables-0.21-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ff83390b05d3372acb9a0c928f6cc20c78e74ca20ed88eb941f84a63b65e444"}, + {file = "immutables-0.21-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d01497713e71509c4481ffccdbe3a47b94969345f4e92f814d6626f7c0a4c304"}, + {file = "immutables-0.21-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bc7844c9fbb5bece5bfdf2bf8ea74d308f42f40b0665fd25c58abf56d7db024a"}, + {file = "immutables-0.21-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:984106fa4345efd9f96de22e9949fc97bac8598bdebee03c20b2497a88bff3b7"}, + {file = "immutables-0.21-cp311-cp311-win32.whl", hash = "sha256:1bdb5200518518601377e4877d5034e7c535e9ea8a9d601ed8b0eedef0c7becd"}, + {file = "immutables-0.21-cp311-cp311-win_amd64.whl", hash = "sha256:dd00c34f431c54c95e7b84bfdbdeacb4f039a6a24eb0c1f7aa4b168bb9a6ad0a"}, + {file = "immutables-0.21-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ef1ed262094b755903122c3c3a83ad0e0d5c3ab7887cda12b2fe878769d1ee0d"}, + {file = "immutables-0.21-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce604f81d9d8f26e60b52ebcb56bb5c0462c8ea50fb17868487d15f048a2f13e"}, + {file = "immutables-0.21-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b48b116aaca4500398058b5a87814857a60c4cb09417fecc12d7da0f5639b73d"}, + {file = "immutables-0.21-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dad7c0c74b285cc0e555ec0e97acbdc6f1862fcd16b99abd612df3243732e741"}, + {file = "immutables-0.21-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e44346e2221a5a676c880ca8e0e6429fa24d1a4ae562573f5c04d7f2e759b030"}, + {file = "immutables-0.21-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8b10139b529a460e53fe8be699ebd848c54c8a33ebe67763bcfcc809a475a26f"}, + {file = "immutables-0.21-cp312-cp312-win32.whl", hash = "sha256:fc512d808662614feb17d2d92e98f611d69669a98c7af15910acf1dc72737038"}, + {file = "immutables-0.21-cp312-cp312-win_amd64.whl", hash = "sha256:461dcb0f58a131045155e52a2c43de6ec2fe5ba19bdced6858a3abb63cee5111"}, + {file = "immutables-0.21-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:79674b51aa8dd983f9ac55f7f67b433b1df84a6b4f28ab860588389a5659485b"}, + {file = "immutables-0.21-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:93c8350f8f7d0d9693f708229d9d0578e6f3b785ce6da4bced1da97137aacfad"}, + {file = "immutables-0.21-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:583d2a63e444ce1538cc2bda56ae1f4a1a11473dbc0377c82b516bc7eec3b81e"}, + {file = "immutables-0.21-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b274a52da9b106db55eceb93fc1aea858c4e6f4740189e3548e38613eafc2021"}, + {file = "immutables-0.21-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:338bede057250b33716a3e4892e15df0bf5a5ddbf1d67ead996b3e680b49ef9e"}, + {file = "immutables-0.21-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8781c89583b68f604cf30f0978b722165824c3075888639fde771bf1a3e12dc0"}, + {file = "immutables-0.21-cp313-cp313-win32.whl", hash = "sha256:e97ea83befad873712f283c0cccd630f70cba753e207b4868af28d5b85e9dc54"}, + {file = "immutables-0.21-cp313-cp313-win_amd64.whl", hash = "sha256:cfcb23bd898f5a4ef88692b42c51f52ca7373a35ba4dcc215060a668639eb5da"}, + {file = "immutables-0.21-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:07a37d8699255402a10784d4d45f2bcc00ca7dba8da763207a834b15767e6c62"}, + {file = "immutables-0.21-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9139fd80bb05501216f49c4306bb80d0c1a08c3f0f621ed2939bf52d7f762661"}, + {file = "immutables-0.21-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc6fc7e917e281361ad243be1a3cb56a7633de88ee67c94cdf5651958ead30d9"}, + {file = "immutables-0.21-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6a577f55eaaf763b685eef9710edbeb7ee95e2e5f54e7e5e0fd0f60ae2eb648"}, + {file = "immutables-0.21-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:ca912c1bb35615ccbe361a6bb76e6fd43827394102467967d5599d78b50dd0f4"}, + {file = "immutables-0.21-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:586e88ca7ed44b7bb2cd7b212abd2637b51bd95bdb4856ab111b44715a62071c"}, + {file = "immutables-0.21-cp38-cp38-win32.whl", hash = "sha256:21adc6b478a58692c79c5bf316b39d3fd0552441d2b38eef1782a7555deee484"}, + {file = "immutables-0.21-cp38-cp38-win_amd64.whl", hash = "sha256:ecff5274357dc18aae053e5e10b8eee5e9b4d6cc774d34148c992cb2eb787ec3"}, + {file = "immutables-0.21-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e2aadf3bdd90daa0e8cb9c3cde4070e1021036e3b57f571a007ce24f323e47a9"}, + {file = "immutables-0.21-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5f8f507731d4d15e0c579aa77d8482471f988dc0f451e4bf3853ec36ccd42627"}, + {file = "immutables-0.21-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb9a378a4480381d7d3d63b0d201cf610eae0bf70e26a9306e3e631c9bd64010"}, + {file = "immutables-0.21-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7b5920bbfcaf038894c8ce4ed2eff0b31c3559810a61806db751be8ab4d703"}, + {file = "immutables-0.21-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:8b90702d1fe313e8273ae7abb46fc0f0a87b47c1c9a83aed9a161301146e655c"}, + {file = "immutables-0.21-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:71cbbc6fbe7e7321648047ff9273f4605f8bd5ce456841a65ef151080e9d3481"}, + {file = "immutables-0.21-cp39-cp39-win32.whl", hash = "sha256:c44f286c47dc0d4d7b5bf19fbe975e6d57c56d2878cea413e1ec7a4bfffb2727"}, + {file = "immutables-0.21-cp39-cp39-win_amd64.whl", hash = "sha256:cf15314c39484b8947a4e20c3526021272510592fb2807b5136a2fcd6ab0151b"}, + {file = "immutables-0.21.tar.gz", hash = "sha256:b55ffaf0449790242feb4c56ab799ea7af92801a0a43f9e2f4f8af2ab24dfc4a"}, +] + +[package.extras] +test = ["flake8 (>=5.0,<6.0)", "mypy (>=1.4,<2.0)", "pycodestyle (>=2.9,<3.0)", "pytest (>=7.4,<8.0)"] + [[package]] name = "importlib-metadata" version = "8.1.0" @@ -730,6 +845,39 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "jinja2-ansible-filters" +version = "1.3.2" +description = "A port of Ansible's jinja2 filters without requiring ansible core." +optional = false +python-versions = "*" +files = [ + {file = "jinja2-ansible-filters-1.3.2.tar.gz", hash = "sha256:07c10cf44d7073f4f01102ca12d9a2dc31b41d47e4c61ed92ef6a6d2669b356b"}, + {file = "jinja2_ansible_filters-1.3.2-py3-none-any.whl", hash = "sha256:e1082f5564917649c76fed239117820610516ec10f87735d0338688800a55b34"}, +] + +[package.dependencies] +Jinja2 = "*" +PyYAML = "*" + +[package.extras] +test = ["pytest", "pytest-cov"] + +[[package]] +name = "jinja2-time" +version = "0.2.0" +description = "Jinja2 Extension for Dates and Times" +optional = false +python-versions = "*" +files = [ + {file = "jinja2-time-0.2.0.tar.gz", hash = "sha256:d14eaa4d315e7688daa4969f616f226614350c48730bfa1692d2caebd8c90d40"}, + {file = "jinja2_time-0.2.0-py2.py3-none-any.whl", hash = "sha256:d3eab6605e3ec8b7a0863df09cc1d23714908fa61aa6986a845c20ba488b4efa"}, +] + +[package.dependencies] +arrow = "*" +jinja2 = "*" + [[package]] name = "jsonschema" version = "4.23.0" @@ -788,6 +936,25 @@ traitlets = ">=5.3" docs = ["myst-parser", "pydata-sphinx-theme", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling", "traitlets"] test = ["ipykernel", "pre-commit", "pytest (<8)", "pytest-cov", "pytest-timeout"] +[[package]] +name = "lazy-loader" +version = "0.4" +description = "Makes it easy to load subpackages and functions on demand." +optional = false +python-versions = ">=3.7" +files = [ + {file = "lazy_loader-0.4-py3-none-any.whl", hash = "sha256:342aa8e14d543a154047afb4ba8ef17f5563baad3fc610d7b15b213b0f119efc"}, + {file = "lazy_loader-0.4.tar.gz", hash = "sha256:47c75182589b91a4e1a85a136c074285a5ad4d9f39c63e0d7fb76391c4574cd1"}, +] + +[package.dependencies] +packaging = "*" + +[package.extras] +dev = ["changelist (==0.5)"] +lint = ["pre-commit (==3.7.0)"] +test = ["pytest (>=7.4)", "pytest-cov (>=4.1)"] + [[package]] name = "lazy-object-proxy" version = "1.10.0" @@ -834,30 +1001,6 @@ files = [ {file = "lazy_object_proxy-1.10.0-pp310.pp311.pp312.pp38.pp39-none-any.whl", hash = "sha256:80fa48bd89c8f2f456fc0765c11c23bf5af827febacd2f523ca5bc1893fcc09d"}, ] -[[package]] -name = "markdown-it-py" -version = "3.0.0" -description = "Python port of markdown-it. Markdown parsing, done right!" -optional = false -python-versions = ">=3.8" -files = [ - {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, - {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, -] - -[package.dependencies] -mdurl = ">=0.1,<1.0" - -[package.extras] -benchmarking = ["psutil", "pytest", "pytest-benchmark"] -code-style = ["pre-commit (>=3.0,<4.0)"] -compare = ["commonmark (>=0.9,<1.0)", "markdown (>=3.4,<4.0)", "mistletoe (>=1.0,<2.0)", "mistune (>=2.0,<3.0)", "panflute (>=2.3,<3.0)"] -linkify = ["linkify-it-py (>=1,<3)"] -plugins = ["mdit-py-plugins"] -profiling = ["gprof2dot"] -rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] -testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] - [[package]] name = "markupsafe" version = "2.1.5" @@ -938,17 +1081,6 @@ files = [ {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, ] -[[package]] -name = "mdurl" -version = "0.1.2" -description = "Markdown URL utilities" -optional = false -python-versions = ">=3.7" -files = [ - {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, - {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, -] - [[package]] name = "more-itertools" version = "9.1.0" @@ -1073,6 +1205,68 @@ files = [ {file = "numpy-1.24.4.tar.gz", hash = "sha256:80f5e3a4e498641401868df4208b74581206afbee7cf7b8329daae82676d9463"}, ] +[[package]] +name = "numpy" +version = "2.1.2" +description = "Fundamental package for array computing in Python" +optional = false +python-versions = ">=3.10" +files = [ + {file = "numpy-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:30d53720b726ec36a7f88dc873f0eec8447fbc93d93a8f079dfac2629598d6ee"}, + {file = "numpy-2.1.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e8d3ca0a72dd8846eb6f7dfe8f19088060fcb76931ed592d29128e0219652884"}, + {file = "numpy-2.1.2-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:fc44e3c68ff00fd991b59092a54350e6e4911152682b4782f68070985aa9e648"}, + {file = "numpy-2.1.2-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:7c1c60328bd964b53f8b835df69ae8198659e2b9302ff9ebb7de4e5a5994db3d"}, + {file = "numpy-2.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6cdb606a7478f9ad91c6283e238544451e3a95f30fb5467fbf715964341a8a86"}, + {file = "numpy-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d666cb72687559689e9906197e3bec7b736764df6a2e58ee265e360663e9baf7"}, + {file = "numpy-2.1.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c6eef7a2dbd0abfb0d9eaf78b73017dbfd0b54051102ff4e6a7b2980d5ac1a03"}, + {file = "numpy-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:12edb90831ff481f7ef5f6bc6431a9d74dc0e5ff401559a71e5e4611d4f2d466"}, + {file = "numpy-2.1.2-cp310-cp310-win32.whl", hash = "sha256:a65acfdb9c6ebb8368490dbafe83c03c7e277b37e6857f0caeadbbc56e12f4fb"}, + {file = "numpy-2.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:860ec6e63e2c5c2ee5e9121808145c7bf86c96cca9ad396c0bd3e0f2798ccbe2"}, + {file = "numpy-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b42a1a511c81cc78cbc4539675713bbcf9d9c3913386243ceff0e9429ca892fe"}, + {file = "numpy-2.1.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:faa88bc527d0f097abdc2c663cddf37c05a1c2f113716601555249805cf573f1"}, + {file = "numpy-2.1.2-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:c82af4b2ddd2ee72d1fc0c6695048d457e00b3582ccde72d8a1c991b808bb20f"}, + {file = "numpy-2.1.2-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:13602b3174432a35b16c4cfb5de9a12d229727c3dd47a6ce35111f2ebdf66ff4"}, + {file = "numpy-2.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1ebec5fd716c5a5b3d8dfcc439be82a8407b7b24b230d0ad28a81b61c2f4659a"}, + {file = "numpy-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2b49c3c0804e8ecb05d59af8386ec2f74877f7ca8fd9c1e00be2672e4d399b1"}, + {file = "numpy-2.1.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2cbba4b30bf31ddbe97f1c7205ef976909a93a66bb1583e983adbd155ba72ac2"}, + {file = "numpy-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8e00ea6fc82e8a804433d3e9cedaa1051a1422cb6e443011590c14d2dea59146"}, + {file = "numpy-2.1.2-cp311-cp311-win32.whl", hash = "sha256:5006b13a06e0b38d561fab5ccc37581f23c9511879be7693bd33c7cd15ca227c"}, + {file = "numpy-2.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:f1eb068ead09f4994dec71c24b2844f1e4e4e013b9629f812f292f04bd1510d9"}, + {file = "numpy-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7bf0a4f9f15b32b5ba53147369e94296f5fffb783db5aacc1be15b4bf72f43b"}, + {file = "numpy-2.1.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b1d0fcae4f0949f215d4632be684a539859b295e2d0cb14f78ec231915d644db"}, + {file = "numpy-2.1.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:f751ed0a2f250541e19dfca9f1eafa31a392c71c832b6bb9e113b10d050cb0f1"}, + {file = "numpy-2.1.2-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:bd33f82e95ba7ad632bc57837ee99dba3d7e006536200c4e9124089e1bf42426"}, + {file = "numpy-2.1.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b8cde4f11f0a975d1fd59373b32e2f5a562ade7cde4f85b7137f3de8fbb29a0"}, + {file = "numpy-2.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d95f286b8244b3649b477ac066c6906fbb2905f8ac19b170e2175d3d799f4df"}, + {file = "numpy-2.1.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ab4754d432e3ac42d33a269c8567413bdb541689b02d93788af4131018cbf366"}, + {file = "numpy-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e585c8ae871fd38ac50598f4763d73ec5497b0de9a0ab4ef5b69f01c6a046142"}, + {file = "numpy-2.1.2-cp312-cp312-win32.whl", hash = "sha256:9c6c754df29ce6a89ed23afb25550d1c2d5fdb9901d9c67a16e0b16eaf7e2550"}, + {file = "numpy-2.1.2-cp312-cp312-win_amd64.whl", hash = "sha256:456e3b11cb79ac9946c822a56346ec80275eaf2950314b249b512896c0d2505e"}, + {file = "numpy-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a84498e0d0a1174f2b3ed769b67b656aa5460c92c9554039e11f20a05650f00d"}, + {file = "numpy-2.1.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4d6ec0d4222e8ffdab1744da2560f07856421b367928026fb540e1945f2eeeaf"}, + {file = "numpy-2.1.2-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:259ec80d54999cc34cd1eb8ded513cb053c3bf4829152a2e00de2371bd406f5e"}, + {file = "numpy-2.1.2-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:675c741d4739af2dc20cd6c6a5c4b7355c728167845e3c6b0e824e4e5d36a6c3"}, + {file = "numpy-2.1.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05b2d4e667895cc55e3ff2b56077e4c8a5604361fc21a042845ea3ad67465aa8"}, + {file = "numpy-2.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:43cca367bf94a14aca50b89e9bc2061683116cfe864e56740e083392f533ce7a"}, + {file = "numpy-2.1.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:76322dcdb16fccf2ac56f99048af32259dcc488d9b7e25b51e5eca5147a3fb98"}, + {file = "numpy-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:32e16a03138cabe0cb28e1007ee82264296ac0983714094380b408097a418cfe"}, + {file = "numpy-2.1.2-cp313-cp313-win32.whl", hash = "sha256:242b39d00e4944431a3cd2db2f5377e15b5785920421993770cddb89992c3f3a"}, + {file = "numpy-2.1.2-cp313-cp313-win_amd64.whl", hash = "sha256:f2ded8d9b6f68cc26f8425eda5d3877b47343e68ca23d0d0846f4d312ecaa445"}, + {file = "numpy-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:2ffef621c14ebb0188a8633348504a35c13680d6da93ab5cb86f4e54b7e922b5"}, + {file = "numpy-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:ad369ed238b1959dfbade9018a740fb9392c5ac4f9b5173f420bd4f37ba1f7a0"}, + {file = "numpy-2.1.2-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:d82075752f40c0ddf57e6e02673a17f6cb0f8eb3f587f63ca1eaab5594da5b17"}, + {file = "numpy-2.1.2-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:1600068c262af1ca9580a527d43dc9d959b0b1d8e56f8a05d830eea39b7c8af6"}, + {file = "numpy-2.1.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a26ae94658d3ba3781d5e103ac07a876b3e9b29db53f68ed7df432fd033358a8"}, + {file = "numpy-2.1.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13311c2db4c5f7609b462bc0f43d3c465424d25c626d95040f073e30f7570e35"}, + {file = "numpy-2.1.2-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:2abbf905a0b568706391ec6fa15161fad0fb5d8b68d73c461b3c1bab6064dd62"}, + {file = "numpy-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:ef444c57d664d35cac4e18c298c47d7b504c66b17c2ea91312e979fcfbdfb08a"}, + {file = "numpy-2.1.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:bdd407c40483463898b84490770199d5714dcc9dd9b792f6c6caccc523c00952"}, + {file = "numpy-2.1.2-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:da65fb46d4cbb75cb417cddf6ba5e7582eb7bb0b47db4b99c9fe5787ce5d91f5"}, + {file = "numpy-2.1.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c193d0b0238638e6fc5f10f1b074a6993cb13b0b431f64079a509d63d3aa8b7"}, + {file = "numpy-2.1.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a7d80b2e904faa63068ead63107189164ca443b42dd1930299e0d1cb041cec2e"}, + {file = "numpy-2.1.2.tar.gz", hash = "sha256:13532a088217fa624c99b843eeb54640de23b3414b14aa66d023805eb731066c"}, +] + [[package]] name = "packaging" version = "23.2" @@ -1119,7 +1313,11 @@ files = [ ] [package.dependencies] -numpy = {version = ">=1.20.3", markers = "python_version < \"3.10\""} +numpy = [ + {version = ">=1.20.3", markers = "python_version < \"3.10\""}, + {version = ">=1.21.0", markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, + {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, +] python-dateutil = ">=2.8.2" pytz = ">=2020.1" tzdata = ">=2022.1" @@ -1147,6 +1345,88 @@ sql-other = ["SQLAlchemy (>=1.4.16)"] test = ["hypothesis (>=6.34.2)", "pytest (>=7.3.2)", "pytest-asyncio (>=0.17.0)", "pytest-xdist (>=2.2.0)"] xml = ["lxml (>=4.6.3)"] +[[package]] +name = "pandas" +version = "2.2.3" +description = "Powerful data structures for data analysis, time series, and statistics" +optional = false +python-versions = ">=3.9" +files = [ + {file = "pandas-2.2.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1948ddde24197a0f7add2bdc4ca83bf2b1ef84a1bc8ccffd95eda17fd836ecb5"}, + {file = "pandas-2.2.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:381175499d3802cde0eabbaf6324cce0c4f5d52ca6f8c377c29ad442f50f6348"}, + {file = "pandas-2.2.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d9c45366def9a3dd85a6454c0e7908f2b3b8e9c138f5dc38fed7ce720d8453ed"}, + {file = "pandas-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86976a1c5b25ae3f8ccae3a5306e443569ee3c3faf444dfd0f41cda24667ad57"}, + {file = "pandas-2.2.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b8661b0238a69d7aafe156b7fa86c44b881387509653fdf857bebc5e4008ad42"}, + {file = "pandas-2.2.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:37e0aced3e8f539eccf2e099f65cdb9c8aa85109b0be6e93e2baff94264bdc6f"}, + {file = "pandas-2.2.3-cp310-cp310-win_amd64.whl", hash = "sha256:56534ce0746a58afaf7942ba4863e0ef81c9c50d3f0ae93e9497d6a41a057645"}, + {file = "pandas-2.2.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:66108071e1b935240e74525006034333f98bcdb87ea116de573a6a0dccb6c039"}, + {file = "pandas-2.2.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7c2875855b0ff77b2a64a0365e24455d9990730d6431b9e0ee18ad8acee13dbd"}, + {file = "pandas-2.2.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cd8d0c3be0515c12fed0bdbae072551c8b54b7192c7b1fda0ba56059a0179698"}, + {file = "pandas-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c124333816c3a9b03fbeef3a9f230ba9a737e9e5bb4060aa2107a86cc0a497fc"}, + {file = "pandas-2.2.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:63cc132e40a2e084cf01adf0775b15ac515ba905d7dcca47e9a251819c575ef3"}, + {file = "pandas-2.2.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:29401dbfa9ad77319367d36940cd8a0b3a11aba16063e39632d98b0e931ddf32"}, + {file = "pandas-2.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:3fc6873a41186404dad67245896a6e440baacc92f5b716ccd1bc9ed2995ab2c5"}, + {file = "pandas-2.2.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b1d432e8d08679a40e2a6d8b2f9770a5c21793a6f9f47fdd52c5ce1948a5a8a9"}, + {file = "pandas-2.2.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a5a1595fe639f5988ba6a8e5bc9649af3baf26df3998a0abe56c02609392e0a4"}, + {file = "pandas-2.2.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5de54125a92bb4d1c051c0659e6fcb75256bf799a732a87184e5ea503965bce3"}, + {file = "pandas-2.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fffb8ae78d8af97f849404f21411c95062db1496aeb3e56f146f0355c9989319"}, + {file = "pandas-2.2.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6dfcb5ee8d4d50c06a51c2fffa6cff6272098ad6540aed1a76d15fb9318194d8"}, + {file = "pandas-2.2.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:062309c1b9ea12a50e8ce661145c6aab431b1e99530d3cd60640e255778bd43a"}, + {file = "pandas-2.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:59ef3764d0fe818125a5097d2ae867ca3fa64df032331b7e0917cf5d7bf66b13"}, + {file = "pandas-2.2.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f00d1345d84d8c86a63e476bb4955e46458b304b9575dcf71102b5c705320015"}, + {file = "pandas-2.2.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3508d914817e153ad359d7e069d752cdd736a247c322d932eb89e6bc84217f28"}, + {file = "pandas-2.2.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:22a9d949bfc9a502d320aa04e5d02feab689d61da4e7764b62c30b991c42c5f0"}, + {file = "pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3a255b2c19987fbbe62a9dfd6cff7ff2aa9ccab3fc75218fd4b7530f01efa24"}, + {file = "pandas-2.2.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:800250ecdadb6d9c78eae4990da62743b857b470883fa27f652db8bdde7f6659"}, + {file = "pandas-2.2.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6374c452ff3ec675a8f46fd9ab25c4ad0ba590b71cf0656f8b6daa5202bca3fb"}, + {file = "pandas-2.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:61c5ad4043f791b61dd4752191d9f07f0ae412515d59ba8f005832a532f8736d"}, + {file = "pandas-2.2.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3b71f27954685ee685317063bf13c7709a7ba74fc996b84fc6821c59b0f06468"}, + {file = "pandas-2.2.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:38cf8125c40dae9d5acc10fa66af8ea6fdf760b2714ee482ca691fc66e6fcb18"}, + {file = "pandas-2.2.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ba96630bc17c875161df3818780af30e43be9b166ce51c9a18c1feae342906c2"}, + {file = "pandas-2.2.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1db71525a1538b30142094edb9adc10be3f3e176748cd7acc2240c2f2e5aa3a4"}, + {file = "pandas-2.2.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:15c0e1e02e93116177d29ff83e8b1619c93ddc9c49083f237d4312337a61165d"}, + {file = "pandas-2.2.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ad5b65698ab28ed8d7f18790a0dc58005c7629f227be9ecc1072aa74c0c1d43a"}, + {file = "pandas-2.2.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc6b93f9b966093cb0fd62ff1a7e4c09e6d546ad7c1de191767baffc57628f39"}, + {file = "pandas-2.2.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5dbca4c1acd72e8eeef4753eeca07de9b1db4f398669d5994086f788a5d7cc30"}, + {file = "pandas-2.2.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8cd6d7cc958a3910f934ea8dbdf17b2364827bb4dafc38ce6eef6bb3d65ff09c"}, + {file = "pandas-2.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99df71520d25fade9db7c1076ac94eb994f4d2673ef2aa2e86ee039b6746d20c"}, + {file = "pandas-2.2.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:31d0ced62d4ea3e231a9f228366919a5ea0b07440d9d4dac345376fd8e1477ea"}, + {file = "pandas-2.2.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7eee9e7cea6adf3e3d24e304ac6b8300646e2a5d1cd3a3c2abed9101b0846761"}, + {file = "pandas-2.2.3-cp39-cp39-win_amd64.whl", hash = "sha256:4850ba03528b6dd51d6c5d273c46f183f39a9baf3f0143e566b89450965b105e"}, + {file = "pandas-2.2.3.tar.gz", hash = "sha256:4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667"}, +] + +[package.dependencies] +numpy = {version = ">=1.26.0", markers = "python_version >= \"3.12\""} +python-dateutil = ">=2.8.2" +pytz = ">=2020.1" +tzdata = ">=2022.7" + +[package.extras] +all = ["PyQt5 (>=5.15.9)", "SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)", "beautifulsoup4 (>=4.11.2)", "bottleneck (>=1.3.6)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=2022.12.0)", "fsspec (>=2022.11.0)", "gcsfs (>=2022.11.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.9.2)", "matplotlib (>=3.6.3)", "numba (>=0.56.4)", "numexpr (>=2.8.4)", "odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "pandas-gbq (>=0.19.0)", "psycopg2 (>=2.9.6)", "pyarrow (>=10.0.1)", "pymysql (>=1.0.2)", "pyreadstat (>=1.2.0)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "qtpy (>=2.3.0)", "s3fs (>=2022.11.0)", "scipy (>=1.10.0)", "tables (>=3.8.0)", "tabulate (>=0.9.0)", "xarray (>=2022.12.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)", "zstandard (>=0.19.0)"] +aws = ["s3fs (>=2022.11.0)"] +clipboard = ["PyQt5 (>=5.15.9)", "qtpy (>=2.3.0)"] +compression = ["zstandard (>=0.19.0)"] +computation = ["scipy (>=1.10.0)", "xarray (>=2022.12.0)"] +consortium-standard = ["dataframe-api-compat (>=0.1.7)"] +excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)"] +feather = ["pyarrow (>=10.0.1)"] +fss = ["fsspec (>=2022.11.0)"] +gcp = ["gcsfs (>=2022.11.0)", "pandas-gbq (>=0.19.0)"] +hdf5 = ["tables (>=3.8.0)"] +html = ["beautifulsoup4 (>=4.11.2)", "html5lib (>=1.1)", "lxml (>=4.9.2)"] +mysql = ["SQLAlchemy (>=2.0.0)", "pymysql (>=1.0.2)"] +output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.9.0)"] +parquet = ["pyarrow (>=10.0.1)"] +performance = ["bottleneck (>=1.3.6)", "numba (>=0.56.4)", "numexpr (>=2.8.4)"] +plot = ["matplotlib (>=3.6.3)"] +postgresql = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "psycopg2 (>=2.9.6)"] +pyarrow = ["pyarrow (>=10.0.1)"] +spss = ["pyreadstat (>=1.2.0)"] +sql-other = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)"] +test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)"] +xml = ["lxml (>=4.9.2)"] + [[package]] name = "pastel" version = "0.2.1" @@ -1222,6 +1502,27 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[[package]] +name = "plumbum" +version = "1.9.0" +description = "Plumbum: shell combinators library" +optional = false +python-versions = ">=3.8" +files = [ + {file = "plumbum-1.9.0-py3-none-any.whl", hash = "sha256:9fd0d3b0e8d86e4b581af36edf3f3bbe9d1ae15b45b8caab28de1bcb27aaa7f5"}, + {file = "plumbum-1.9.0.tar.gz", hash = "sha256:e640062b72642c3873bd5bdc3effed75ba4d3c70ef6b6a7b907357a84d909219"}, +] + +[package.dependencies] +importlib-resources = {version = "*", markers = "python_version < \"3.9\""} +pywin32 = {version = "*", markers = "platform_system == \"Windows\" and platform_python_implementation != \"PyPy\""} + +[package.extras] +dev = ["coverage[toml]", "paramiko", "psutil", "pytest (>=6.0)", "pytest-cov", "pytest-mock", "pytest-timeout"] +docs = ["sphinx (>=4.0.0)", "sphinx-rtd-theme (>=1.0.0)"] +ssh = ["paramiko"] +test = ["coverage[toml]", "paramiko", "psutil", "pytest (>=6.0)", "pytest-cov", "pytest-mock", "pytest-timeout"] + [[package]] name = "poethepoet" version = "0.10.0" @@ -1237,6 +1538,20 @@ files = [ pastel = ">=0.2.0,<0.3.0" tomlkit = ">=0.6.0,<1.0.0" +[[package]] +name = "prompt-toolkit" +version = "3.0.36" +description = "Library for building powerful interactive command lines in Python" +optional = false +python-versions = ">=3.6.2" +files = [ + {file = "prompt_toolkit-3.0.36-py3-none-any.whl", hash = "sha256:aa64ad242a462c5ff0363a7b9cfe696c20d55d9fc60c11fd8e632d064804d305"}, + {file = "prompt_toolkit-3.0.36.tar.gz", hash = "sha256:3e163f254bef5a03b146397d7c1963bd3e2812f0964bb9a24e6ec761fd28db63"}, +] + +[package.dependencies] +wcwidth = "*" + [[package]] name = "psutil" version = "6.0.0" @@ -1279,17 +1594,17 @@ files = [ [[package]] name = "pvandyken-deprecated" -version = "0.0.3" +version = "0.0.4" description = "Wrapper to manage deprecations" optional = false -python-versions = ">=3.7,<3.12" +python-versions = ">=3.8" files = [ - {file = "pvandyken_deprecated-0.0.3-py3-none-any.whl", hash = "sha256:83e192d2a33bb681cbbc4be86ba00d3622c024eeacd8f96dfe635595d4d67540"}, - {file = "pvandyken_deprecated-0.0.3.tar.gz", hash = "sha256:1ee350747ece4a6a55a8a2ad4cb7a7ae9f3f77a144b5cd80b94ce58545658737"}, + {file = "pvandyken_deprecated-0.0.4-py3-none-any.whl", hash = "sha256:6e58ea8ef598211f539c3eab415bf39001b4276999e19a4354ffa82be83990a0"}, + {file = "pvandyken_deprecated-0.0.4.tar.gz", hash = "sha256:ea174be2fd36495fef0e4818c080eccbc6ec9a8ddc177cb9d859cd0044b1b5b0"}, ] [package.dependencies] -packaging = ">=22.0,<24.0" +packaging = ">=22.0" typing-extensions = ">=3.10.0" [[package]] @@ -1347,6 +1662,130 @@ files = [ {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, ] +[[package]] +name = "pydantic" +version = "2.9.2" +description = "Data validation using Python type hints" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"}, + {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"}, +] + +[package.dependencies] +annotated-types = ">=0.6.0" +pydantic-core = "2.23.4" +typing-extensions = [ + {version = ">=4.6.1", markers = "python_version < \"3.13\""}, + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, +] + +[package.extras] +email = ["email-validator (>=2.0.0)"] +timezone = ["tzdata"] + +[[package]] +name = "pydantic-core" +version = "2.23.4" +description = "Core functionality for Pydantic validation and serialization" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"}, + {file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63e46b3169866bd62849936de036f901a9356e36376079b05efa83caeaa02ceb"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed1a53de42fbe34853ba90513cea21673481cd81ed1be739f7f2efb931b24916"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cfdd16ab5e59fc31b5e906d1a3f666571abc367598e3e02c83403acabc092e07"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255a8ef062cbf6674450e668482456abac99a5583bbafb73f9ad469540a3a232"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7cd62e831afe623fbb7aabbb4fe583212115b3ef38a9f6b71869ba644624a2"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f09e2ff1f17c2b51f2bc76d1cc33da96298f0a036a137f5440ab3ec5360b624f"}, + {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e38e63e6f3d1cec5a27e0afe90a085af8b6806ee208b33030e65b6516353f1a3"}, + {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dbd8dbed2085ed23b5c04afa29d8fd2771674223135dc9bc937f3c09284d071"}, + {file = "pydantic_core-2.23.4-cp310-none-win32.whl", hash = "sha256:6531b7ca5f951d663c339002e91aaebda765ec7d61b7d1e3991051906ddde119"}, + {file = "pydantic_core-2.23.4-cp310-none-win_amd64.whl", hash = "sha256:7c9129eb40958b3d4500fa2467e6a83356b3b61bfff1b414c7361d9220f9ae8f"}, + {file = "pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8"}, + {file = "pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b"}, + {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0"}, + {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64"}, + {file = "pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f"}, + {file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"}, + {file = "pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231"}, + {file = "pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126"}, + {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e"}, + {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24"}, + {file = "pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84"}, + {file = "pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"}, + {file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"}, + {file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"}, + {file = "pydantic_core-2.23.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d4488a93b071c04dc20f5cecc3631fc78b9789dd72483ba15d423b5b3689b555"}, + {file = "pydantic_core-2.23.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:81965a16b675b35e1d09dd14df53f190f9129c0202356ed44ab2728b1c905658"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa2ebd4c8530079140dd2d7f794a9d9a73cbb8e9d59ffe24c63436efa8f271"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:61817945f2fe7d166e75fbfb28004034b48e44878177fc54d81688e7b85a3665"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29d2c342c4bc01b88402d60189f3df065fb0dda3654744d5a165a5288a657368"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e11661ce0fd30a6790e8bcdf263b9ec5988e95e63cf901972107efc49218b13"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d18368b137c6295db49ce7218b1a9ba15c5bc254c96d7c9f9e924a9bc7825ad"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ec4e55f79b1c4ffb2eecd8a0cfba9955a2588497d96851f4c8f99aa4a1d39b12"}, + {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:374a5e5049eda9e0a44c696c7ade3ff355f06b1fe0bb945ea3cac2bc336478a2"}, + {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5c364564d17da23db1106787675fc7af45f2f7b58b4173bfdd105564e132e6fb"}, + {file = "pydantic_core-2.23.4-cp38-none-win32.whl", hash = "sha256:d7a80d21d613eec45e3d41eb22f8f94ddc758a6c4720842dc74c0581f54993d6"}, + {file = "pydantic_core-2.23.4-cp38-none-win_amd64.whl", hash = "sha256:5f5ff8d839f4566a474a969508fe1c5e59c31c80d9e140566f9a37bba7b8d556"}, + {file = "pydantic_core-2.23.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a4fa4fc04dff799089689f4fd502ce7d59de529fc2f40a2c8836886c03e0175a"}, + {file = "pydantic_core-2.23.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7df63886be5e270da67e0966cf4afbae86069501d35c8c1b3b6c168f42cb36"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcedcd19a557e182628afa1d553c3895a9f825b936415d0dbd3cd0bbcfd29b4b"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f54b118ce5de9ac21c363d9b3caa6c800341e8c47a508787e5868c6b79c9323"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86d2f57d3e1379a9525c5ab067b27dbb8a0642fb5d454e17a9ac434f9ce523e3"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de6d1d1b9e5101508cb37ab0d972357cac5235f5c6533d1071964c47139257df"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1278e0d324f6908e872730c9102b0112477a7f7cf88b308e4fc36ce1bdb6d58c"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a6b5099eeec78827553827f4c6b8615978bb4b6a88e5d9b93eddf8bb6790f55"}, + {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e55541f756f9b3ee346b840103f32779c695a19826a4c442b7954550a0972040"}, + {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a5c7ba8ffb6d6f8f2ab08743be203654bb1aaa8c9dcb09f82ddd34eadb695605"}, + {file = "pydantic_core-2.23.4-cp39-none-win32.whl", hash = "sha256:37b0fe330e4a58d3c58b24d91d1eb102aeec675a3db4c292ec3928ecd892a9a6"}, + {file = "pydantic_core-2.23.4-cp39-none-win_amd64.whl", hash = "sha256:1498bec4c05c9c787bde9125cfdcc63a41004ff167f495063191b863399b1a29"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f455ee30a9d61d3e1a15abd5068827773d6e4dc513e795f380cdd59932c782d5"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1e90d2e3bd2c3863d48525d297cd143fe541be8bbf6f579504b9712cb6b643ec"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e203fdf807ac7e12ab59ca2bfcabb38c7cf0b33c41efeb00f8e5da1d86af480"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e08277a400de01bc72436a0ccd02bdf596631411f592ad985dcee21445bd0068"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f220b0eea5965dec25480b6333c788fb72ce5f9129e8759ef876a1d805d00801"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d06b0c8da4f16d1d1e352134427cb194a0a6e19ad5db9161bf32b2113409e728"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ba1a0996f6c2773bd83e63f18914c1de3c9dd26d55f4ac302a7efe93fb8e7433"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9a5bce9d23aac8f0cf0836ecfc033896aa8443b501c58d0602dbfd5bd5b37753"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:78ddaaa81421a29574a682b3179d4cf9e6d405a09b99d93ddcf7e5239c742e21"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:883a91b5dd7d26492ff2f04f40fbb652de40fcc0afe07e8129e8ae779c2110eb"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88ad334a15b32a791ea935af224b9de1bf99bcd62fabf745d5f3442199d86d59"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:233710f069d251feb12a56da21e14cca67994eab08362207785cf8c598e74577"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19442362866a753485ba5e4be408964644dd6a09123d9416c54cd49171f50744"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:624e278a7d29b6445e4e813af92af37820fafb6dcc55c012c834f9e26f9aaaef"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f5ef8f42bec47f21d07668a043f077d507e5bf4e668d5c6dfe6aaba89de1a5b8"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:aea443fffa9fbe3af1a9ba721a87f926fe548d32cab71d188a6ede77d0ff244e"}, + {file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"}, +] + +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" + [[package]] name = "pyflakes" version = "2.4.0" @@ -1396,7 +1835,10 @@ files = [ [package.dependencies] astroid = ">=2.15.8,<=2.17.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -dill = {version = ">=0.2", markers = "python_version < \"3.11\""} +dill = [ + {version = ">=0.2", markers = "python_version < \"3.11\""}, + {version = ">=0.3.6", markers = "python_version >= \"3.11\""}, +] isort = ">=4.2.5,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" @@ -1472,23 +1914,6 @@ files = [ [package.dependencies] six = ">=1.5" -[[package]] -name = "python-slugify" -version = "8.0.4" -description = "A Python slugify application that also handles Unicode" -optional = false -python-versions = ">=3.7" -files = [ - {file = "python-slugify-8.0.4.tar.gz", hash = "sha256:59202371d1d05b54a9e7720c5e038f928f45daaffe41dd10822f3907b937c856"}, - {file = "python_slugify-8.0.4-py2.py3-none-any.whl", hash = "sha256:276540b79961052b66b7d116620b36518847f52d5fd9e3a70164fc8c50faa6b8"}, -] - -[package.dependencies] -text-unidecode = ">=1.3" - -[package.extras] -unidecode = ["Unidecode (>=1.1.1)"] - [[package]] name = "pytz" version = "2024.1" @@ -1583,6 +2008,20 @@ files = [ {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, ] +[[package]] +name = "questionary" +version = "2.0.1" +description = "Python library to build pretty command line user prompts ⭐️" +optional = false +python-versions = ">=3.8" +files = [ + {file = "questionary-2.0.1-py3-none-any.whl", hash = "sha256:8ab9a01d0b91b68444dff7f6652c1e754105533f083cbe27597c8110ecc230a2"}, + {file = "questionary-2.0.1.tar.gz", hash = "sha256:bcce898bf3dbb446ff62830c86c5c6fb9a22a54146f0f5597d3da43b10d8fc8b"}, +] + +[package.dependencies] +prompt_toolkit = ">=2.0,<=3.0.36" + [[package]] name = "referencing" version = "0.35.1" @@ -1630,25 +2069,6 @@ files = [ {file = "reretry-0.11.8.tar.gz", hash = "sha256:f2791fcebe512ea2f1d153a2874778523a8064860b591cd90afc21a8bed432e3"}, ] -[[package]] -name = "rich" -version = "13.7.1" -description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -optional = false -python-versions = ">=3.7.0" -files = [ - {file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"}, - {file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"}, -] - -[package.dependencies] -markdown-it-py = ">=2.2.0" -pygments = ">=2.13.0,<3.0.0" -typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.9\""} - -[package.extras] -jupyter = ["ipywidgets (>=7.5.1,<9)"] - [[package]] name = "rpds-py" version = "0.19.0" @@ -1757,6 +2177,83 @@ files = [ {file = "rpds_py-0.19.0.tar.gz", hash = "sha256:4fdc9afadbeb393b4bbbad75481e0ea78e4469f2e1d713a90811700830b553a9"}, ] +[[package]] +name = "ruamel-yaml" +version = "0.18.6" +description = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order" +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruamel.yaml-0.18.6-py3-none-any.whl", hash = "sha256:57b53ba33def16c4f3d807c0ccbc00f8a6081827e81ba2491691b76882d0c636"}, + {file = "ruamel.yaml-0.18.6.tar.gz", hash = "sha256:8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b"}, +] + +[package.dependencies] +"ruamel.yaml.clib" = {version = ">=0.2.7", markers = "platform_python_implementation == \"CPython\" and python_version < \"3.13\""} + +[package.extras] +docs = ["mercurial (>5.7)", "ryd"] +jinja2 = ["ruamel.yaml.jinja2 (>=0.2)"] + +[[package]] +name = "ruamel-yaml-clib" +version = "0.2.8" +description = "C version of reader, parser and emitter for ruamel.yaml derived from libyaml" +optional = false +python-versions = ">=3.6" +files = [ + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b42169467c42b692c19cf539c38d4602069d8c1505e97b86387fcf7afb766e1d"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-macosx_13_0_arm64.whl", hash = "sha256:07238db9cbdf8fc1e9de2489a4f68474e70dffcb32232db7c08fa61ca0c7c462"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:fff3573c2db359f091e1589c3d7c5fc2f86f5bdb6f24252c2d8e539d4e45f412"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux_2_24_aarch64.whl", hash = "sha256:aa2267c6a303eb483de8d02db2871afb5c5fc15618d894300b88958f729ad74f"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:840f0c7f194986a63d2c2465ca63af8ccbbc90ab1c6001b1978f05119b5e7334"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:024cfe1fc7c7f4e1aff4a81e718109e13409767e4f871443cbff3dba3578203d"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-win32.whl", hash = "sha256:c69212f63169ec1cfc9bb44723bf2917cbbd8f6191a00ef3410f5a7fe300722d"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-win_amd64.whl", hash = "sha256:cabddb8d8ead485e255fe80429f833172b4cadf99274db39abc080e068cbcc31"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:bef08cd86169d9eafb3ccb0a39edb11d8e25f3dae2b28f5c52fd997521133069"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:b16420e621d26fdfa949a8b4b47ade8810c56002f5389970db4ddda51dbff248"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:25c515e350e5b739842fc3228d662413ef28f295791af5e5110b543cf0b57d9b"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux_2_24_aarch64.whl", hash = "sha256:1707814f0d9791df063f8c19bb51b0d1278b8e9a2353abbb676c2f685dee6afe"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:46d378daaac94f454b3a0e3d8d78cafd78a026b1d71443f4966c696b48a6d899"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:09b055c05697b38ecacb7ac50bdab2240bfca1a0c4872b0fd309bb07dc9aa3a9"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-win32.whl", hash = "sha256:53a300ed9cea38cf5a2a9b069058137c2ca1ce658a874b79baceb8f892f915a7"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-win_amd64.whl", hash = "sha256:c2a72e9109ea74e511e29032f3b670835f8a59bbdc9ce692c5b4ed91ccf1eedb"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:ebc06178e8821efc9692ea7544aa5644217358490145629914d8020042c24aa1"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-macosx_13_0_arm64.whl", hash = "sha256:edaef1c1200c4b4cb914583150dcaa3bc30e592e907c01117c08b13a07255ec2"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d176b57452ab5b7028ac47e7b3cf644bcfdc8cacfecf7e71759f7f51a59e5c92"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-manylinux_2_24_aarch64.whl", hash = "sha256:1dc67314e7e1086c9fdf2680b7b6c2be1c0d8e3a8279f2e993ca2a7545fecf62"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:3213ece08ea033eb159ac52ae052a4899b56ecc124bb80020d9bbceeb50258e9"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:aab7fd643f71d7946f2ee58cc88c9b7bfc97debd71dcc93e03e2d174628e7e2d"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-win32.whl", hash = "sha256:5c365d91c88390c8d0a8545df0b5857172824b1c604e867161e6b3d59a827eaa"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-win_amd64.whl", hash = "sha256:1758ce7d8e1a29d23de54a16ae867abd370f01b5a69e1a3ba75223eaa3ca1a1b"}, + {file = "ruamel.yaml.clib-0.2.8-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:a5aa27bad2bb83670b71683aae140a1f52b0857a2deff56ad3f6c13a017a26ed"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c58ecd827313af6864893e7af0a3bb85fd529f862b6adbefe14643947cfe2942"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-macosx_12_0_arm64.whl", hash = "sha256:f481f16baec5290e45aebdc2a5168ebc6d35189ae6fea7a58787613a25f6e875"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-manylinux_2_24_aarch64.whl", hash = "sha256:77159f5d5b5c14f7c34073862a6b7d34944075d9f93e681638f6d753606c6ce6"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:7f67a1ee819dc4562d444bbafb135832b0b909f81cc90f7aa00260968c9ca1b3"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4ecbf9c3e19f9562c7fdd462e8d18dd902a47ca046a2e64dba80699f0b6c09b7"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:87ea5ff66d8064301a154b3933ae406b0863402a799b16e4a1d24d9fbbcbe0d3"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-win32.whl", hash = "sha256:75e1ed13e1f9de23c5607fe6bd1aeaae21e523b32d83bb33918245361e9cc51b"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-win_amd64.whl", hash = "sha256:3f215c5daf6a9d7bbed4a0a4f760f3113b10e82ff4c5c44bec20a68c8014f675"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1b617618914cb00bf5c34d4357c37aa15183fa229b24767259657746c9077615"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-macosx_12_0_arm64.whl", hash = "sha256:a6a9ffd280b71ad062eae53ac1659ad86a17f59a0fdc7699fd9be40525153337"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-manylinux_2_24_aarch64.whl", hash = "sha256:305889baa4043a09e5b76f8e2a51d4ffba44259f6b4c72dec8ca56207d9c6fe1"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:700e4ebb569e59e16a976857c8798aee258dceac7c7d6b50cab63e080058df91"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:e2b4c44b60eadec492926a7270abb100ef9f72798e18743939bdbf037aab8c28"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e79e5db08739731b0ce4850bed599235d601701d5694c36570a99a0c5ca41a9d"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-win32.whl", hash = "sha256:955eae71ac26c1ab35924203fda6220f84dce57d6d7884f189743e2abe3a9fbe"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-win_amd64.whl", hash = "sha256:56f4252222c067b4ce51ae12cbac231bce32aee1d33fbfc9d17e5b8d6966c312"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:03d1162b6d1df1caa3a4bd27aa51ce17c9afc2046c31b0ad60a0a96ec22f8001"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:bba64af9fa9cebe325a62fa398760f5c7206b215201b0ec825005f1b18b9bccf"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-manylinux_2_24_aarch64.whl", hash = "sha256:a1a45e0bb052edf6a1d3a93baef85319733a888363938e1fc9924cb00c8df24c"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:da09ad1c359a728e112d60116f626cc9f29730ff3e0e7db72b9a2dbc2e4beed5"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:184565012b60405d93838167f425713180b949e9d8dd0bbc7b49f074407c5a8b"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a75879bacf2c987c003368cf14bed0ffe99e8e85acfa6c0bfffc21a090f16880"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-win32.whl", hash = "sha256:84b554931e932c46f94ab306913ad7e11bba988104c5cff26d90d03f68258cd5"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-win_amd64.whl", hash = "sha256:25ac8c08322002b06fa1d49d1646181f0b2c72f5cbc15a85e80b4c30a544bb15"}, + {file = "ruamel.yaml.clib-0.2.8.tar.gz", hash = "sha256:beb2e0404003de9a4cab9753a8805a8fe9320ee6673136ed7f04255fe60bb512"}, +] + [[package]] name = "scipy" version = "1.10.1" @@ -1795,6 +2292,48 @@ dev = ["click", "doit (>=0.36.0)", "flake8", "mypy", "pycodestyle", "pydevtool", doc = ["matplotlib (>2)", "numpydoc", "pydata-sphinx-theme (==0.9.0)", "sphinx (!=4.1.0)", "sphinx-design (>=0.2.0)"] test = ["asv", "gmpy2", "mpmath", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] +[[package]] +name = "scipy" +version = "1.13.1" +description = "Fundamental algorithms for scientific computing in Python" +optional = false +python-versions = ">=3.9" +files = [ + {file = "scipy-1.13.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:20335853b85e9a49ff7572ab453794298bcf0354d8068c5f6775a0eabf350aca"}, + {file = "scipy-1.13.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:d605e9c23906d1994f55ace80e0125c587f96c020037ea6aa98d01b4bd2e222f"}, + {file = "scipy-1.13.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cfa31f1def5c819b19ecc3a8b52d28ffdcc7ed52bb20c9a7589669dd3c250989"}, + {file = "scipy-1.13.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f26264b282b9da0952a024ae34710c2aff7d27480ee91a2e82b7b7073c24722f"}, + {file = "scipy-1.13.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:eccfa1906eacc02de42d70ef4aecea45415f5be17e72b61bafcfd329bdc52e94"}, + {file = "scipy-1.13.1-cp310-cp310-win_amd64.whl", hash = "sha256:2831f0dc9c5ea9edd6e51e6e769b655f08ec6db6e2e10f86ef39bd32eb11da54"}, + {file = "scipy-1.13.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:27e52b09c0d3a1d5b63e1105f24177e544a222b43611aaf5bc44d4a0979e32f9"}, + {file = "scipy-1.13.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:54f430b00f0133e2224c3ba42b805bfd0086fe488835effa33fa291561932326"}, + {file = "scipy-1.13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e89369d27f9e7b0884ae559a3a956e77c02114cc60a6058b4e5011572eea9299"}, + {file = "scipy-1.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a78b4b3345f1b6f68a763c6e25c0c9a23a9fd0f39f5f3d200efe8feda560a5fa"}, + {file = "scipy-1.13.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:45484bee6d65633752c490404513b9ef02475b4284c4cfab0ef946def50b3f59"}, + {file = "scipy-1.13.1-cp311-cp311-win_amd64.whl", hash = "sha256:5713f62f781eebd8d597eb3f88b8bf9274e79eeabf63afb4a737abc6c84ad37b"}, + {file = "scipy-1.13.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5d72782f39716b2b3509cd7c33cdc08c96f2f4d2b06d51e52fb45a19ca0c86a1"}, + {file = "scipy-1.13.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:017367484ce5498445aade74b1d5ab377acdc65e27095155e448c88497755a5d"}, + {file = "scipy-1.13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:949ae67db5fa78a86e8fa644b9a6b07252f449dcf74247108c50e1d20d2b4627"}, + {file = "scipy-1.13.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de3ade0e53bc1f21358aa74ff4830235d716211d7d077e340c7349bc3542e884"}, + {file = "scipy-1.13.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2ac65fb503dad64218c228e2dc2d0a0193f7904747db43014645ae139c8fad16"}, + {file = "scipy-1.13.1-cp312-cp312-win_amd64.whl", hash = "sha256:cdd7dacfb95fea358916410ec61bbc20440f7860333aee6d882bb8046264e949"}, + {file = "scipy-1.13.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:436bbb42a94a8aeef855d755ce5a465479c721e9d684de76bf61a62e7c2b81d5"}, + {file = "scipy-1.13.1-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:8335549ebbca860c52bf3d02f80784e91a004b71b059e3eea9678ba994796a24"}, + {file = "scipy-1.13.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d533654b7d221a6a97304ab63c41c96473ff04459e404b83275b60aa8f4b7004"}, + {file = "scipy-1.13.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:637e98dcf185ba7f8e663e122ebf908c4702420477ae52a04f9908707456ba4d"}, + {file = "scipy-1.13.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a014c2b3697bde71724244f63de2476925596c24285c7a637364761f8710891c"}, + {file = "scipy-1.13.1-cp39-cp39-win_amd64.whl", hash = "sha256:392e4ec766654852c25ebad4f64e4e584cf19820b980bc04960bca0b0cd6eaa2"}, + {file = "scipy-1.13.1.tar.gz", hash = "sha256:095a87a0312b08dfd6a6155cbbd310a8c51800fc931b8c0b84003014b874ed3c"}, +] + +[package.dependencies] +numpy = ">=1.22.4,<2.3" + +[package.extras] +dev = ["cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy", "pycodestyle", "pydevtool", "rich-click", "ruff", "types-psutil", "typing_extensions"] +doc = ["jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.12.0)", "jupytext", "matplotlib (>=3.5)", "myst-nb", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0)", "sphinx-design (>=0.4.0)"] +test = ["array-api-strict", "asv", "gmpy2", "hypothesis (>=6.30)", "mpmath", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] + [[package]] name = "simplejson" version = "3.19.2" @@ -1951,26 +2490,45 @@ files = [ [[package]] name = "snakebids" -version = "0.8.1" +version = "0.13.1" description = "BIDS integration into snakemake workflows" optional = false -python-versions = ">=3.7,<3.12" +python-versions = "<4.0,>=3.8" files = [ - {file = "snakebids-0.8.1-py3-none-any.whl", hash = "sha256:65e548631c6cc00295e6eaa5bfa51eb5852a33fb62ed322851d8aa8dcb1b2097"}, - {file = "snakebids-0.8.1.tar.gz", hash = "sha256:ea5dc884418f3dd8fc3465fab6664ec5fffce85f363b279a90efc0f2cc938173"}, + {file = "snakebids-0.13.1-py3-none-any.whl", hash = "sha256:3c68251d54e0615c3bdbf5b8050c0c0a3a58b9789a44c5e1bf75b3ec310cd7a5"}, + {file = "snakebids-0.13.1.tar.gz", hash = "sha256:97395a8dfe225e1a15f66dd3562e07afa48370318cba932f0b375f860ff9c2c4"}, ] [package.dependencies] -attrs = ">=21.2.0,<24" +attrs = ">=22.2.0" boutiques = ">=0.5.25,<0.6.0" -cached-property = ">=1.5.2,<2.0.0" -cookiecutter = ">=2.1.1,<3.0.0" -more-itertools = ">=8,<10" -pandas = {version = ">=1.3", markers = "python_full_version >= \"3.7.1\""} -pvandyken-deprecated = "0.0.3" -pybids = {version = ">=0.16.0,<0.17.0", markers = "python_version >= \"3.8\""} -PyYAML = ">=6,<7" -snakemake = {version = ">=5.28.0", markers = "python_version >= \"3.7\""} +copier = ">=9.2.0" +docutils = "!=0.21.post1" +importlib-resources = ">=5.12.0" +jinja2-time = ">=0.2.0" +lazy-loader = ">=0.3" +more-itertools = ">=8" +numpy = [ + {version = "<=1.24.4", markers = "python_version < \"3.9\""}, + {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, +] +pandas = [ + {version = "<=2.0.3", markers = "python_version < \"3.9\""}, + {version = ">=2.1.1", markers = "python_version >= \"3.12\""}, +] +pluggy = ">=1.3" +pvandyken-deprecated = "0.0.4" +pybids = ">=0.16.0,<0.17" +requests = ">=2.31.0" +ruamel-yaml = ">=0.17.2" +scipy = [ + {version = ">=1.10.0,<=1.10.1", markers = "python_version < \"3.9\""}, + {version = ">=1.10.0", markers = "python_version >= \"3.9\""}, +] +snakemake = [ + {version = ">=5.28.0,<8", markers = "python_version < \"3.11\""}, + {version = ">=7.18.2", markers = "python_version >= \"3.11\""}, +] typing-extensions = ">=3.10.0" [[package]] @@ -2031,6 +2589,114 @@ messaging = ["slacker"] pep = ["eido", "peppy"] reports = ["pygments"] +[[package]] +name = "snakemake" +version = "8.23.0" +description = "Workflow management system to create reproducible and scalable data analyses" +optional = false +python-versions = ">=3.11" +files = [ + {file = "snakemake-8.23.0-py3-none-any.whl", hash = "sha256:745d1b229b8c4a0414267450bf547cc34b5c3e49862f85fb4f7de6a35917ce01"}, + {file = "snakemake-8.23.0.tar.gz", hash = "sha256:5c4348f55256eb62b2af10c64b0422ca08206193aef725b6412372a7804ef54b"}, +] + +[package.dependencies] +appdirs = "*" +conda-inject = ">=1.3.1,<2.0" +configargparse = "*" +connection-pool = ">=0.0.3" +datrie = "*" +docutils = "*" +dpath = ">=2.1.6,<3.0.0" +gitpython = "*" +humanfriendly = "*" +immutables = "*" +jinja2 = ">=3.0,<4.0" +jsonschema = "*" +nbformat = "*" +packaging = "*" +psutil = "*" +pulp = ">=2.3.1,<2.10" +pyyaml = "*" +requests = ">=2.8.1,<3.0" +reretry = "*" +smart-open = ">=4.0,<8.0" +snakemake-interface-common = ">=1.17.0,<2.0" +snakemake-interface-executor-plugins = ">=9.3.2,<10.0" +snakemake-interface-report-plugins = ">=1.1.0,<2.0.0" +snakemake-interface-storage-plugins = ">=3.2.3,<4.0" +tabulate = "*" +throttler = "*" +wrapt = "*" +yte = ">=1.5.1,<2.0" + +[package.extras] +messaging = ["slack-sdk"] +pep = ["eido", "peppy"] +reports = ["pygments"] + +[[package]] +name = "snakemake-interface-common" +version = "1.17.4" +description = "Common functions and classes for Snakemake and its plugins" +optional = false +python-versions = "<4.0,>=3.8" +files = [ + {file = "snakemake_interface_common-1.17.4-py3-none-any.whl", hash = "sha256:1d757cce0300a73d48b906d1ade38706853169320a5d27b963869888d130c354"}, + {file = "snakemake_interface_common-1.17.4.tar.gz", hash = "sha256:c2142e1b93cbc18c2cf41d15968ba8688f60b077c8284e5de057cccfc215d4d3"}, +] + +[package.dependencies] +argparse-dataclass = ">=2.0.0,<3.0.0" +ConfigArgParse = ">=1.7,<2.0" + +[[package]] +name = "snakemake-interface-executor-plugins" +version = "9.3.2" +description = "This package provides a stable interface for interactions between Snakemake and its executor plugins." +optional = false +python-versions = "<4.0,>=3.11" +files = [ + {file = "snakemake_interface_executor_plugins-9.3.2-py3-none-any.whl", hash = "sha256:9c52c4b0f74b9056ebbb1b6229459281fef002b678baac00aee3b3ef36e92ba5"}, + {file = "snakemake_interface_executor_plugins-9.3.2.tar.gz", hash = "sha256:19c50dc82989ff25d10386cfb3c99da9d2dc980d95ecd30bbb431374dcd390b3"}, +] + +[package.dependencies] +argparse-dataclass = ">=2.0.0,<3.0.0" +snakemake-interface-common = ">=1.17.4,<2.0.0" +throttler = ">=1.2.2,<2.0.0" + +[[package]] +name = "snakemake-interface-report-plugins" +version = "1.1.0" +description = "The interface for Snakemake report plugins." +optional = false +python-versions = "<4.0,>=3.11" +files = [ + {file = "snakemake_interface_report_plugins-1.1.0-py3-none-any.whl", hash = "sha256:00749eb3c5c7ce465757d0fc9f04e6c4d3f5af4f463809c34b92c8b5efea0fd5"}, + {file = "snakemake_interface_report_plugins-1.1.0.tar.gz", hash = "sha256:b1ee444b2fca51225cf8a102f8e56633791d01433cd00cf07a1d9713a12313a5"}, +] + +[package.dependencies] +snakemake-interface-common = ">=1.16.0,<2.0.0" + +[[package]] +name = "snakemake-interface-storage-plugins" +version = "3.3.0" +description = "This package provides a stable interface for interactions between Snakemake and its storage plugins." +optional = false +python-versions = "<4.0,>=3.11" +files = [ + {file = "snakemake_interface_storage_plugins-3.3.0-py3-none-any.whl", hash = "sha256:090292ee9e867d98513fb7c948461186357aa7d08db10f4b3018fc9e9008dd80"}, + {file = "snakemake_interface_storage_plugins-3.3.0.tar.gz", hash = "sha256:203d8f794dfb37d568ad01a6c375fa8beac36df8e488c0f9b9f75984769c362a"}, +] + +[package.dependencies] +reretry = ">=0.11.8,<0.12.0" +snakemake-interface-common = ">=1.12.0,<2.0.0" +throttler = ">=1.2.2,<2.0.0" +wrapt = ">=1.15.0,<2.0.0" + [[package]] name = "sqlalchemy" version = "2.0.31" @@ -2156,17 +2822,6 @@ files = [ [package.extras] tests = ["pytest", "pytest-cov"] -[[package]] -name = "text-unidecode" -version = "1.3" -description = "The most basic Text::Unidecode port" -optional = false -python-versions = "*" -files = [ - {file = "text-unidecode-1.3.tar.gz", hash = "sha256:bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93"}, - {file = "text_unidecode-1.3-py2.py3-none-any.whl", hash = "sha256:1311f10e8b895935241623731c2ba64f4c455287888b18189350b67134a822e8"}, -] - [[package]] name = "throttler" version = "1.2.2" @@ -2290,6 +2945,17 @@ h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] +[[package]] +name = "wcwidth" +version = "0.2.13" +description = "Measures the displayed width of unicode strings in a terminal" +optional = false +python-versions = "*" +files = [ + {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"}, + {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"}, +] + [[package]] name = "wrapt" version = "1.16.0" @@ -2402,5 +3068,5 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" -python-versions = ">=3.8,<3.10" -content-hash = "49e15674dd8aa7c835ebff1aceecbeea5902e7d1beb502df5f5f62b299204ca8" +python-versions = ">=3.8,<4.0" +content-hash = "f01a40d575c1dc1e120b1c6ab3f5a444da264ce28daf0ca2b7d3b79c85f67056" diff --git a/pyproject.toml b/pyproject.toml index b875b20f..1e68f9a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,17 +2,30 @@ name = "hippunfold" version = "1.5.2-pre.2" description = "BIDS App for Hippocampal AutoTop (automated hippocampal unfolding and subfield segmentation)" +readme = "README.md" +license = "MIT" authors = ["Jordan DeKraker & Ali Khan "] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] [tool.poetry.dependencies] -python = ">=3.8,<3.10" -snakemake = ">=6.0.0" -snakebids = "^0.8.1" +python = ">=3.8,<4.0" +snakemake = [ + { version=">=7.20,<8", python = "<3.11" }, + { version=">=8.1.2", python = ">=3.11" }, +] +snakebids = ">=0.13.1" appdirs = "^1.4.4" Jinja2 = "^3.0.3" pygraphviz = "1.7" Pygments = "^2.10.0" -pulp = "<2.8.0" +pulp = { version="<2.8.0", python = "<3.11" } +pandas = [ + { version = "<=2.0.3", python = "<3.9" }, + { version = ">=2.1.1", python = ">=3.12" }, +] [tool.poetry.dev-dependencies] flake8 = "^4.0.1" @@ -23,14 +36,13 @@ pylint = "^2.11.1" isort = "^5.10.1" poethepoet = "^0.10.0" snakefmt = ">=0.5.0" - [tool.poetry.scripts] -hippunfold = "hippunfold.run:main" +hippunfold = "hippunfold.run:app.run" + [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" - [tool.poe.tasks] quality_check = { shell = "isort hippunfold/*.py -c && black hippunfold --check && snakefmt hippunfold --check" } quality_fix = { shell = "isort hippunfold/*.py && black hippunfold && snakefmt hippunfold" } diff --git a/test_data/bids_T1w/dataset_description.json b/test_data/bids_T1w/dataset_description.json new file mode 100644 index 00000000..42b8aa44 --- /dev/null +++ b/test_data/bids_T1w/dataset_description.json @@ -0,0 +1,13 @@ +{ + "Acknowledgements": "Snakebids Development Team", + "Authors": ["Peter Van Dyken", "Ali Khan", "Tristan Kuehn", "Jason Kai"], + "DatasetType": "raw", + "BIDSVersion": "1.4.1", + "HowToAcknowledge": "https://zenodo.org/record/8274278", + "License": "PDLL", + "Name": "Snakebids Test T1w Dataset (empty files)", + "ReferencesAndLinks": [ + "https://github.com/khanlab/snakebids", + "List of papers or websites" + ] +} diff --git a/test_data/bids_T1w_longitudinal/dataset_description.json b/test_data/bids_T1w_longitudinal/dataset_description.json new file mode 100644 index 00000000..8f4a1953 --- /dev/null +++ b/test_data/bids_T1w_longitudinal/dataset_description.json @@ -0,0 +1,13 @@ +{ + "Acknowledgements": "Snakebids Development Team", + "Authors": ["Peter Van Dyken", "Ali Khan", "Tristan Kuehn", "Jason Kai"], + "DatasetType": "raw", + "BIDSVersion": "1.4.1", + "HowToAcknowledge": "https://zenodo.org/record/8274278", + "License": "PDLL", + "Name": "Snakebids Test T1w longitudinal Dataset (empty files)", + "ReferencesAndLinks": [ + "https://github.com/khanlab/snakebids", + "List of papers or websites" + ] +} diff --git a/test_data/bids_hippb500/dataset_description.json b/test_data/bids_hippb500/dataset_description.json new file mode 100644 index 00000000..ed093663 --- /dev/null +++ b/test_data/bids_hippb500/dataset_description.json @@ -0,0 +1,13 @@ +{ + "Acknowledgements": "Snakebids Development Team", + "Authors": ["Peter Van Dyken", "Ali Khan", "Tristan Kuehn", "Jason Kai"], + "DatasetType": "raw", + "BIDSVersion": "1.4.1", + "HowToAcknowledge": "https://zenodo.org/record/8274278", + "License": "PDLL", + "Name": "Snakebids Test hippb500 Dataset (empty files)", + "ReferencesAndLinks": [ + "https://github.com/khanlab/snakebids", + "List of papers or websites" + ] +} diff --git a/test_data/bids_multiT2w/dataset_description.json b/test_data/bids_multiT2w/dataset_description.json new file mode 100644 index 00000000..86b67067 --- /dev/null +++ b/test_data/bids_multiT2w/dataset_description.json @@ -0,0 +1,13 @@ +{ + "Acknowledgements": "Snakebids Development Team", + "Authors": ["Peter Van Dyken", "Ali Khan", "Tristan Kuehn", "Jason Kai"], + "DatasetType": "raw", + "BIDSVersion": "1.4.1", + "HowToAcknowledge": "https://zenodo.org/record/8274278", + "License": "PDLL", + "Name": "Snakebids Test multi T2w Dataset (empty files)", + "ReferencesAndLinks": [ + "https://github.com/khanlab/snakebids", + "List of papers or websites" + ] +} diff --git a/test_data/bids_segT2w/dataset_description.json b/test_data/bids_segT2w/dataset_description.json new file mode 100644 index 00000000..0b074a53 --- /dev/null +++ b/test_data/bids_segT2w/dataset_description.json @@ -0,0 +1,13 @@ +{ + "Acknowledgements": "Snakebids Development Team", + "Authors": ["Peter Van Dyken", "Ali Khan", "Tristan Kuehn", "Jason Kai"], + "DatasetType": "raw", + "BIDSVersion": "1.4.1", + "HowToAcknowledge": "https://zenodo.org/record/8274278", + "License": "PDLL", + "Name": "Snakebids Test seg T2w Dataset (empty files)", + "ReferencesAndLinks": [ + "https://github.com/khanlab/snakebids", + "List of papers or websites" + ] +} diff --git a/test_data/bids_singleT2w/dataset_description.json b/test_data/bids_singleT2w/dataset_description.json new file mode 100644 index 00000000..78ee3f7a --- /dev/null +++ b/test_data/bids_singleT2w/dataset_description.json @@ -0,0 +1,13 @@ +{ + "Acknowledgements": "Snakebids Development Team", + "Authors": ["Peter Van Dyken", "Ali Khan", "Tristan Kuehn", "Jason Kai"], + "DatasetType": "raw", + "BIDSVersion": "1.4.1", + "HowToAcknowledge": "https://zenodo.org/record/8274278", + "License": "PDLL", + "Name": "Snakebids Test single T2w Dataset (empty files)", + "ReferencesAndLinks": [ + "https://github.com/khanlab/snakebids", + "List of papers or websites" + ] +} diff --git a/test_data/bids_singleT2w_longitudinal/dataset_description.json b/test_data/bids_singleT2w_longitudinal/dataset_description.json new file mode 100644 index 00000000..38c60809 --- /dev/null +++ b/test_data/bids_singleT2w_longitudinal/dataset_description.json @@ -0,0 +1,13 @@ +{ + "Acknowledgements": "Snakebids Development Team", + "Authors": ["Peter Van Dyken", "Ali Khan", "Tristan Kuehn", "Jason Kai"], + "DatasetType": "raw", + "BIDSVersion": "1.4.1", + "HowToAcknowledge": "https://zenodo.org/record/8274278", + "License": "PDLL", + "Name": "Snakebids Test single T2w longitudinal Dataset (empty files)", + "ReferencesAndLinks": [ + "https://github.com/khanlab/snakebids", + "List of papers or websites" + ] +} diff --git a/test_data/data_cropseg/dataset_description.json b/test_data/data_cropseg/dataset_description.json new file mode 100644 index 00000000..988b7b6b --- /dev/null +++ b/test_data/data_cropseg/dataset_description.json @@ -0,0 +1,13 @@ +{ + "Acknowledgements": "Snakebids Development Team", + "Authors": ["Peter Van Dyken", "Ali Khan", "Tristan Kuehn", "Jason Kai"], + "DatasetType": "raw", + "BIDSVersion": "1.4.1", + "HowToAcknowledge": "https://zenodo.org/record/8274278", + "License": "PDLL", + "Name": "Snakebids Test cropseg Dataset (empty files)", + "ReferencesAndLinks": [ + "https://github.com/khanlab/snakebids", + "List of papers or websites" + ] +} diff --git a/test_data/data_cropseg_1hemi/dataset_description.json b/test_data/data_cropseg_1hemi/dataset_description.json new file mode 100644 index 00000000..b3ab4d34 --- /dev/null +++ b/test_data/data_cropseg_1hemi/dataset_description.json @@ -0,0 +1,13 @@ +{ + "Acknowledgements": "Snakebids Development Team", + "Authors": ["Peter Van Dyken", "Ali Khan", "Tristan Kuehn", "Jason Kai"], + "DatasetType": "raw", + "BIDSVersion": "1.4.1", + "HowToAcknowledge": "https://zenodo.org/record/8274278", + "License": "PDLL", + "Name": "Snakebids Test cropseg 1hemi Dataset (empty files)", + "ReferencesAndLinks": [ + "https://github.com/khanlab/snakebids", + "List of papers or websites" + ] +}