Skip to content

Commit

Permalink
Merge pull request #16 from neuro-ml/dev
Browse files Browse the repository at this point in the history
Forgot to resolve `fetch`
  • Loading branch information
maxme1 committed Dec 21, 2022
2 parents f7da2e8 + 6927f06 commit 013dda5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bev/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.5.1'
__version__ = '0.5.2'
7 changes: 5 additions & 2 deletions bev/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,17 @@ def _resolve(path):

relative = self._normalize_relative(*parts)
version = self._resolve_version(version)
fetch = self._resolve_fetch(fetch)
check = self._resolve_check(check)

absolute = self.root / relative
if version == Local and absolute.exists():
if to_hash(absolute).exists():
raise NameConflict(f'Both the path "{relative}" and its hash "{to_hash(relative)}" found')
return absolute.resolve()

check = self._resolve_check(check)
key = self.get_key(relative, version=version, fetch=fetch)
return self.storage.read(_resolve, key, fetch=self._resolve_fetch(fetch))
return self.storage.read(_resolve, key, fetch=fetch)

def glob(self, *parts: PathOrStr, version: Version = None, fetch: bool = None) -> Sequence[Path]:
"""
Expand All @@ -148,6 +150,7 @@ def glob(self, *parts: PathOrStr, version: Version = None, fetch: bool = None) -
means that the local (possibly uncommitted) version of the files will be used
"""
version = self._resolve_version(version)
fetch = self._resolve_fetch(fetch)
pattern = os.path.join(*parts)

if version == Local:
Expand Down

0 comments on commit 013dda5

Please sign in to comment.