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

ENH add --data option to get command, matching push one #7476

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bpinsard
Copy link
Contributor

@bpinsard bpinsard commented Aug 15, 2023

Partially addresses #7468 by adding a --data option to get command with values similar to push command.
Passes --want-get here to git-annex get if auto or auto-if-wanted (and preferred content is set) values are passed.

PR checklist

  • Write tests.

@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.93% 🎉

Comparison is base (eeb7313) 90.61% compared to head (4e4344f) 91.55%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7476      +/-   ##
==========================================
+ Coverage   90.61%   91.55%   +0.93%     
==========================================
  Files         325      325              
  Lines       43405    43449      +44     
  Branches        0     5826    +5826     
==========================================
+ Hits        39333    39781     +448     
+ Misses       4072     3653     -419     
- Partials        0       15      +15     
Files Changed Coverage Δ
datalad/distribution/get.py 96.19% <100.00%> (+0.83%) ⬆️
datalad/distribution/tests/test_get.py 100.00% <100.00%> (ø)

... and 73 files with indirect coverage changes

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

@yarikoptic yarikoptic added semver-minor Increment the minor version when merged CHANGELOG-missing When a PR's description does not contain a changelog item, yet. labels Aug 15, 2023
@github-actions github-actions bot removed the CHANGELOG-missing When a PR's description does not contain a changelog item, yet. label Aug 15, 2023
@@ -1000,7 +1025,7 @@ def __call__(
continue
yield res

if not get_data:
if data=='nothing' or not get_data:
Copy link
Member

Choose a reason for hiding this comment

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

I feel that introduction of data potentially makes get_data obsolete and thus require replacement/deprecation cycle and that could be taken as a good thing since get_data flag semantic is already shown to be "inconsistent" (get_data in python but --no-data in CLI).

But -n (AKA --no-data) is used heavily in handbook etc, and is a convenient shortcut to signal --data=nothing.

So, I think that is how -n|--no-data should be promoted - that it is a shortcut for data="nothing" and there should be explicit statement that data option is ignored if --no-data is provided.

But also let's wait for others to chime in

@codeclimate
Copy link

codeclimate bot commented Aug 18, 2023

Code Climate has analyzed commit 4e4344f and detected 0 issues on this pull request.

View more on Code Climate.

@adswa
Copy link
Member

adswa commented Oct 13, 2023

I have placed this PR on the agenda of the next dev call for October 24th, hopefully we can revive the discussion. :)

@bpinsard bpinsard requested a review from yarikoptic April 9, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Increment the minor version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants