import os
import tempfile

from xcp_d.workflows.base import init_xcpd_wf
from xcp_d.utils.doc import download_example_data

fmri_dir = download_example_data()
out_dir = tempfile.mkdtemp()

# Create xcp_d derivatives folder.
os.mkdir(os.path.join(out_dir, "xcp_d"))

wf = init_xcpd_wf(
    fmri_dir=fmri_dir,
    output_dir=out_dir,
    work_dir=".",
    subject_list=["01"],
    analysis_level="participant",
    task_id="imagery",
    bids_filters=None,
    bandpass_filter=True,
    high_pass=0.01,
    low_pass=0.08,
    bpf_order=2,
    fd_thresh=0.3,
    motion_filter_type=None,
    motion_filter_order=4,
    band_stop_min=12,
    band_stop_max=20,
    despike=True,
    head_radius=50.,
    params="36P",
    smoothing=6,
    custom_confounds_folder=None,
    dummy_scans=0,
    random_seed=None,
    exact_time=[],
    cifti=False,
    omp_nthreads=1,
    layout=None,
    process_surfaces=False,
    dcan_qc=False,
    input_type="fmriprep",
    min_coverage=0.5,
    min_time=100,
    combineruns=False,
    name="xcpd_wf",
)