Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BF: drop: Adjust annex's "use --force" message to avoid confusion #5194

Merged
merged 1 commit into from Dec 2, 2020

Conversation

kyleam
Copy link
Collaborator

@kyleam kyleam commented Dec 1, 2020

Calling datalad drop on a file that has too few copies will
confusingly propagate a message from git annex drop suggesting to
use --force, an option datalad drop does not have. Replace --force
with --nocheck.

The new message may still be confusing to Python callers of drop()
because it suggests --nocheck rather than check=False, but that's not
a problem unique to this spot and is preferable to reporting the
completely wrong option.

Fixes #5135.

Calling `datalad drop` on a file that has too few copies will
confusingly propagate a message from `git annex drop` suggesting to
use --force, an option `datalad drop` does not have.  Replace --force
with --nocheck.

The new message may still be confusing to Python callers of drop()
because it suggests --nocheck rather than check=False, but that's not
a problem unique to this spot and is preferable to reporting the
completely wrong option.

Fixes datalad#5135.
@yarikoptic yarikoptic added the UX user experience label Dec 2, 2020
@yarikoptic
Copy link
Member

I don't mind and like UX improvements, but I feel like it is opening pandora's box even though if just a crack ;)

@codecov
Copy link

codecov bot commented Dec 2, 2020

Codecov Report

Merging #5194 (536479f) into maint (8ee4ebd) will increase coverage by 29.22%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##            maint    #5194       +/-   ##
===========================================
+ Coverage   60.68%   89.90%   +29.22%     
===========================================
  Files         126      294      +168     
  Lines       18916    40953    +22037     
===========================================
+ Hits        11479    36820    +25341     
+ Misses       7437     4133     -3304     
Impacted Files Coverage Δ
datalad/distribution/drop.py 98.85% <100.00%> (+14.51%) ⬆️
datalad/distribution/tests/test_drop.py 100.00% <100.00%> (ø)
datalad/support/stats.py 97.33% <0.00%> (-1.32%) ⬇️
datalad/support/digests.py 100.00% <0.00%> (ø)
datalad/downloaders/providers.py 95.57% <0.00%> (ø)
datalad/core/local/tests/test_results.py 92.85% <0.00%> (ø)
datalad/__main__.py 75.00% <0.00%> (ø)
datalad/ui/tests/test_dialog.py 99.13% <0.00%> (ø)
datalad/metadata/extractors/tests/test_rfc822.py 100.00% <0.00%> (ø)
datalad/interface/tests/test_run_procedure.py 100.00% <0.00%> (ø)
... and 255 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ee4ebd...536479f. Read the comment docs.

@adswa
Copy link
Member

adswa commented Dec 2, 2020

Thank you! I like the change a lot. It makes the error message actually helpful.

@yarikoptic yarikoptic merged commit f95b434 into datalad:maint Dec 2, 2020
1 check passed
@kyleam kyleam deleted the drop-force-to-check branch December 2, 2020 14:36
@yarikoptic yarikoptic added this to the 0.13.6 milestone Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants