Skip to content

Conversation

michellewang
Copy link
Collaborator

Changes proposed in this pull request:

  • New field in tracker config: PARTICIPANT_SESSION_DIR
    • Not 100% sure if it makes sense to have it in the tracker config, but it could be nice because then when we do the tracking we can check for existence of all the paths in PATHS or existence of a tarball at PARTICIPANT_SESSION_DIR + .tar. We could also include this path in the imaging bagel file, which would be useful for Neurobagel (but that is for a future PR)
  • If --tar is set and the processing pipeline run is successful, PARTICIPANT_SESSION_DIR will be tarred into an archive of the same name (+ .tar extension) and the original directory will be deleted

Checklist (for reviewers)

This section is for the PR reviewer

  • PR has an interpretable title with a prefix (e.g. [BUG], [DOC], [ENH], [MAINT])
    Refer to NumPy Development Guide for a full list
  • PR links to GitHub issue with mention Closes #XXXX
  • Tests pass
  • Checks pass

For new features:

  • Tests have been added

For bug fixes:

  • There is at least one test that would fail under the original bug conditions

@github-actions github-actions bot added the T.1 - Enhancement New feature or request label Nov 19, 2024
Comment on lines -88 to -94
# load tracker configs from file
fpath_tracker_config = self.pipeline_step_config.TRACKER_CONFIG_FILE
if fpath_tracker_config is None:
raise ValueError(
f"No tracker config file specified for pipeline {self.pipeline_name}"
f" {self.pipeline_version}"
)
# replace template strings
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to BasePipelineWorkflow

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
nipoppy/cli/parser.py 100.00% <100.00%> (ø)
nipoppy/config/tracker.py 100.00% <100.00%> (ø)
nipoppy/env.py 100.00% <100.00%> (ø)
nipoppy/workflows/pipeline.py 100.00% <100.00%> (ø)
nipoppy/workflows/runner.py 100.00% <100.00%> (ø)
nipoppy/workflows/tracker.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -113,7 +117,7 @@ def test_run_failed_cleanup(tmp_path: Path, n_success, config: Config):
)
runner.n_success = n_success
runner.n_total = 2
config.save(runner.layout.fpath_config)
runner.config = config
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup

if self.tracker_config.PARTICIPANT_SESSION_DIR is None:
raise RuntimeError(
"Tarring requested but no participant-session directory specified. "
"The PARTICIPANT_SESSION_DIR field in the tracker config must set "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I find the PARTICIPANT_SESSION_DIR confusing. It's not explicit that it's for the TAR dir.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I named it like this because I thought this could be multi-purpose for derivatives discovery: if we add this path to the imaging bagel file then Neurobagel would know where to find the derivatives data (when building cohorts for example). But will ask around and see if there is a better name we could use

@mathdugre mathdugre self-requested a review December 19, 2024 15:40
@michellewang michellewang merged commit 1bc2495 into nipoppy:main Dec 23, 2024
10 checks passed
@michellewang michellewang deleted the 230/tar branch December 23, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T.1 - Enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add option to tar directories/files after running a pipeline
2 participants