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

diff: Add sort logic to sort diff ouput irrespective of output format… #4459

Merged
merged 2 commits into from
Aug 26, 2020

Conversation

PuneethaPai
Copy link
Contributor

…(default/json/md)

Fixes one of the task mentioned in Issue: #2982

  • consider sorting default output

I have sorted output irrespective of output format to maintain consistency.

@pared pared self-requested a review August 25, 2020 13:52
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @PuneethaPai ! 🙏 Please see some comments above.

@PuneethaPai
Copy link
Contributor Author

Just a small change in test code to pass dict copy instead of original diff dict.

In python both list and dict when modified by called function, it gets modified in original function as well. (Pass by value, Pass by reference scenario)

In test I was passing diff dict which could have lead to bug, hence now I pass copy of this. (Thus even if the copy gets modified original diff dict stays the same.)

@skshetry skshetry added the enhancement Enhances DVC label Aug 26, 2020
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

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

Thank you so much @PuneethaPai ! 🙏

@efiop efiop merged commit c31ec30 into iterative:master Aug 26, 2020
@PuneethaPai PuneethaPai deleted the diff_sort_outputs branch August 26, 2020 18:27
@jorgeorpinel
Copy link
Contributor

Hi! Does this change the output in the examples of https://dvc.org/doc/command-reference/diff perhaps?

Esp. in Comparing tags or branches and https://dvc.org/doc/command-reference/diff#example-using-different-output-formats I guess.

efiop added a commit to iterative/dvc.org that referenced this pull request Aug 28, 2020
@efiop
Copy link
Contributor

efiop commented Aug 28, 2020

@jorgeorpinel Good catch! Adjusted in iterative/dvc.org@ee2182a . Thank you!

@jorgeorpinel
Copy link
Contributor

Thanks! That was a quick one 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhances DVC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants