spaCy/spacy/cli/project
Paul O'Leary McCann 858565a567
Fix issues with DVC commands (#11592)
* Fix flag handling in dvc

Prior to this commit, if a flag (--verbose or --quiet) was passed to
DVC, it would be added to the end of the generated dvc command line.
This would result in the command being interpreted as part of the actual
command to run, rather than an argument to dvc. This would result in
command lines like:

    spacy project run preprocess --verbose

That would fail with an error that there's no such directory as
`--verbose`.

This change puts the flags at the front of the dvc command so that they
are interpreted correctly. It removes the `run_dvc_commands` function,
which had been reduced to just a for loop and wasn't used elsewhere.

A separate problem is that there's no way to specify the quiet behaviour
to dvc from the command line, though it's unclear if that's a bug.

* Add dvc quiet flag to docs

* Handle case in DVC where no commands are appropriate

If only have commands with no deps or outputs (admittedly unlikely), you
get a weird error about the dvc file not existing. This gives explicit
output instead.

* Add support for quiet flag

* Fix command execution

Commands are strings now because they're joined further up.
2022-10-18 15:11:39 +09:00
..
__init__.py Refactor project CLI (#5732) 2020-07-09 01:42:51 +02:00
assets.py Allow assets to be optional in spacy project (#10714) 2022-05-10 10:40:11 +02:00
clone.py Try cloning repo from main & master (#10843) 2022-06-28 09:11:15 -04:00
document.py Remove nightly reference from auto docs [ci skip] 2021-01-30 20:12:08 +11:00
dvc.py Fix issues with DVC commands (#11592) 2022-10-18 15:11:39 +09:00
pull.py Auto-format code with black (#8895) 2021-08-06 13:38:06 +02:00
push.py Auto-format code with black (#8895) 2021-08-06 13:38:06 +02:00
remote_storage.py 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
run.py Add dependency check to project step runs (#11226) 2022-09-16 16:54:31 +02:00