Skip to content

fix: do not report a DataLad home as wiped out - #165

Merged
oesteban merged 2 commits into
masterfrom
fix/cli-wipe-datalad
Dec 3, 2026
Merged

oesteban merged 2 commits into
masterfrom
fix/cli-wipe-datalad

Conversation

@oesteban

@oesteban oesteban commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Summary

In DataLad mode, templateflow wipe asked for both confirmations and then claimed the home was gone, although DataladManager.wipe() deletes nothing:

$ templateflow wipe                     # DataLad mode, before
This will wipe out all data downloaded into /home/user/.cache/templateflow.
Do you want to continue? [y/N]: y
Please write the path of your local archive (/home/user/.cache/templateflow): /home/user/.cache/templateflow
TemplateFlow is configured in DataLad mode, wipe() has no effect
/home/user/.cache/templateflow was wiped out.
 wipe()
+  if DataLad mode
+    print the library's message ("... wipe() has no effect") and return
   confirm, then type the path
   wipe the home
   "<home> was wiped out."

Direct-download (S3) homes behave as before. CHANGES gets this fix's entry and #164's, which merged before its own was pushed. Found while correcting the CLI page on #153, which already describes the fixed behaviour ("In DataLad mode nothing is deleted").

Evidence

  • New test test_cli.py::test_wipe, four cases with a scratch home: S3 confirmed (deleted), S3 with a wrong path, S3 declined, and DataLad mode (no prompts, nothing deleted, only the library's message).
    master's cli.py:  FAILED test_wipe[True-answers3-False]   1 failed, 3 passed
    this branch:      4 passed
    
  • templateflow/tests/test_cli.py: 10 passed, on master after fix: update DataLad homes from origin only #164.

Merge Danger

Door: two-way

Blast Radius: CLI

Only the wipe command's output in DataLad mode changes; scripts that piped answers to its prompts in DataLad mode now get no prompts, and nothing was deleted either way.

oesteban and others added 2 commits December 3, 2026 19:53
In DataLad mode, `templateflow wipe` asked for both confirmations,
printed that wipe() has no effect, and then ended with
"<home> was wiped out." although nothing was deleted. The command now
only prints the library's message in DataLad mode, without prompts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#164 merged before its entry was pushed, so
it comes here with this pull request's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oesteban
oesteban force-pushed the fix/cli-wipe-datalad branch from 99a1e8f to c9ca21c Compare December 3, 2026 18:55
@oesteban
oesteban marked this pull request as ready for review December 3, 2026 18:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T18:59:03.186506Z c9ca21c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.48%. Comparing base (5a5947c) to head (c9ca21c).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
+ Coverage   84.02%   85.48%   +1.46%     
==========================================
  Files          10       10              
  Lines         920      923       +3     
  Branches      192      193       +1     
==========================================
+ Hits          773      789      +16     
+ Misses         83       70      -13     
  Partials       64       64              
Flag Coverage Δ
api,datalad 44.74% <0.00%> (-0.15%) ⬇️
api,dls3 20.91% <0.00%> (-0.07%) ⬇️
api,s3 52.11% <0.00%> (-0.17%) ⬇️
config 83.42% <100.00%> (+1.46%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@oesteban
oesteban merged commit 5f92ad1 into master Dec 3, 2026
17 checks passed
@oesteban
oesteban deleted the fix/cli-wipe-datalad branch December 3, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant