Skip to content

Commit

Permalink
using pcloud repository as the standard when initializing LCDB
Browse files Browse the repository at this point in the history
  • Loading branch information
felix committed Oct 22, 2024
1 parent 8bde36b commit e18453a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions publications/2023-neurips/lcdb/db/_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ def create(self, config=None):
self.path.mkdir(exist_ok=True, parents=True)

# create default config file
default_config = {"repositories": {"local": ".lcdb/data"}}
default_config = {"repositories": {
"official": "pcloud://kZK9f70Zxwwjkt54zA8FY6kBUFB5PXoAYT9k",
"local": ".lcdb/data"}
}
if config is not None:
default_config.update(config)
config = default_config
Expand Down Expand Up @@ -73,7 +76,7 @@ def _load(self):
cfg = json.load(f)
repository_paths = {}
for k, p in cfg["repositories"].items():
if not p.startswith("pcloud:"):
if not p.startswith("pcloud://"):
p = os.path.expanduser(p)
if p[:1] != "/":
p = f"{self.path.parent}/{p}"
Expand Down
4 changes: 2 additions & 2 deletions publications/2023-neurips/lcdb/db/_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def get(path):
from ._local_repository import LocalRepository
from ._pcloud_repository import PCloudRepository

if path.startswith("pcloud:"):
repo_code = path[7:]
if path.startswith("pcloud://"):
repo_code = path[9:]
return PCloudRepository(repo_code=repo_code)

else:
Expand Down

0 comments on commit e18453a

Please sign in to comment.