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

create(no_annex=False) -> create(annex=True) #4321

Merged
merged 4 commits into from Mar 20, 2020
Merged

Conversation

mih
Copy link
Member

@mih mih commented Mar 19, 2020

This avoids double-negative thinking when using the Python API, and fixes gh-4207

There is no change wrt the command-line API.

A warning is emitted if, and only if, using the Python API no_annex=True is given in conflict with the value of annex.

In order to make this a smooth transition (but possibly with further future benefits), it is now possible to have Python-only arguments for our commands.

This can be achieved by setting the args of a Parameter instance to be an empty tuple. The value None continues to indicate that a default argument name should be derived from the
parameter name. Example:

some_param=Parameter(args=tuple(), ...)

mih added 3 commits March 19, 2020 10:11
This can now be achieved by setting the `args` of a `Parameter`
instance to be an empty tuple. The value `None` continues to
indicate that a default argument name should be derived from the
parameter name. Example:

```
some_param=Parameter(args=tuple(), ...)
```
This avoids double-negative thinking when using the Python API,
and fixes dataladgh-4207

There is no change wrt the command-line API.

A warning is emitted if, and only if,using the Python API no_annex=True
is given in conflict with the value of `annex`.
@codecov
Copy link

codecov bot commented Mar 19, 2020

Codecov Report

Merging #4321 into master will increase coverage by 0.04%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4321      +/-   ##
==========================================
+ Coverage   88.83%   88.88%   +0.04%     
==========================================
  Files         285      285              
  Lines       37457    37471      +14     
==========================================
+ Hits        33275    33306      +31     
+ Misses       4182     4165      -17     
Impacted Files Coverage Δ
datalad/core/local/create.py 93.00% <71.42%> (-1.12%) ⬇️
datalad/core/distributed/tests/test_push.py 99.62% <100.00%> (ø)
datalad/core/local/tests/test_create.py 100.00% <100.00%> (ø)
datalad/core/local/tests/test_save.py 96.75% <100.00%> (ø)
...lad/distribution/tests/test_create_test_dataset.py 100.00% <100.00%> (ø)
datalad/distribution/tests/test_dataset.py 99.66% <100.00%> (ø)
datalad/distribution/tests/test_get.py 100.00% <100.00%> (ø)
datalad/distribution/tests/test_install.py 99.55% <100.00%> (ø)
datalad/distribution/tests/test_update.py 97.72% <100.00%> (ø)
datalad/interface/base.py 90.90% <100.00%> (+0.05%) ⬆️
... and 11 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 659f70f...c9dfb74. Read the comment docs.

datalad/core/local/create.py Outdated Show resolved Hide resolved
datalad/core/local/create.py Outdated Show resolved Hide resolved
@mih mih merged commit 482a617 into datalad:master Mar 20, 2020
@mih mih deleted the bf-4207 branch March 20, 2020 07:05
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.

create(no_annex=False) -> create(annex=True)
2 participants