spaCy/spacy/cli
Robyn Speer d60b748e3c
Fix surprises when asking for the root of a git repo (#9074)
* Fix surprises when asking for the root of a git repo

In the case of the first asset I wanted to get from git, the data I
wanted was the entire repository. I tried leaving "path" blank, which
gave a less-than-helpful error, and then I tried `path: "/"`, which
started copying my entire filesystem into the project. The path I should
have used was "".

I've made two changes to make this smoother for others:

- The 'path' within a git clone defaults to ""
- If the path points outside of the tmpdir that the git clone goes
into, we fail with an error

Signed-off-by: Elia Robyn Speer <elia@explosion.ai>

* use a descriptive error instead of a default

plus some minor fixes from PR review

Signed-off-by: Elia Robyn Speer <elia@explosion.ai>

* check for None values in assets

Signed-off-by: Elia Robyn Speer <elia@explosion.ai>

Co-authored-by: Elia Robyn Speer <elia@explosion.ai>
2021-09-01 22:52:08 +02:00
..
project Fix surprises when asking for the root of a git repo (#9074) 2021-09-01 22:52:08 +02:00
templates Update da trf recommendation (#8921) 2021-08-12 13:54:02 +02:00
__init__.py assemble CLI command (#7783) 2021-04-19 18:39:11 +10:00
_util.py Fix surprises when asking for the root of a git repo (#9074) 2021-09-01 22:52:08 +02:00
assemble.py Tidy up with flake8: imports, comparisons, etc. 2021-06-28 12:08:15 +02:00
convert.py Fix other open calls without context managers (#8245) 2021-05-31 19:04:29 +10:00
debug_config.py Add --code to spacy debug CLI 2021-03-12 09:51:26 +01:00
debug_data.py Reload train corpus in debug data after initialize (#8776) 2021-07-21 22:38:40 +02:00
debug_model.py Tidy up with flake8: imports, comparisons, etc. 2021-06-28 12:08:15 +02:00
download.py Use minor version for compatibility check (#8403) 2021-06-21 09:39:22 +02:00
evaluate.py Fix silent evaluation (#8581) 2021-07-06 14:16:19 +02:00
info.py Replace links to nightly docs [ci skip] 2021-01-30 20:09:38 +11:00
init_config.py Add --code option to init fill-config 2021-03-12 10:03:57 +01:00
init_pipeline.py fix spancat initialize with labels (#8620) 2021-07-06 19:08:25 +02:00
package.py Include component factories in third-party dependencies resolver (#9009) 2021-08-25 14:58:01 +02:00
pretrain.py Check if the resume path points to a directory (#7919) 2021-04-28 09:17:15 +02:00
profile.py Replace links to nightly docs [ci skip] 2021-01-30 20:09:38 +11:00
train.py No output info message in train (#8885) 2021-08-05 09:21:22 +02:00
validate.py Tidy up with flake8: imports, comparisons, etc. 2021-06-28 12:08:15 +02:00