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

All modified and coverable lines are covered by tests ✅

Project coverage is 91.29%. Comparing base (864dc4a) to head (a6b7271).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7476      +/-   ##
==========================================
- Coverage   91.35%   91.29%   -0.07%     
==========================================
  Files         325      324       -1     
  Lines       43442    43211     -231     
  Branches     5778     5783       +5     
==========================================
- Hits        39685    39448     -237     
- Misses       3741     3748       +7     
+ Partials       16       15       -1     

☔ 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

@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
Copy link

codeclimate bot commented May 29, 2024

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

View more on Code Climate.

@bpinsard
Copy link
Contributor Author

Hi! Any chance this PR can move forward.
We have a usecase that would highly benefit from that feature!

Thanks!

(It seems the mac and lint tests are broken in the master branch, not cause by these changes).

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