generated from akhanf/snakemake_neuroworkflow
-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
127 lines (111 loc) · 3.05 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
[tool.poetry]
name = "snakedwi"
version = "0.2.0"
description = "snakedwi - BIDS app and snakemake workflow for dwi pre-processing"
authors = ["Ali Khan <alik@robarts.ca>"]
license = "MIT"
[tool.poetry.dependencies]
python = "^3.8, <3.11"
snakebids = "^0.7.0"
#snakeboost = "^0.2.0"
Pygments = "^2.12.0" #required for report-generation only
sdcflows = "^2.2.2"
[tool.poetry.group.dev.dependencies]
poethepoet = "^0.10.0"
ruff = "^0.0.263"
black = "^23.1.0"
isort = "^5.10.1"
yamlfix = "^1.1.0"
snakefmt = "^0.8.4"
[tool.poetry.scripts]
snakedwi = "snakedwi.run:main"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poe.tasks]
isort = "isort snakedwi"
isort-check = "isort -c snakedwi"
black = "black snakedwi"
black-check = "black --check snakedwi"
ruff-check = "ruff snakedwi"
ruff = "ruff snakedwi --fix"
snakefmt = "snakefmt snakedwi"
snakefmt-check = "snakefmt --check snakedwi"
quality_fix = ["yamlfix", "isort", "black", "ruff", "snakefmt"]
quality_check = [
"yamlfix-check",
"isort-check",
"black-check",
"ruff-check",
"snakefmt-check",
]
test = [
"test_dryrun",
"test_nosdc",
"test_sdc_optimal",
"test_singleshell_topup",
"test_sdcflow",
"test_synthsr"
]
[tool.poe.tasks.test_dryrun]
shell = """
mkdir -p test_out/topup_multishell && \
snakedwi snakedwi/test_data/bids_AP_PA test_out/topup_multishell participant \
-np && \
rm -rf test_out/topup_multishell
"""
[tool.poe.tasks.test_nosdc]
shell = """
mkdir -p test_out/nosdc && \
snakedwi snakedwi/test_data/bids_downsampled_1bzero_1scan test_out/nosdc \
participant --sdc_method none -np && \
rm -rf test_out/nosdc
"""
[tool.poe.tasks.test_sdc_optimal]
shell = """
mkdir -p test_out/sdc_optimal && \
snakedwi snakedwi/test_data/bids_downsampled_1bzero_1scan test_out/sdc_optimal \
participant -np && \
rm -rf test_out/sdc_optimal
"""
[tool.poe.tasks.test_singleshell_topup]
shell = """
mkdir -p test_out/topup_singleshell && \
snakedwi snakedwi/test_data/bids_downsampled_1bzero test_out/topup_singleshell \
participant --sdc_method topup -np && \
rm -rf test_out/topup_singleshell
"""
[tool.poe.tasks.test_sdcflow]
shell = """
mkdir -p test_out/sdcflow && \
snakedwi snakedwi/test_data/bids_downsampled_1bzero_1scan test_out/sdcflow \
participant --sdc_method sdcflow -np && \
rm -rf test_out/sdcflow
"""
[tool.poe.tasks.test_synthsr]
shell = """
mkdir -p test_out/synthsr && \
snakedwi snakedwi/test_data/bids_downsampled_1bzero_1scan test_out/synthsr \
participant --sdc_method synthsr -np && \
rm -rf test_out/synthsr
"""
[tool.poe.tasks.yamlfix]
shell = """
find . -type f \\( \
-iname \\*.yaml -o -iname \\*.yml ! -iname snakemake* \
! -iname snakebids* ! -iname *schema* \
\\) -exec yamlfix {} \\;
"""
[tool.poe.tasks.yamlfix-check]
shell = """
find . -type f \\( \
-iname \\*.yaml -o -iname \\*.yml ! -iname snakemake* \
! -iname snakebids* ! -iname *schema* \
\\) -exec yamlfix --check {} \\;
"""
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 79
[tool.ruff]
builtins = [ "snakemake" ]