Changelog¶
0.4.0 — 2026-11-05¶
0.4.0 gives every output one identity: derivative names are used verbatim on disk, output
folders depend only on the configuration and each file’s path below the new source_root,
and a unit counts as done only when its .done manifest lists every file it wrote. File
discovery is sorted (indices change once) and dataframe column names are reversible. These
changes are breaking: 0.3.x configurations are refused until they declare naming_version: 1.
neurodags migrate converts a 0.3.x configuration and its existing outputs in one previewed
pass; start with the upgrade checklist in Migrating to 0.4.
If you cannot migrate a project yet, pin neurodags<0.4; packages that depend on neurodags
should declare an upper bound (neurodags>=0.3.6,<0.4 or neurodags>=0.4,<0.5). After
migrating, run only 0.4.x on that output tree (see
do not mix versions).
Breaking¶
naming_version: 1is required at the top level of every pipeline configuration. A configuration without it, or with another value, is refused before anything runs by every entry point: all CLI subcommands (oneneurodags: error: ...line, exit code2, no traceback), the TUI (neurodags tui,neurodags-tui) and the Python API (run_pipeline,iterate_derivative_pipeline,build_derivative_dataframe,get_datasets_and_mount_point_from_pipeline_configuration, …; raisesneurodags.loaders.ConfigVersionError). The message points toneurodags migrate. The generatedslurm-scripttemplates load the pipeline withneurodags.loaders.load_pipeline_configurationand passbase_dir=torun_pipeline.source_rootis required for every dataset (active or skipped; string or mount map). For an active dataset it must resolve for the active mount point and be an existing directory, and every discovered file must lie strictly below it (a file outside it is aDatasetConfigErrornaming the file).neurodags validatesuggests a value from the fixed part offile_pattern(never a filesystem root).Relative paths inside a datasets YAML are resolved against that YAML’s directory (
source_root,file_pattern,exclude_pattern,derivatives_path; in 0.3.x: the current working directory). In an inlinedatasets:mapping they resolve against the pipeline YAML’s directory, and in a dict passed to the Python API against the newbase_dir=argument (relative paths without it are an error).~/$VARexpansion is unchanged and happens first. Discovered file paths (and the dataframefile_pathcolumn) are therefore absolute when the pattern was relative.The YAML-relative
-d/--datasetsfallback is removed (deprecated in 0.3.5):-dis resolved against the current working directory only; a missing file is a clean error (exit2).neurodags.cli.resolve_cli_datasets_pathtakes only the-dvalue now.Derivative names are used verbatim on disk (#49): outputs are
<source>@<name><suffix>with the name exactly as written inDerivativeDefinitions; the 0.3.x CamelCase conversion is gone (band_powerwrites@band_power, was@BandPower). Names follow a stricter grammar,^[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9])?$, must be YAML strings (quoteYes,On,1_000, … keys), unique ignoring case, notSourceFile, andXandX-<digits>cannot both be defined. EveryDerivativeDefinitionskey,DerivativeListentry, reference and--derivativevalue is checked when the pipeline is loaded (so by every CLI command, the TUI and the Python API), all problems together, before anything is written (neurodags.naming.NamingError; exit code2on the CLI, includingvalidate). This replaces the 0.3.5 on-disk collision check and itsvalidate“files named @X” listing;validateprints name warnings (long names, repeated key-value keys) instead.Artifact suffixes are validated before the first writer runs (#49): every
NodeResult.artifactskey must match^(?:\.[A-Za-z0-9][A-Za-z0-9_-]*)+$(.nc,.report.html,.EO_baseline.fif), must not end in.done/.error/.skip, and two keys must not differ only in case. An invalid key fails the unit with an.errormarker and nothing is written.Source file names are kept verbatim in output names; the last
@separates source and derivative. 0.3.x wrote every@of a source basename as&, so a chained output wassub-1.fif&CleanedEEG.fif@PowerSpectrum.nc; it is nowsub-1.fif@CleanedEEG.fif@PowerSpectrum.nc.a@b.vhdranda&b.vhdrin one folder are distinct units (no longer refused as a collision). Parse output names at the last@(neurodags.naming.parse_output_basename,rsplit("@", 1)); scripts that split on the first@get the wrong source for chained names. A broad chained pattern such as*@CleanedEEG*now also matches downstream outputs in the same tree; anchor it on the artifact suffix (*@CleanedEEG.fif).neurodags migraterenames 0.3.x&outputs; until thenrun,dry-run,statusanddataframestop with an error pointing to it when the output tree holds a file named like an output of one of the pipeline’s derivatives whose source part contains&and that no.doneclaims (0.3.x never wrote.done) and no real source of that spelling owns (one scan of each output tree per command).statusno longer counts a downstream unit’s files (x@Clean.fif@Power.nc) as unlisted or incomplete files of the upstream unitx@Clean.Output folders are computed from
source_root(#50):<derivatives_path>[/<derivatives_subdir>]/<dirname(rel)>/<basename>@<name><suffix>whererelis the source path belowsource_root(next to the source withoutderivatives_path). Locations no longer depend on the common root of the discovered files (find_unique_root), so adding files, narrowingfile_pattern, limits, indices or input lists never move outputs; a single-file dataset keeps its folders belowsource_root. Trees written by 0.3.x may sit at other folders (pilot-era roots;neurodags migratemoves them). Two sources mapping to the same outputs (datasets sharing a tree, names differing only in case) are refused before running (DatasetConfigError).InputEnumeration.common_rootsis replaced bysource_roots, and the third value returned byget_all_files_across_datasets/get_all_files_from_pipeline_configurationis now the resolvedsource_rootper dataset.neurodags.utils.find_unique_rootremains as a utility but no longer decides the layout.Two active datasets resolving to the same
derivatives_pathmust use differentderivatives_subdirvalues (#50; unset counts as one value); otherwisevalidateand every run, dry run,status,count-inputsanddataframerefuse the configuration (neurodags.utils.DatasetConfigError).Discovery excludes output trees (#50): a dataset never discovers files below its own
derivatives_path[/derivatives_subdir](when that lies inside itssource_root), nor incode/or.neurodags/under anyderivatives_pathof the configuration, so chained stages do not take their own outputs as inputs..donemanifests define “done” (#27): a unit (source file × derivative) is cached only when<prefix>.done(JSON:manifest_version,naming_version,derivative,source,artifacts,companions,written,origin) parses, matches the derivative and naming version, and every file it lists exists. This replaces the “anyprefix.*file exists” check in execution, dry runs,status, dataframe collection and reuse steps; files matching the prefix but not listed are ignored. 0.3.x outputs have no manifest: they areincompleteand recomputed unless converted withneurodags migrate. On (re)compute the old.doneis deleted before any artifact is written and the new one is published last, atomically (temp file +os.replace);.done,.errorand.skipare mutually exclusive. The dry-run plan’sderivative_outputstep gainsstate,artifacts,origin,manifest_problemandunlisted.neurodags statusreportsincompleteunits (#27; outputs without a valid.done): a new table column, anincompletecount per derivative and ingrand_total,incomplete_indicesandunlisted_filesin--format json,unlistedper file with--include-files. Incomplete units makestatusexit1and are included in--format indices(and in--list-missing). The TUI status table gains the same column.Exact artifact references; no fallback (#49):
derivative: Name.suffixselects the artifact whose suffix key equals.suffixexactly (string equality), whetherNameis done on disk (from its.donemanifest), computed in the same run, or kept in memory (save: false). The 0.3.xendswithmatching on file names is gone:Clean.fifno longer matches a.report.htmlor.EO_baseline.fifartifact, so writeSplitter.EO_baseline.fifin full. A missing suffix no longer falls back to another file or to the wholeNodeResult: it fails the consuming unit with the newneurodags.dag.ArtifactSelectionError(aLookupError;.errormarker when the consumer saves), with the same message on every path, listing the available suffixes. The dry-run plan reports it asselection_problemon the reuse step.A bare
derivative: Nameis allowed only whenNamehas exactly one artifact; it then behaves likeName<suffix>. With several (or no) artifacts it raisesArtifactSelectionError(in 0.3.x: the first file in sorted order, or the wholeNodeResult).Dataframe columns use a new, reversible coordinate encoding (#49,
neurodags.naming.format_column): dimension names and coordinate values are percent-encoded (UTF-8, uppercase hex) instead of the lossy 0.3.x character swaps, and dims are always sorted by encoded name. Wide column names and long-formatderivativevalues change wherever a coordinate contained-,_,@,,, a space or a non-ASCII character, or a dimension name contained anything outside[A-Za-z0-9]:band-8~12→band-8-12,freq-~1.5→freq--1.5,cond-a|b→cond-a%5Fb,ref-a$b→ref-a%40b,x-1.5(from1,5) →x-1%2C5,channel-EEG 001→channel-EEG%20001,freq_band-alpha→freq%5Fband-alpha, and an empty coordinatedim-NA→dim-. Columns split back withneurodags.naming.parse_column; the guide shows a pandas recipe (the dataframe stays “easy to split, not pre-split”: no extra columns). Thesort_flattened_dimsoption ofneurodags.dag.collect_derivative_for_dataframeis removed.Error columns are
<name>.error(were<name>__error); long-format error rows havederivative = "<name>.error".Dataframe column collisions are errors (were warnings in 0.3.5, with the earlier value overwritten): two coordinates of one artifact (non-unique index, or mixed types such as
1and"1"), two artifacts or two derivatives producing the same column raiseneurodags.naming.ColumnCollisionErrornaming the column and both origins, even withraise_on_error=False(never recorded as a per-file.error).neurodags dataframeprints oneneurodags: error: ...line and exits2.Sorted discovery: file indices change once (#41). Per dataset, discovered files are deduplicated and sorted by their path relative to
source_root(/separators, code-point order:sub-10sorts beforesub-2; zero-pad labels for a natural order), instead of the filesystem’s glob order.max_files_per_datasetkeeps the first N after sorting (a limited run is a prefix of the full run) and is applied before indexing, so with a limit--only-indexrefers to the limited list (in 0.3.xrunindexed the unlimited list). Datasets are concatenated in YAML order. Regenerate any stored index lists and SLURM scripts after upgrading.--only-indexwith an unknown or negative index is an error (#41; was a warning, the index being ignored): a cleanneurodags: error: ...line and exit code2on the CLI;neurodags.iterators.IndexSelectionError(aValueError) fromrun_pipeline,iterate_derivative_pipelineandbuild_derivative_dataframe, raised before anything is written.count-inputscounts the enumeration directly (#41; number of index entries, as in 0.3.6) instead of dry-running a derivative;--derivativeis accepted but no longer affects it.slurm-scripttemplates use a frozen input list (#41): the submit instructions runneurodags inputs pipeline.yml -o inputs.tsvand size the array withcount-inputs --inputs inputs.tsv, and the workers passinputs=os.path.abspath("inputs.tsv").Removed APIs:
neurodags.utils.snake_to_camel(kept privately forneurodags migrate),utils.derivative_file_names,utils.check_derivative_names(useneurodags.naming.check_derivative_names),utils.analyze_bids_filename,dag._is_step_cached,dag._artifact_candidates_forand the orchestrator helpers_sanitize_reference_base/_resolve_reference_base(useneurodags.outputs). Deprecated:utils.replace_bids_suffixwarns (DeprecationWarning) and is removed in 0.5.
Added¶
Choose the mount point without editing the pipeline (#66):
-m/--mount-point NAMEonvalidate,run,dry-run,status,count-inputs,inputs,dataframe,slurm-script,migrateandtui;mount_point=onrun_pipeline,iterate_derivative_pipeline,build_derivative_dataframe,enumerate_pipeline_inputs,get_all_files_from_pipeline_configurationandget_datasets_and_mount_point_from_pipeline_configuration; and theNEURODAGS_MOUNT_POINTenvironment variable. Precedence: flag/argument, then the variable, then the YAML’smount_point(an emptymount_point=''or variable counts as unset;-m ''is rejected; a YAMLmount_point: ''is used as is). Amount_pointkey set in a dict config is the YAML level, so the variable overrides it: passmount_point=instead.validate,statusand themigratepreview show the active mount and its source (status --format json:mount_point,mount_point_source);run_pipelineandbuild_derivative_dataframelog them at INFO, andneurodags runrecords them incode/neurodags_env.json.slurm-script -m NAMEexportsNEURODAGS_MOUNT_POINTin the generated jobs (after the environment activation) and adds-m NAMEto theinputs/count-inputscommands; it refuses a mount that no dataset’s map defines (the paths themselves are not checked, they may exist only on the cluster).neurodags-tuiaccepts-mtoo.migrate --mount(earlier 0.4.0 development spelling) still works. New helper:neurodags.datasets.resolve_mount_point.An active mount point missing from a dataset’s mount map is now a clean error naming the available mount points, not a bare
KeyErrortraceback:neurodags.utils.MountPointError(aDatasetConfigErrorthat is still aKeyError), exit2inrun,dry-run,status,inputs,count-inputs,dataframe,migrateandslurm-script -m(validatelists it with its other problems and exits1, as before).enumerate_pipeline_inputsandget_all_files_from_pipeline_configurationnow check the dataset paths first, likerun_pipeline, so they also refuse a mount map that lacks the active mount in any field (derivatives_pathincluded). ADatasetConfigErrornow survives pickling with its message intact.neurodags migrate pipeline.yml [-d DATASETS] [-m/--mount-point NAME] [--apply] [--report plan.json] [--map OLD=NEW] [--legacy-cwd DIR] [--no-synthesize] [--source-root DATASET[:MOUNT]=PATH] [--upstream-map OLDTOKEN=NEWNAME](#49, #50, #27): upgrades a 0.3.x project in one pass, previewing by default. The configuration getsnaming_version: 1, asource_rootper dataset and mount (suggested fromfile_pattern; a filesystem root is never suggested) and relative dataset paths rewritten from the 0.3.x working directory to the YAML’s directory; files are edited in place (comments kept) and written last, with.bak-0.3backups. Existing outputs are found by scanning eachderivatives_path(0.3.x CamelCase tokens, pilot-era flat trees, the pre-0.3.3<derivatives_path>@Deriv.*form,&source names, matched by their 0.3.x spelling) and moved (os.link+os.unlink) to the verbatim 0.4.0 names and folders (x.vhdr&A.fif@B.ncbecomesx.vhdr@A.fif@B.nc);.error/.skipmarkers move with their unit; orphans are left in place, but chained outputs whose upstream source is not discovered are refused (unresolved) rather than recomputed, also when the dataset discovers no source at all. A separate datasets YAML is written before the pipeline YAML, so a run interrupted between the two completes when re-run. MNE split recordings are re-saved with MNE under the new name and verified before the old parts are deleted. Units whose artifact set is known get a.donewith"origin": "migrate". Ambiguous mappings, occupied targets, two old copies of one unit with different content (typically a pilot-era flat copy next to the full-run copy), unwritable folders, cross-filesystem moves and invalid 0.4.0 names (rename with--map) are refused before anything changes.--applykeeps a journal (<derivatives_path>/.neurodags/migrate-journal.json), so an interrupted run resumes, and re-running an applied plan is a no-op. On another mount after the configuration was migrated,--legacy-treealso certifies outputs whose names do not change (refused when the tree shows a 0.4.0 run); without it they are recomputed, and the preview says so instead of “up to date”.--reportwrites the plan as JSON with a dataframe column map (name__error→name.error; best-effort coordinate re-encoding,neurodags.migrate.legacy_column_to_new). See the new guide Migrating to 0.4.done (migrated)inneurodags status(#27): the table gets a(migrated)column when some done units were certified byneurodags migrate;--format jsonaddsmigratedcounts per derivative and ingrand_total, and a per-filelabel(done (migrated)).neurodags inputs pipeline.yml [-d DATASETS] [-o inputs.tsv](#41): writes the frozen input list,# neurodags-inputs naming_version=1followed byindex<TAB>dataset<TAB>rellines (rel: path belowsource_root, POSIX separators), so one list works on every mount.--inputs FILE(#41) onrun,dry-run,status,count-inputsanddataframe(path relative to the working directory), andinputs=onrun_pipeline,iterate_derivative_pipelineandbuild_derivative_dataframe: the list replaces discovery for selection and indexing. Files on disk not in the list are counted and reported (logged; printed bystatus) but not processed; listed files that no longer exist are reported asmissing-sourceat their original index (statusshows them;runskips them with a per-file error record;--only-indexon such an index fails). The list is validated (header/version, known non-skipped datasets, no duplicate indices, indices contiguous from 0); combining it withmax_files_per_datasetis an error.count-inputs --inputsprints the number of entries.neurodags status --format jsongainsinputs,missing_source_indicesandnot_in_listkeys, and amissing-sourcecount per derivative and ingrand_total.derivatives_subdirdataset field (#50, optional): a relative subfolder ofderivatives_pathfor the dataset (validated: no.., not absolute, notcode/or.neurodags/). Outputs of the dataset are written below it. Thecode/snapshot stays at<derivatives_path>/code/.base_dir=argument onrun_pipeline,iterate_derivative_pipeline,build_derivative_dataframe,get_all_files_from_pipeline_configurationandget_datasets_and_mount_point_from_pipeline_configuration: the directory relative paths of in-memory dataset mappings (and, for a dict pipeline, a relativedatasets:reference andnew_definitions) resolve against.neurodags validatedataset report: per active dataset, the active mount point and the resolvedsource_root,file_pattern,exclude_pattern,derivatives_path,derivatives_subdirand resulting output folder; every dataset problem (with thesource_rootsuggestion) as anerror:line on stderr, exit code1. It also warns when a dataset’ssource_rootcontains its own outputs without anexclude_patterncovering them (neurodags.iterators.output_tree_warnings).Writer contract (#27):
Artifact.writer(path)may return the list of files it wrote (orNone= exactlypath); the.donemanifest is built from these reports and every reported file must exist. Newneurodags.writers.save_mne(obj, path, **kwargs)returns every part of an MNE split recording (X.fif,X-1.fif, …), used by the built-in preprocessing nodes. Files a writer does not report are discarded, except files of an MNE split recording (neuromag or BIDS split names) of which the writer reported only some: a writer that saves an MNE object and returnsNone(def w(p): raw.save(p), which worked in 0.3.x) or part ofsave()’s list fails the unit with.errorwhen MNE split the recording, instead of certifying a truncated one. Usesave_mne. A reported file that is a symbolic link, or resolves outside the folder the writer was given, fails the unit. So does a file that is gone, now a link, or has another size or modification time than when its own writer returned (a later writer may read earlier artifacts, not change them).neurodags.naming(#49, #50): pure functions that define the 0.4.0 naming rules in one place: derivative-name grammar and validation (check_derivative_names: string keys, reservedSourceFile, case-insensitive uniqueness, theX/X-1split-file rule), the optional key-value convention (Fit_alpha-0p5_w-6,alpha-0p5_w-6_Fit) withparse_entitiesandencode_number/decode_number(0p5,m1), artifact suffix validation, output basenames (<source>@<name><suffix>), reference parsing, and reversible dataframe columns (format_column,parse_column,decode_dim,decode_value,ColumnCollisionError).neurodags.outputs(#27, #50): the single layout and completion module —output_reference_base,entry_reference_base,output_prefix,check_output_collisions,writer_paths,build_manifest,write_manifest,read_manifest,manifest_artifacts,unit_state(done,error,skipped,incomplete,missing),publish_marker,remove_markers.Enumeration API in
neurodags.iterators(#41):discover_inputs,load_inputs,enumerate_inputs,enumerate_pipeline_inputs,read_inputs_file,write_inputs_file,format_inputs, and theInputEnumeration/InputEntryrecords (each entry exposesindex,dataset,rel,pathandmissing).run_pipelineanditerate_derivative_pipelineaccept a precomputedenumeration=.get_all_files_across_datasets/get_all_files_from_pipeline_configurationkeep their return shapes on top of it (see Breaking for their third value).neurodags.loaders.load_pipeline_configuration(loads a pipeline and checks its version and names) andneurodags.loaders.check_pipeline_names(config)(validates every name and returns the warnings).Helpers in
neurodags.utils:resolve_config_path,resolve_dataset_field,suggest_source_root,relative_to_source_root(lexical check that a file lies strictly belowsource_root),check_derivatives_subdir,effective_derivatives_baseandinspect_dataset_paths.
Changed¶
Once a run starts moving a unit’s files into place, the unit’s staging folder is removed only after its
.doneis written: any stop in between (an exception, Ctrl-C,SystemExit, a kill) keeps it as the trace of a possibly half-published unit; it was removed.statussays which staging folders belong to units without a.done(recompute those before deleting them) and which to done or skipped units. Only names of the form.<output prefix>.tmp~<16 hex digits>count as staging folders. A failure before any file was moved still removes it.neurodags runexits1when a unit failed, after processing every requested input (it exited0; the failed units have.errormarkers). Inputs listed in--inputsthat no longer exist (missing-source) are not failures.run_pipelineanditerate_derivative_pipelinetakefailures=(a list that receives one record per failed unit).One enumeration per invocation (#41):
run_pipelinediscovers the inputs once and shares them with every derivative (it rediscovered per derivative), andbuild_derivative_dataframescans once (it scanned twice).Documentation: new guides File Naming and Output Layout (rewritten for 0.4.0: names, layout, manifests, unit states, references, column names) and Migrating to 0.4 (upgrade checklist, reading the preview, the pilot-copy refusal, refusals table); every guide, the README, the comparison page, the gallery examples and
example_pipelines/use the 0.4.0 configuration surface. Every complete pipeline and datasets YAML shown in the docs is validated by the test suite (tests/test_docs_yaml_snippets.py).
Fixed¶
Outputs could be recomputed or written to a new folder when the set of discovered files changed (#50): 0.3.x placed outputs below the common root of the discovered files, so a pilot run on one subject and a later full run wrote the same unit to two folders, and the full run recomputed it. Locations now depend only on
source_rootand the file’s own path.A partially written unit counted as done (#27): any file with the output prefix made a unit cached, so an interrupted multi-artifact write or a missing MNE split part was never recomputed. A unit is now done only when its
.donemanifest lists every file.File indices depended on the filesystem’s glob order (#41), so the same
--only-indexcould select different files on two machines or after files were added; discovery is now sorted, andneurodags inputsfreezes the list.Lossy dataframe column names (#49): distinct coordinates such as
a-banda~b, ora_banda|b, produced the same column; the new encoding is reversible.datasets_psycho.yml’sfirfile_patternwas a bare directory and is now a**/*.vhdrglob.Runtime integrity of units (0.4.0 review): artifact suffixes such as
.EO.fifand.EO-1.fifin one result are rejected (MNE’s split part of the first is the second), and two artifacts reporting the same file fail the unit instead of certifying an overwritten recording. Artifacts are written in a hidden staging folder next to the outputs and moved into place withos.replace(split parts first, main file last) before.doneis published, so a killed task never leaves a partial file under an output name and nothing blocks the next run;statuscounts leftover staging folders (staging_dirs)..donerecords a[size, mtime_ns]fingerprint per file, and a file changed after publication (e.g. by a second job on the same unit) makes the unitincomplete; copy trees withrsync -a/cp -a. Running two jobs on one unit at once, or overwriting a unit another job reads, is documented as unsupported. Artifact writers must write next to (or below) the path they are given, under names starting with the unit’s prefix (a sharedfigs/folder fails the unit); unreported files are discarded.migrateon a configuration that already declaresnaming_version: 1no longer certifies files without a.done(an interrupted run) unless it moved them itself. The TUI status counts skipped and no-save units. An overwrite also drops an old.skipbefore recomputing. Asave: falsederivative reached as a dependency is no longer read from an old manifest. A failing dependency or argument preparation now writes the consuming unit’s.errorand removes its old.done.neurodags migrate(pre-release fixes):--applynever replaces an existing file (moves and staged, verified MNE re-saves are published withos.link; a filesystem without hard links is refused before any change) and holds lock files next to the pipeline and in each output tree, never taken over automatically, also for configuration-only runs; a torn journal tail is tolerated;--map A=Bonto another definition is refused; compressed split recordings (.fif.gz,.fif-N.gz) stay one artifact and re-saves use MNE’s default split size; interrupted split moves resume after any number of interruptions, and FIF recordings (single files too) are loaded in full before their.done; a unit’s.donelists all its artifacts; a split rewrite into a new folder works; re-running after keeping an identical duplicate (also a split recording whose kept copy was re-saved) is a no-op.0.4.0 release-candidate integration fixes (review of c823337):
migrateno longer re-certifies a unit from a completed migration’s journal: a migrated unit later overwritten byneurodags runand interrupted (or edited) stayeddoneafter the nextmigrate --apply. Each successful--applynow ends with anapply-completejournal record, and only an unfinished (interrupted) migration’s records grant ownership of files at their new names;moverecords (and a newmove-startrecord written before each move) carry the file’s[size, mtime_ns], which must still match.migrateno longer combines disjoint artifacts from different runs (e.g. a partial pilot copy with.a.txtand a partial full-run copy with.b.txt) into one unit certified complete; without journal proof that an interrupted migration was moving one unit, such groups are refused, listing every location..donefingerprints compare size andmtime_nsexactly: the one-second tolerance accepted a same-size replacement made right after publication. Copies must keep nanosecond mtimes (cp -a/rsync -aon Linux do); a filesystem that truncates timestamps causes recomputes, never false hits.The 0.3.x-output guard treated a real recording-container source named with
&(rec&run.ds,.mff, a directory) as absent, so after an.error(or an interrupted publication)runandstatusdemandedneurodags migrate; it now uses discovery’s input predicate.migratecompares trees, candidates, journal records, targets and locks withlexical_path_key: output roots spelled/x/outand//x/out(distinctderivatives_subdir) are one tree, scanned and locked once, instead of two plans and a refusal on the run’s own lock.
slurm-scriptignored-dand, forper-file,--derivative: the generated jobs froze, counted and ran the pipeline’s own datasets, and the per-file worker ran the wholeDerivativeList. Every template now passes the resolved-d(absolute) toneurodags inputs/count-inputsand asdatasets_configuration=, and the per-file worker passesderivatives=[...]. Pipeline and datasets paths are now shell-quoted and reach the workers as arguments of a quoted heredoc (never interpolated into shell or Python source), so a name with spaces, quotes,$or backquotes runs the intended pipeline. The chained submit script passes--export=ALL(withoutALL, SLURM replaced the job environment, droppingPATHand the activated environment) and gives each array its derivative as the worker’s argument (run_one_derivative.sh <derivative>), not asDERIVATIVE=in--export, where an inheritedDERIVATIVEwould take precedence. Regenerate scripts made with-dor--derivative, or for such paths.The TUI showed one datasets YAML and ran another: a relative override typed in the Config tab was read against the current directory for the summary but against the pipeline’s directory when running. It is now resolved like
-d(current directory), stored absolute and summarized with the loader the runs use; a missing file is an error.statusreportedcomplete(exit0) when units could not be planned: a per-file planning error (for example an argument naming a node id that does not exist) dropped the unit from the dry run. Such units are now reported asplanning-error(JSONplanning_error_indices, message on stderr), the report is not complete andstatusexits1(0with--exit-zero);dry-runsaves the plan with aplanning_errorcolumn and exits1. The TUI Status tab counts them as errored. Empty discovery still succeeds.Discovery fixes (spec §8): a pattern matching a file more than once (
raw/**/**/*.fif) no longer drops the entry file of a BIDS split recording;exclude_patternnow matches other spellings of the same path (raw/./**,//,.., a leading//on POSIX; lexical, symlinks are not resolved); and inputs are files or recording containers only: a directory is an input only when its name ends in.ds(CTF) or.mff(EGI), case-insensitively (neurodags.iterators.RECORDING_CONTAINER_EXTENSIONS), and then as one input: nothing inside such a folder is an input, whatever the pattern, and a frozen list naming such a path is refused. Other directories matched by a broad pattern (raw/**/*), including the dataset’s own output folder, are no longer enumerated, and a frozen list naming such a directory is refused. This changes indices for configurations whose pattern matched ordinary directories or the inside of.ds/.mffrecordings; regenerate frozen lists (neurodags inputs) for them.Output-collision checks ignored a POSIX leading
//: two datasets whose output roots were spelled/x/outand//x/outpassed both the shared-derivatives_pathcheck and the per-source collision check, so two sources could share one artifact. Both now compare paths with the same lexical identity as discovery (neurodags.utils.lexical_path_key).TUI DataFrame filter: derivative names are whitespace-separated as specified (
A B); commas are still accepted.
0.3.6 — 2026-10-12¶
Fixed¶
count-inputsundercounted when a file is listed under more than one dataset entry: it printed the number of unique file paths, while--only-indexnumbers (dataset entry, file) pairs. With the same recordings in two dataset entries (e.g. one entry per condition), a SLURM array sized withN=$(neurodags count-inputs ...)was too small and the last indices never ran. It now prints the number of indices. Pipelines where each file appears in only one dataset entry get the same number as before.
Documentation¶
The CLI reference said “paths inside the YAML are relative to the YAML”, which is only true for the
datasets:key inpipeline.yml. Paths inside a datasets YAML (file_pattern,derivatives_path,exclude_pattern) are resolved against the current working directory; the page now lists each case.
0.3.5 — 2026-10-12¶
Added¶
neurodags status --exit-zero(#45): exit0whenever the report was produced, even if derivatives are missing or errored, sostatuscan run as a pure report — e.g. a short job chained with--dependency=afterok, where exit1would cancel everything after it. Works with every--format(table,json,indices). Real failures (missing or invalid config, unset environment variable, unreadable-dfile) still exit non-zero. The default exit codes are unchanged (1when anything is missing or errored). The HPC and inspection guides now recommend--exit-zeroinstead of|| true, which also hid config errors.“File Naming Conventions” docs page (
user_guide/naming.md, #42), linked from the pipeline YAML guide, Core Concepts and Dataframe Assembly: the@/&output-name rules, the derivative-name conversion and the rejected names, artifact suffixes (must start with.),.error/.skipmarkers, howderivative: Name.extreferences are parsed (YAML name, split at the first.), reserved arg strings (id.N,id.N.field,$var,eval%), the output layout (common root, single-file datasets, noderivatives_path,code/snapshot) and dataframe column names (YAML name, flattened@dim-value_...suffixes and their escaping, how to read a column back), with a worked example tree and a Do / Don’t table. Core Concepts’ output example now shows the source extension (sub-1.fif@CleanedEEG.fif), and Dataframe Assembly’s example columns now match the real format (BandPower.nc@freqbands-alpha). The page notes that the collision check is per pipeline config (two pipelines sharing aderivatives_pathare not checked against each other), thatsnake_to_camellowercases the rest of each_-separated part (ICA_cleaned→@IcaCleaned), and that a naming redesign is planned for 0.4.0. Thesnake_to_cameldocstring explains why the conversion exists.Comparison page wording (#42): NeuroDAGs is described as input-naming-convention agnostic (input names kept, no BIDS validation, optional
bids_parsenode) instead of “BIDS-Preserving”, and the output strategy as appending@<Derivative><suffix>to the source name, with the layout mirroring the input below the discovered files’ common root, instead of an unconditional “perfect mirror”.
Changed¶
-d/--datasetsis resolved relative to the current working directory (#43): every subcommand that takes-d(validate,run,dry-run,dataframe,count-inputs,status,slurm-script,tui, and the legacyneurodags-tui) now resolves the path against the directory the command is run from, after expanding~and$VARSlike thedatasets:key. Previously it was joined onto the pipeline YAML’s directory, soneurodags run pipelines/x/pipeline.yml -d pipelines/x/alt.ymllooked forpipelines/x/pipelines/x/alt.yml. The rule is now: CLI paths are relative to where you run the command; paths inside the YAML (thedatasets:key) stay relative to the YAML. Behaviour change: a relative-dpath that exists relative to the working directory is now used even if a different file with that name exists next to the pipeline YAML. For backward compatibility, a path that only exists relative to the pipeline YAML is still used, with a one-lineneurodags: warning: ...on stderr showing the cwd-relative path to pass instead (aFutureWarningfromneurodags.cli.resolve_cli_datasets_path); this YAML-relative fallback will be removed in a future release. The Python API is unchanged: a relativedatasets_configurationstring passed torun_pipeline/iterate_derivative_pipeline/build_derivative_dataframeis still resolved relative to the pipeline YAML (now documented in their docstrings).On-disk derivative names are shown (#42):
neurodags validatelists each derivative whose on-disk name differs from its YAML name (e.g.fit_w_l06 -> files named @FitWL06). The naming rule itself is unchanged: it keeps the derivative name a single token without_(a separator in many naming conventions, including BIDS), and existing caches keep working.
Fixed¶
YAML merge keys (
<<: *anchor) failed to load (#44): the duplicate-key-checking loader (UniqueKeySafeLoader) overrodeconstruct_mappingwithout flattening merge keys, so a pipeline such asargs: {<<: *fitargs, space: a}failed withcould not determine a constructor for the tag 'tag:yaml.org,2002:merge', and shared node arguments had to be repeated in every derivative. The loader now flattens merges as PyYAML’sSafeConstructordoes, with standard semantics:<<: *aand<<: [*a, *b]are supported, keys written in the mapping override merged ones, and with a list of merges the earlier one wins (results matchyaml.safe_load). Duplicate keys are still rejected with their line/column, both in a mapping that uses a merge and inside an anchored mapping; only keys written explicitly in the same mapping count, so overriding a merged key is not a duplicate.register_derivatives_from_yamland the built-inderivatives/pipeline.ymlnow load throughload_configurationtoo, so every pipeline YAML path rejects duplicate keys the same way.Missing
-d/--datasetsfile crashed with a traceback (#43): when the file exists neither relative to the working directory nor relative to the pipeline YAML, or references an unset environment variable, the CLI now prints a one-line error naming the paths it tried and exits with code2, instead of anOSErrortraceback from the YAML loader.Colliding or layout-breaking derivative names silently shared cached outputs (#42): derivative names are converted with
snake_to_camelto build file names (<source>@<OnDiskName><artifact suffix>), so two different derivatives such asband_powerandBandPowerboth wrote and read@BandPowerfiles; because caching is existence-based, the second one silently reused the first one’s output. Every name inDerivativeDefinitionsis now validated up front (not only the run set: dependencies are pulled in and all derivatives share the derivatives directory), raising aValueErrorthat lists each problem:two names with the same on-disk name — the message names both YAML names and the shared
@<OnDiskName>— or on-disk names equal up to case (the same file on case-insensitive filesystems, e.g.Bandpower/band_power);names containing
.(the artifact-suffix separator:Fit.v2’s files@Fit.v2.*matchedFit’s cache lookup@Fit.*, soFitwas never computed and its dataframe columns showedFit.v2’s data),@(breaks the one-@-per-file-name rule),/or\(path separators: the write failed), or the glob characters*,?,[,](the cache lookup globbed them:F*treated@Fit…files as its own);the reserved name
SourceFileand the empty name (derivative: SourceFilealways means the raw input, so such a derivative could never be referenced).
The check runs in
neurodags validate(exit code 1) and before anything is written inrun_pipeline/iterate_derivative_pipeline/build_derivative_dataframe(and henceneurodags run,dry-run,status,count-inputs,dataframe), so it is never swallowed into per-file error records. New helpersneurodags.utils.derivative_file_namesandcheck_derivative_names. Behaviour change: pipelines with such names now fail fast; they were producing wrong results (or failing per file) before. Rename the derivative(s). On-disk naming of all valid names is unchanged.Cached outputs were not found when a path contained
[,],*or?: the cache lookup globbed<output prefix>.*with the literal output path, so glob metacharacters in the source file name or in any parent directory name (e.g.study [2024]/sub-01.vhdr) were interpreted as a pattern. Affected users: anyone whose source files, dataset directories orderivatives_pathcontain[,],*or?. For them every derivative was silently recomputed on every run,neurodags status/ dry-run reported those outputs as missing,derivative: Name.extreuse steps recomputed the upstream derivative, andfor_dataframederivatives were skipped during dataframe collection. A bracketed name could also produce a wrong cache hit (a[1].fifmatched the outputs ofa1.fif). The literal prefix is now escaped (only the trailing.*is a pattern) and only regular files count as artifacts. Output paths are unchanged, so after upgrading existing outputs are found again — no recompute needed.file_pattern/exclude_patternare still user glob patterns: a literal bracketed directory there must be escaped by the user (e.g.study [[]2024]/**/*.vhdr, seeglob.escape).Dataframe column collisions are now reported instead of silent: when flattening an xarray artifact, coordinate values are encoded into column names (
-→~,_→|,@→$,,→.), so distinct coordinates such asa-banda~bmap to the same column and the earlier value was overwritten without notice. A warning (Dataframe column collision while flattening artifact ...) now names the derivative, artifact suffix, generated column suffix, and both original coordinate sets. Likewise, when two derivatives produce the same column in a dataframe row, a warning (Dataframe column collision: derivative produces columns already present in the row ...) names the columns, the derivative being merged and the previous owner. Output (column names, last value wins) is unchanged; the encoding itself will be revisited in 0.4.0.Mermaid diagrams with non-identifier derivative names (e.g.
psd-welch):pipeline_to_mermaid/neurodags dagused raw derivative names as Mermaid node ids, which produced invalid diagrams for names containing-or other punctuation. Such names now get a sanitized id (non-word characters →_, de-duplicated with a numeric suffix if needed) and keep the real name as the node label. Diagrams whose names are already valid ids are unchanged.
Documentation¶
The pipeline YAML guide has a new section on sharing node arguments across derivatives with anchors and merge keys, kept under a top-level helper key such as
_defaults(unknown top-level keys are ignored by the loader andneurodags validate).
0.3.4 — 2026-10-12¶
Added¶
basic_preprocessing(average_psd=...): withextra_artifacts: true,average_psd: trueplots each report PSD averaged across channels (one trace) instead of one trace per channel, which makes filter roll-offs easy to see. Defaultfalsekeeps the previous figures.Quickstart preprocessing template in
example_pipelines/(pipeline_quickstart_preprocessing.yml+datasets_quickstart_preprocessing.yml): band-pass 0.1–75 Hz, 2 s epochs, resample to 256 Hz, plus an MNE Report — built-in nodes only, paths from$RAW_DATA/$OUTPUT_DIR. Documented in the Quickstart guide and run end-to-end in the test suite.
0.3.3 — 2026-10-12¶
Fixed¶
Relative paths broke with
n_jobs>1after an in-processchdir(#35): loky reuses worker processes, and a reused worker keeps the cwd it was started with. After anos.chdirin the parent (notebooks, tests, scripts callingrun_pipelinemore than once), workers resolved relative source files,derivatives_pathandcommon_rootagainst the stale cwd: inputs were not found, outputs (or “cached” hits) landed in the previous directory, whilen_jobs=1worked. The parent now makes the source file path, the dataset path fields (file_pattern,derivatives_path,exclude_pattern) and the common root absolute before dispatch, forrun_pipeline/iterate_derivative_pipelineandbuild_derivative_dataframe. The derivative layout is unchanged (the path relative to the common root is the same), and the reportedfile_path(logs, dataframe column, dry-runfile_pathcolumn) keeps the discovered spelling. Behaviour change: nodes and derivatives now receive the absolute source path (e.g. theSourceFilepath and dry-runfileentries), and outputs of datasets withoutderivatives_pathare addressed by absolute path; the files land in the same place.Parallel dataframe workers lacked
new_definitionscustom nodes (#36):build_derivative_dataframeloaded custom nodes only in the parent, so withn_jobs>1a fresh worker computing an uncached orsave: Falsederivative that used a custom node failed withUnknown node. The absolute custom definition paths are now sent to each worker and loaded there, asrun_pipelinealready did.Inspection commands no longer create output directories (#33):
neurodags status,dry-run,count-inputs(andrun_pipeline(..., dry_run=True)) createdderivatives_pathand its per-file subdirectories as a side effect of computing output paths. Computing the reference base is now pure; directories are created only when something is about to be written — by real (non-dry) runs before each file is processed, and byrun_derivativejust before it computes.build_derivative_dataframetherefore only creates directories when it has to compute a derivative, not when it reads cached outputs. (orchestrators._resolve_reference_base,dag.run_derivative)Single-file datasets write inside
derivatives_path(#34): for a dataset matching exactly one file,find_unique_root(..., mode="maximal")returned the file itself, so outputs were written as siblings of the derivatives directory (<parent>/derivatives@Meta.json). The root is now always a strict ancestor of every input (the file’s parent directory for a single file), so outputs land at<derivatives_path>/<file name>@Meta.json— the same layout as files sharing a directory in a multi-file dataset. A reference base that would still resolve to.is also mapped to the file name. (utils.find_unique_root,orchestrators._resolve_reference_base)Behaviour change (single-file datasets only): outputs previously written as
<derivatives_path>@<Derivative>.*(next toderivatives_path, named after it) are not found any more and will be recomputed; move them to<derivatives_path>/<source file name>@<Derivative>.*to reuse them. Output paths for datasets with two or more files are unchanged, so existing caches keep working.
0.3.2 — 2026-10-12¶
Added¶
Parser nodes +
id.N.fieldfield access (#8): a parser node takes a file path and returns a flat dict of properties; downstream args can now pull a single field withid.N.field(e.g.subject: id.1.subject) instead of each node re-parsing the path. New built-inbids_parseextracts BIDS entities viamne_bids.get_entities_from_fname. The arg resolver supportsid.N.fieldalongside the existing whole-resultid.N. Field keys must be plain identifiers —.is the reference separator, so dotted/dashed/nested paths (id.1.a.b,id.1.some-key) are rejected with a clear error; parser output must stay flat with identifier keys (values are unconstrained). Field access also works when the parser derivative is served from cache (derivative: Name.json): the cached.jsonartifact is loaded back into a mapping; field access on any other cached artifact raises. Mermaid diagrams draw edges forid.N.fieldreferences. See the new Parser Nodes user guide. (nodes.parsers.bids_parse,dag._resolve_refs)Behaviour change: a literal string arg that starts with
id.<digits>.(e.g."id.1.subject"or"id.2.a.b") is no longer passed through verbatim — it now resolves as a field reference or raises an error.neurodags statusreports file indices for--only-indexresubmission (#29): the global file index — the one--only-indexand the SLURM array templates consume — was dropped from the status rows, so there was no direct way from “which files are missing/errored” to “resubmit exactly those”.--list-missing/--list-errorsnow print[idx N] path, sorted by index within each derivative (theerror file:lines are kept). Behaviour change: scripts that scraped paths from these text lists see the new[idx N]prefix; use--format jsonfor machine consumption.--format jsonalways addsmissing_indicesanderrored_indices(sorted, de-duplicated ints). All existing keys are unchanged.New
--include-files(requires--format json) adds a flatfileslist with one{index, dataset, file_path, derivative, status, error_path}record per (source file, derivative) pair, sorted by(index, derivative).New
--format indicesprints only the space-separated, sorted missing/errored indices (narrowed by--list-missing/--list-errors), ready for--only-indexorsbatch --array. The exit code keeps its meaning (1when anything is missing or errored), so guard$(...)with|| trueunderset -e.See the new “Resubmitting missing/errored files” section in the HPC guide (retry workers must not use
skip_errors=True; flat-array task IDs are not file indices).
Fixed¶
status --format jsonwith no input files emittedNo files found.(invalid JSON); it now emits a valid document with zero counts, empty index lists and"complete": true.
0.3.1 — 2026-10-11¶
Fixed¶
Slow CLI startup (#30):
import neurodags.clitook ~7.5 s because node discovery importedantropy(which JIT-compiles numba kernels at import),neurokit2,matplotlibandfooof, anddatasets.pyimportedmne.export. These are now imported the first time a node that needs them runs (andmne.exportonly insidesave_dummy_vhdr);nodes/spectral.pyalso uses postponed annotations so itsmne.io.BaseRawsignatures no longer loadmne.io/mne.viz/matplotlib at import. CLI startup drops from ~7.5 s to ~1.3 s; the saving also applies to every parallel worker and SLURM task that does not run those nodes.matplotlib.use("Agg")is no longer a side effect of importingneurodags; it now happens when a neurokit node first executes. Behaviour change: ifantropy,neurokit2orfooofis missing, the corresponding nodes are now still registered and raise an actionableImportErrorwhen called (recorded as a per-file error), instead of being silently skipped at discovery and failing withKeyError: Unknown node. (nodes/antropy.py,nodes/neurokit.py,nodes/spectral.py,datasets.py)~and$VARSin dataset paths are now expanded (#28):file_pattern,derivatives_path,exclude_patternand thedatasets:reference inpipeline.ymlexpand a leading~and$NAME/${NAME}(%NAME%on Windows) for the active mount point. Previously they were used verbatim, soderivatives_path: $SCRATCH/outsilently wrote derivatives (and thecode/snapshot) into a literal./$SCRATCHdirectory. Thedatasets:reference is now expanded before being joined to the pipeline directory, andderivatives_pathis resolved in the parent process before dispatching parallel workers. (utils.expand_path,utils.get_path,utils.resolve_dataset_paths)New error: a referenced environment variable that is unset or empty now raises
ValueErrornaming the field and variable.run_pipeline/neurodags run/dry-run/status,build_derivative_dataframe/neurodags dataframeandneurodags validatecheck every active (non-skipped) dataset before anything is written, so the error is not swallowed into per-file error records. Inactive mount-point entries are not checked.neurodags validatenow also prints the resolved paths for each dataset.Docs site now shows the released version: the Docs workflow checked out without tags, so hatch-vcs fell back to
0.1.dev1+g<hash>on the published documentation. The workflow now fetches full history and tags (fetch-depth: 0), anddocs/conf.pydisplays the nearest release tag (falling back to the installed dist version), so the site shows e.g.neurodags 0.3.0 (<commit>). (.github/workflows/docs.yml,docs/conf.py)
0.3.0 — 2026-07-13¶
Added¶
neurodags statuscommand: new inspection subcommand reporting, per derivative, how many source files are done / skipped / missing / errored — without opening a CSV. Supports--derivativeselection,--list-missing/--list-errorsto print the offending paths,--format jsonfor machine-readable output (config,n_files, per-derivative counts,grand_total, and acompleteboolean), and--n-jobsfor parallel status collection. The skipped column reports derivatives with a.skipmarker (seeSkipDerivative) distinctly from missing. (cli._cmd_status,cli._status_classify)Parallel processing (
--n-jobs):run,dry-run,dataframe, andstatusprocess files in parallel via joblib.--n-jobs N(or-1for all cores;1/Nonestays serial), with optional--joblib-backend/--joblib-prefer. Per-file parallelism uses separate processes (loky) to avoid HDF5/NetCDF4 thread-safety issues. Also exposed asn_jobs=oniterate_derivative_pipeline/run_pipeline/build_derivative_dataframe.Global logging options
--log-level/--log-file: set console verbosity (DEBUG/INFO/WARNING/ERROR, defaulting to$LOG_LEVELorINFO) and optionally tee all log events to a JSONL file (one JSON object per line, loadable withpandas.read_json(path, lines=True)). (cli,loggers.configure_logging)SkipDerivativeexception: nodes can now raiseSkipDerivativeto signal that a source file is intentionally not processable by a given derivative — distinct from an unexpected error. neurodags catches this, writes a.skipmarker file alongside where the artifact would have been saved, and propagates the skip to all parent derivatives that depend on it (each writing their own.skipmarker). Skipped derivatives are not retried on subsequent runs unless the.skipfile is deleted oroverwrite: trueis set. Motivation: in multi-condition studies, some subjects may not have undergone every condition; withoutSkipDerivative, their missing conditions showed as missing inneurodags status— indistinguishable from derivatives that simply had not run yet, which made pipeline completion state ambiguous. (definitions.SkipDerivative,dag.run_derivative,neurodags.SkipDerivative)neurodags dag --layout: new flag for HTML DAG output selecting the layout engine.elk(default) uses orthogonal routing via ELK — requires CDN access.dagreuses right-angle step edges with no CDN dependency — suitable for offline environments. Also available aslayout=in the Python API (pipeline_to_html,derivative_to_html,save_mermaid_html).Dataset-level variables (
vars:): dataset entries indatasets.ymlcan now declare avars:block of arbitrary key-value pairs. Any pipeline node arg whose string value matches$identifieris substituted with the corresponding value from the active dataset entry’svarsat runtime, afterid.Nreference resolution. Only whole-string values are substituted — embedded$in paths or other strings is left untouched. Variables may be any YAML type (string, int, float, bool, list). Referencing an undefined variable raisesKeyErrorwith the list of available vars. Primary use case: encoding a condition name (or any dataset-specific parameter) in the dataset entry so that activating a different entry changes bothderivatives_pathand pipeline behaviour in one step, with no pipeline YAML edits required. (definitions.DatasetConfig.vars,dag._resolve_vars,dag._prep_kwargs)In-memory multi-artifact selection: when a node returns a
NodeResultwith multiple artifacts (e.g. a splitter that produces one artifact per condition), downstream derivatives can now select a specific artifact using the existing dot-extension syntax —derivative: SplitterName.condA.fif— even when the splitter has not yet been written to disk. Previously this selection only worked for on-disk (cached) artifacts; the in-memory path passed the fullNodeResultand relied on the_unwrap_for_argheuristic, which returned the first matching artifact regardless of the requested suffix. The fix applies the same suffix filter to the in-memoryNodeResultthat was already applied to on-disk candidates, making both paths consistent. A warning is logged when the requested suffix is absent from the splitter’s artifacts. (dag.run_derivative)Config snapshot on
neurodags run: before executing any derivatives, the pipeline YAML,new_definitionsfile(s), and datasets YAML are copied toderivatives_path/code/. Aneurodags_env.jsonfile is also written with the installed neurodags version, git commit of the source repo (when installed from a checkout), and a UTC timestamp. Skipped on dry runs; failures are warnings, never errors. (orchestrators._snapshot_pipeline_config)TUI Status tab: the Textual TUI gained a Status tab that displays per-derivative pipeline status and errors, mirroring the
neurodags statuscommand. (tui)neurodags viewrenders neurokit2 figures: the interactive.nc/.fifexplorer now renders neurokit2figure_png_hex/figure_rgbaartifact variables as images. (visualization)
Changed¶
neurodags validatereports the effective run set instead of a misleadingderivatives_enabled(#17): the old output printedderivatives_enabledequal to the fullDerivativeList, which read as “what a run computes” but ignored--derivativeselection and dependency resolution.validatenow takes an optional--derivative(repeatable, defaults toDerivativeList) and printsrun_set(the selection),computed_with_dependencies(the selection plus the intermediates auto-computed as its dependency closure — what a run actually produces), which of those arefor_dataframeoutputs, andnot computed by this runfor the remaining defined derivatives. (cli._cmd_validate,cli._dependency_closure)neurodags statusexit code: exits1when any derivatives are missing or errored (not only errored). Enables use in CI and shell dependency chains:neurodags status pipeline.yml || sbatch resubmit.sh.DAG HTML visualization uses ELK layout by default: Mermaid diagrams now use the ELK layout engine (orthogonal edge routing, crossing minimisation) instead of dagre with bezier curves. Significantly cleaner for dense pipelines. Use
--layout dagrefor offline use. The raw Mermaid text output (neurodags dagwithout--html) is unchanged.neurodags countrenamed toneurodags count-inputs: clarifies that the command counts source (input) files the pipeline will process, not output files or derivative instances. One input file may produce multiple output files depending on the derivatives. All generated SLURM templates, documentation, and tests updated accordingly.
Fixed¶
Inspection subcommands no longer pollute stdout with logs (#15):
status,validate, anddagwrite their deliverable (table /--format json/ Mermaid) to stdout, but framework logs — including the per-file INFO fromstatus’s internal dry-run and the import-time built-in derivative registration — were written to stdout too, so the result was buried and--format jsonwas not pipeable (even with stderr redirected, because the chatter was on stdout). structlog output now routes to stderr (TTY/JSON detection uses stderr), and a lightweight import-time bootstrap installs a stderr-routed, level-filtered default before the built-in registration runs, soneurodags status … --format json 2>/dev/nullyields a single clean JSON document. (loggers.configure_logging,loggers._bootstrap_quiet_default)No more
fooofDeprecationWarning on every CLI invocation (#16): importing the node registry pulled infooof, whose__init__callswarnings.simplefilter('always')and then warns about its rename tospecparam— printing the notice to stderr onstatus,validate,dag,run, etc. The import innodes/spectral.pyis now wrapped inwarnings.catch_warnings(record=True), which swallows the notice and restores the prior warning-filter state (fooof’s'always'reset no longer leaks process-wide). neurodags still depends on fooof; migration tospecparamis tracked separately. (nodes.spectral)Parallel workers can now resolve uncached inter-derivative references (#18): YAML
DerivativeDefinitionswere registered only in the main process, so with--n-jobs > 1a fresh (loky) worker that had to compute a referenced sub-derivative — rather than read it from disk cache — raisedValueError: Unknown derivative '<Name>.nc'. The bug was masked whenever the intermediate was already cached (the disk-cache path needs no registry) and disappeared under--n-jobs 1. The fullDerivativeDefinitionsmap is now threaded into each_FileJoband re-registered at the top of_process_file_job(mirroring howcustom_node_pathsre-registers nodes), and_collect_dataframe_filere-registers the map it already receives — so both therunanddataframepaths resolve fresh nested derivatives in parallel. (orchestrators._FileJob,orchestrators._process_file_job,orchestrators._collect_dataframe_file)aggregate_across_dimensionno longer silently drops non-finite values (#19): a reduction such asmean/stdruns with xarray’s defaultskipna=True, so NaN values along the aggregated dimension were dropped with no record — a per-channel mean over 2 surviving epochs looked identical downstream to one over 13, and since missingness is often not-at-random (e.g. failed FOOOF fits concentrating in one condition) this was a data-quality/leakage hazard. The node now takeson_dropped("warn"default →log.warningwith the dropped count;"raise"to fail fast;"ignore"for the old behaviour) and an opt-inemit_countsflag that attachesn_used/n_droppedcoordinates to the aggregated array so per-value reliability is queryable. Fires only when a reduction actually skips NaN (float data,skipnain effect); pipelines with no non-finite values are unchanged. (operations.aggregate_across_dimension)Split-FIF continuations no longer scanned as separate source files: MNE splits recordings larger than ~2 GB across multiple
.fiffiles, of which only the first (entry) file is an independent recording — the continuations are stitched back in transparently bymne.io.read_raw_fif(entry). The file scanner used a bareglob.glob, so every continuation was returned as its own source file and the pipeline ran derivatives on partial data, emitting duplicate/garbage rows. The scanner now drops continuations while keeping the entry, for both conventions: BIDS_split-01_(kept) vs_split-02_+ (dropped, zero-padding aware), and plain-mnename.fif(kept) vsname-1.fif/name-2.fif+ (dropped). Detection is filename-based and cheap (no file reads); the plain-mne-Nrule only fires when the entry file is also present in the scan, so legitimately named files such assub-01_..._run-2_meg.fifare never dropped. Controlled by the newdrop_split_continuationsflag (defaultTrue) — a per-dataset field onDatasetConfig(opt out one dataset) and a parameter onget_files_from_pattern/get_all_files_across_datasets/get_all_files_from_pipeline_configuration(global switch). The number of dropped continuations is logged. (iterators.find_split_continuations,iterators.get_files_from_pattern,definitions.DatasetConfig.drop_split_continuations)Sub-derivative cache respected when parent has
overwrite: True: previously, a derivative withoverwrite: Trueforcedcached_here = Falsefor all of its sub-derivative inputs, causing them to re-execute even when they hadoverwrite: Falseand valid cached files on disk. The cache check now uses the child derivative’s ownoverwriteflag rather than the parent’s, so only the derivative that explicitly setsoverwrite: Trueis recomputed. (dag.run_derivative){"cached": [...]}dict no longer leaks into node arguments: when a sub-derivative early-returns its internal{"cached": [path, ...]}sentinel (e.g. because it hit its own cache), the parent previously stored that dict raw instore[sid]and passed it on to downstream node functions as if it were a real value — causingAttributeErrorat runtime. The parent now resolves the cached dict to the matching path string before storing, so downstream nodes always receive a proper path orNodeResult. (dag.run_derivative)Custom nodes available during
save=Falsedataframe assembly:build_derivative_dataframenow loads the pipeline’snew_definitionsnode modules, sofor_dataframederivatives that use custom nodes resolve during dataframe collection instead of raising “unknown node”. (orchestrators)Custom node modules registered in
sys.modulesbefore exec: prevents the double registration that occurred when a split node-definition module was imported both by path and by name. (nodes.loader)
0.1.0¶
Initial release of the template.