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

Replace custom deepdiff wrapper scripts with deepdiff CLI #1016

Open
huddlej opened this issue Aug 8, 2022 · 0 comments
Open

Replace custom deepdiff wrapper scripts with deepdiff CLI #1016

huddlej opened this issue Aug 8, 2022 · 0 comments
Labels
easy problem Requires less work than most issues enhancement New feature or request good first issue A relatively isolated issue appropriate for first-time contributors

Comments

@huddlej
Copy link
Contributor

huddlej commented Aug 8, 2022

Context

Augur's functional tests rely on a lightweight wrapper script around DeepDiff, scripts/diff_jsons.py, to support comparisons between JSONs. Augur's dev requirements specify DeepDiff >=4.3.2.

However, version 5.2.0 of DeepDiff introduced a command line interface that provides the same functionality (and much more!) than the simple wrapper script.

Description

We should consider pinning our minimum DeepDiff version at 5.2.0[cli], replacing all uses of diff_jsons.py with the equivalent deep diff command, and removing the diff_jsons.py script. The CLI also supports comparisons of other file types like CSV (with the installation of additional Python libraries) which might generally improve our functional tests.

Examples

# Original command.
python3 scripts/diff_jsons.py --significant-digits 4 expected.json observed.json

# With the DeepDiff CLI.
deep diff --significant-digits 4 expected.json observed.json
@huddlej huddlej added enhancement New feature or request good first issue A relatively isolated issue appropriate for first-time contributors easy problem Requires less work than most issues labels Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy problem Requires less work than most issues enhancement New feature or request good first issue A relatively isolated issue appropriate for first-time contributors
Projects
No open projects
Status: Backlog
Development

No branches or pull requests

1 participant