Bug Report
Found during treeverse/dvc.org#2062 (review)
Description
params diff assumes file content types.
Reproduce
In a fresh DVC repo:
$ echo "foo: 1" > params.yaml
$ echo "bar: 2" > params.json # YAML file with json extension
$ dvc params diff
Path Param Old New
params.yaml foo — 1
$ dvc params diff --targets params.json # (1) First inconsistency
WARNING: 'params.json' was not found at: 'HEAD'.
$ git add --all
$ git commit -m "add 2 params files"
$ echo "foo: 2" > params.yaml
$ echo "bar: 4" > params.json
$ dvc params diff
Path Param Old New
params.yaml foo 1 2
$ dvc params diff --targets params.json # (2) 2nd (main) problem
# No output
Expected
dvc params diff to tell me why nothing is displayed for params.json.
Environment information
Output of dvc version:
$ dvc version
DVC version: 1.11.0+6fcafc
---------------------------------
Platform: Python 3.6.9 on Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic
Supports: All remotes
Cache types: <https://error.dvc.org/no-dvc-cache>
Caches: local
Remotes: None
Workspace directory: ext4 on /dev/sdb
Repo: dvc, git
Additional Information (if any):
BugReportDescription
params diffassumes file content types.Reproduce
In a fresh DVC repo:
Expected
dvc params diffto tell me why nothing is displayed forparams.json.Environment information
Output of
dvc version:Additional Information (if any):