Skip to content

Commit

Permalink
params: Allow tracking full file. (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
daavoo authored Apr 4, 2022
1 parent 6a9eeab commit 71d8274
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
16 changes: 8 additions & 8 deletions dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ stages:
cmd: ./gen.py > schema.json
deps:
- path: gen.py
md5: efb0a465d94a16365e9654a470bd7ef2
size: 5597
md5: e49f62cdbd3ca8648a29c716ad19f14c
size: 5618
outs:
- path: schema.json
md5: d2e598efee4b54b6460956edb662a9e4
size: 11638
md5: 6dc7651926e6c6a7c035b26e011d4e72
size: 11762
check_updated:
cmd: ./gen.py | diff schema.json -
deps:
- path: schema.json
md5: d2e598efee4b54b6460956edb662a9e4
size: 11638
md5: 6dc7651926e6c6a7c035b26e011d4e72
size: 11762
tests:
cmd: pytest -vv tests.py
deps:
- path: schema.json
md5: d2e598efee4b54b6460956edb662a9e4
size: 11638
md5: 6dc7651926e6c6a7c035b26e011d4e72
size: 11762
6 changes: 6 additions & 0 deletions examples/valid/params.dvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ stages:
- loss
outs:
- params2.yaml
use-full-params_file:
cmd: cat full_file.yaml > params2.yaml
params:
- my_params.yaml:
outs:
- params2.yaml
2 changes: 1 addition & 1 deletion gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class CustomParamFileKeys(BaseModel):


class Param(BaseModel):
__root__: Union[ParamKey, CustomParamFileKeys]
__root__: Union[ParamKey, CustomParamFileKeys, Dict[FilePath, None]]


class Params(BaseModel):
Expand Down
6 changes: 6 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@
},
{
"$ref": "#/definitions/CustomParamFileKeys"
},
{
"type": "object",
"additionalProperties": {
"type": "null"
}
}
]
},
Expand Down

0 comments on commit 71d8274

Please sign in to comment.