spaCy/spacy/cli/project
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
..
__init__.py Refactor project CLI (#5732) 2020-07-09 01:42:51 +02:00
assets.py Fix surprises when asking for the root of a git repo (#9074) 2021-09-01 22:52:08 +02:00
clone.py Fix default clone branch and error handling [ci skip] 2021-02-01 22:29:04 +11:00
document.py Remove nightly reference from auto docs [ci skip] 2021-01-30 20:12:08 +11:00
dvc.py Replace links to nightly docs [ci skip] 2021-01-30 20:09:38 +11: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 Enable commit check via env var 2020-10-05 20:51:15 +02:00
run.py Pass overrides to subcommands in workflows (#9059) 2021-08-30 09:23:54 +02:00