dvc: path info refactoring

Replaced Path* dataclasses with PathInfo/URLInfo/CloudURLInfo, which
know how parse, serialize, stringify and join themselves. They also
provide useful accessors like part of an url or pathlib.Path like
.parent or .name.

Along the way two families of bugs where fixed and should never occur in
the future:
- paths not matched as strings anymore, e.g. using str.startswith()
- Output.path is eliminated as ambiguous

Both families might had caused undefined surprising behavior when local
and remote paths clash.
This commit is contained in:
Alexander Schepanovski
2019-06-11 19:19:17 +07:00
parent 6a1629c559
commit d80293c44d
60 changed files with 762 additions and 1026 deletions
+1 -1
View File
@@ -5,10 +5,10 @@ import argparse
import humanize
import inflect
import logging
from funcy import compact
from dvc.exceptions import DvcException
from dvc.command.base import CmdBase, append_doc_link
from dvc.utils.collections import compact
import dvc.repo.diff as diff