refactor/test multistage load for params and outputs#3949
Merged
Conversation
skshetry
commented
Jun 3, 2020
| return ret | ||
|
|
||
|
|
||
| def _parse_params(path_params): |
Collaborator
Author
There was a problem hiding this comment.
Moved this function to repo.run().
| return not INVALID_STAGENAME_CHARS & set(name) | ||
|
|
||
|
|
||
| def parse_params(path_params): |
Collaborator
Author
There was a problem hiding this comment.
This function outputs same structure as present in pipeline file.
| output.load_from_pipeline(stage, [{"key": key}], "outs") | ||
|
|
||
|
|
||
| def test_plots_load_from_pipeline(dvc): |
Collaborator
Author
There was a problem hiding this comment.
There are no tests for new plots props on dvc.yaml. Nearly messed up with it.
skshetry
commented
Jun 3, 2020
| if not isinstance(params, list): | ||
| msg = "Expected list of params for custom params file " | ||
| msg += f"'{path}', got '{type(params).__name__}'." | ||
| raise ValueError(msg) |
Collaborator
Author
There was a problem hiding this comment.
Didn't want to add assertions, so, I have used ValueError. They are purely internal, as error are likely to be raised by schema validators before even reaching here.
pared
reviewed
Jun 4, 2020
efiop
approved these changes
Jun 4, 2020
efiop
pushed a commit
that referenced
this pull request
Jun 5, 2020
* change DvcParser to print subcommand help * add tests for subcommand help * docstring refactoring * remote: finish separating RemoteTree methods (#3946) * remote: move upload()/download() into tree * remote: move path_info/path_cls into tree * remote.azure: finish moving methods into tree * remote.gs: finish moving methods into tree * remote.hdfs: finish moving methods to tree * remote.http: finish moving methods into tree * remote.oss: finish moving methods into tree * remote.s3: finish moving methods into tree * remote.ssh: finish moving methods into tree * remote.gdrive: finish moving methods into tree * tests: update remote unit tests * tests: update func tests * remote: use walk_files() for all remotes * list_cache_paths() now uses tree.walk_files() for all remotes except local/ssh * fix DS warnings * bugfixes * Unify metrics behavior with dirs (#3935) * run: disable directories for -m/-M flags * run: reformatted string literals * run: simplified metrics check * tests: func: run: dirs as metrics outs * tests: func: run: reformatted string literals * tests: use pytest Co-authored-by: Ruslan Kuprieiev <ruslan@iterative.ai> * refactor/test multistage load for params and outputs (#3949) * refactor multistage load for params and outputs * tests: load params * tests: output loading from pipeline file * fix test * fix typo in name * split params load * rename params func s/inject_values/fill_values * fix tests * simplify loads_params and output.load_from_pipeline * address @pared's suggestions for tests * remote: fix build errors (#3957) * remote: fix remaining gdrive build issues (#3959) * tests: fix gdrive build * remote.gdrive: fix walk_files prefix relpath * change DvcParser to print subcommand help * add tests for subcommand help * docstring refactoring * change tests to pytest-style * remove gettext Co-authored-by: Peter Rowlands (변기호) <peter@pmrowla.com> Co-authored-by: nik123 <kodenkonikita@gmail.com> Co-authored-by: Ruslan Kuprieiev <ruslan@iterative.ai> Co-authored-by: Saugat Pachhai <suagatchhetri@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here. If the CLI API is changed, I have updated tab completion scripts.
❌ I will check DeepSource, CodeClimate, and other sanity checks below. (We consider them recommendatory and don't expect everything to be addressed. Please fix things that actually improve code or fix bugs.)
Thank you for the contribution - we'll try to review it as soon as possible. 🙏
Part of #3693
It's more stricter and better-tested than before.