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: Expose diff_dataset() and add reporting_order parameter. #4229

Merged
merged 3 commits into from
Mar 3, 2020

Conversation

mih
Copy link
Member

@mih mih commented Mar 2, 2020

This make a faster diff with eval_file_type=True accessible to
internal users (like push()).

reporting_order enables more flexible applications. While the past and
current default depth-first is most suitable for human-readable
reporting, the alternative breadth-first enables straightforward
consolidation of all diff reports for a dataset (incl. all submodule
records) into an uninterrupted series of results. This simplies client
code that needs to investigate a complete changes set of a dataset, and
aims to yield its conclusions immediately, in order to kick of further
processing (generator-style) -- useful for effective parallelization.

Split from #4206

TODO:

  • add compatibility kludge for metalad

This make a faster diff with `eval_file_type=True` accessible to
internal users (like `push()`).

`reporting_order` enables more flexible applications. While the past and
current default `depth-first` is most suitable for human-readable
reporting, the alternative `breadth-first` enables straightforward
consolidation of all diff reports for a dataset (incl. all submodule
records) into an uninterupted series of results. This simplies client
code that needs to investigate a complete changes set of a dataset, and
aims to yield its conclusions immediately, in order to kick of further
processing (generator-style) -- useful for effective parallelization.
@mih mih mentioned this pull request Mar 2, 2020
21 tasks
@kyleam
Copy link
Contributor

kyleam commented Mar 2, 2020

This make a faster diff with eval_file_type=True accessible to
internal users (like push()).

Makes sense, though there's a bug in the eval_file_type handling within _diff_cmd (now diff_dataset): _diff_ds is always called with eval_file_type=True regardless of what's passed in for eval_file_type.

@kyleam
Copy link
Contributor

kyleam commented Mar 2, 2020

reporting_order enables more flexible applications [...]

LGTM

@codecov
Copy link

codecov bot commented Mar 2, 2020

Codecov Report

Merging #4229 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4229      +/-   ##
==========================================
- Coverage   89.23%   89.16%   -0.08%     
==========================================
  Files         275      275              
  Lines       36250    36317      +67     
==========================================
+ Hits        32348    32381      +33     
- Misses       3902     3936      +34     
Impacted Files Coverage Δ
datalad/downloaders/http.py 70.91% <0.00%> (-2.79%) ⬇️
datalad/downloaders/tests/test_http.py 58.39% <0.00%> (-2.19%) ⬇️
datalad/support/annexrepo.py 84.84% <0.00%> (-0.56%) ⬇️
datalad/support/tests/test_annexrepo.py 95.45% <0.00%> (-0.11%) ⬇️
datalad/support/gitrepo.py 90.60% <0.00%> (ø) ⬆️
datalad/cmd.py 89.70% <0.00%> (+0.04%) ⬆️

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 7b8282b...47c6857. Read the comment docs.

@mih mih merged commit 55947c1 into datalad:master Mar 3, 2020
@mih mih deleted the enh-diff branch March 3, 2020 08:04
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.

2 participants