materials-commons-cli 2.3.0b5__tar.gz → 2.3.0b7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/PKG-INFO +1 -1
- materials_commons_cli-2.3.0b7/materials_commons/cli/__init__.py +1 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/async_reconciler.py +1 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/downloader.py +9 -7
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/downloader/file_downloader.py +5 -1
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/projects.py +10 -7
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/uploader/file_uploader.py +1 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/ls2.py +22 -17
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/walk.py +20 -13
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons_cli.egg-info/PKG-INFO +1 -1
- materials_commons_cli-2.3.0b5/materials_commons/cli/__init__.py +0 -1
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/LICENSE +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/README.md +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/LICENSE.txt +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/config.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/filedb.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/local_project.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/models.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/__init__.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/cloned_project.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/exceptions.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/file_functions.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/functions.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/globus.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/list_objects.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/print_formatter.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/sqltable.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/tmp_functions.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/tree_functions.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/treedb.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/user_config.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/parser.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/reconcile2.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/reconcile3.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/requests.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/run.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/__init__.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/command_handlers/__init__.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/command_handlers/admin_handler_lookup.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/command_handlers/download_handler_lookup.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/command_handlers/list_handler_lookup.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/command_handlers/multi_handler_lookup.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/command_handlers/protocol.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/command_handlers/search_find_handler_lookup.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/command_handlers/upload_handler_lookup.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/db/__init__.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/db/db_manager.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/downloader/__init__.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/downloader/file_download_manager.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/indexer/__init__.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/indexer/file_index_manager.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/local_rest_server.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/ocommand_handlers.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/project_filedbs.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/service_container.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/service_runtime.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/uploader/__init__.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/uploader/client_api.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/uploader/file_upload_manager.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/server/websocket_server.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/__init__.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/clone.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/config.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/dataset.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/down.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/down2.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/expt.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/fetch.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/globus.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/init.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/ls.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/mkdir.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/mv.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/proj.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/remote.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/rm.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/runners/__init__.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/runners/download_globus_runner.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/runners/download_v1_runner.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/scan.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/server.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/up.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/subcommands/versions.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons_cli.egg-info/SOURCES.txt +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons_cli.egg-info/dependency_links.txt +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons_cli.egg-info/entry_points.txt +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons_cli.egg-info/not-zip-safe +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons_cli.egg-info/requires.txt +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons_cli.egg-info/top_level.txt +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/setup.cfg +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/setup.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_api.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_functions.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_mc_dataset.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_mc_down.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_mc_mkdir.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_mc_mv.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_mc_proj.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_mc_rm.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_mc_up.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_treecompare_no_cache.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_treecompare_with_cache.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_treedb.py +0 -0
- {materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_user_config.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.3.0b7'
|
|
@@ -45,6 +45,7 @@ class AsyncReconciler:
|
|
|
45
45
|
# Go through all the observations and match to the file records
|
|
46
46
|
for obs in observations:
|
|
47
47
|
obs.file_record = file_records_map.get(obs.name, None)
|
|
48
|
+
obs.remote_path = remote_dir / obs.name
|
|
48
49
|
path_states[obs.name] = FileState(observation=obs)
|
|
49
50
|
|
|
50
51
|
results = await asyncio.gather(
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/downloader.py
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
+
import traceback
|
|
2
3
|
from pathlib import Path
|
|
3
4
|
|
|
4
5
|
from igittigitt import IgnoreParser, igittigitt
|
|
@@ -45,13 +46,7 @@ class Downloader:
|
|
|
45
46
|
try:
|
|
46
47
|
for path in paths:
|
|
47
48
|
p = Path(path)
|
|
48
|
-
if p.
|
|
49
|
-
# Walk and download local dir
|
|
50
|
-
await self._download_dir(p, recursive=recursive)
|
|
51
|
-
elif p.is_file():
|
|
52
|
-
# Download local file
|
|
53
|
-
await self._download_file(p)
|
|
54
|
-
else:
|
|
49
|
+
if not p.exists():
|
|
55
50
|
# If we are here, then the path entry is a remote path. We look up the path to
|
|
56
51
|
# determine the type of download to perform.
|
|
57
52
|
remote_path = self.proj.to_remote_path(p)
|
|
@@ -71,9 +66,16 @@ class Downloader:
|
|
|
71
66
|
else:
|
|
72
67
|
# Remote entry is a file
|
|
73
68
|
await self._download_file(p, force=force)
|
|
69
|
+
elif p.is_dir():
|
|
70
|
+
# Walk and download local dir
|
|
71
|
+
await self._download_dir(p, recursive=recursive)
|
|
72
|
+
elif p.is_file():
|
|
73
|
+
# Download local file
|
|
74
|
+
await self._download_file(p)
|
|
74
75
|
|
|
75
76
|
except Exception as e:
|
|
76
77
|
logger.error(f"Unexpected error during download: {e}")
|
|
78
|
+
traceback.print_exc()
|
|
77
79
|
return False
|
|
78
80
|
|
|
79
81
|
finally:
|
|
@@ -12,6 +12,7 @@ import requests
|
|
|
12
12
|
|
|
13
13
|
from materials_commons.cli.old.functions import checksum
|
|
14
14
|
from materials_commons.cli.requests import DownloadRequest, DBWriteRequest
|
|
15
|
+
from materials_commons.cli.server import projects
|
|
15
16
|
|
|
16
17
|
logger = logging.getLogger(__name__)
|
|
17
18
|
|
|
@@ -32,7 +33,10 @@ class FileDownloader:
|
|
|
32
33
|
self.db_write_queue = db_write_queue
|
|
33
34
|
self.download_request = download_request
|
|
34
35
|
self.file_id = download_request.observation.remote_entry.remote_file_id
|
|
35
|
-
|
|
36
|
+
if download_request.observation.local_path is None:
|
|
37
|
+
self.file_path = projects.remote_to_local_project_path(download_request.project.local_path, download_request.observation.remote_path)
|
|
38
|
+
else:
|
|
39
|
+
self.file_path = download_request.observation.local_path
|
|
36
40
|
self.base_url = download_request.project.remote.base_url
|
|
37
41
|
self.apitoken = download_request.project.remote.apikey
|
|
38
42
|
self.project_id = download_request.project.id
|
|
@@ -133,13 +133,16 @@ def local_to_remote_project_path(proj_base: Path, full_path: Path) -> Path:
|
|
|
133
133
|
Returns:
|
|
134
134
|
Path: The remote path corresponding to the local path.
|
|
135
135
|
"""
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
try:
|
|
137
|
+
full_path_resolved = full_path.resolve()
|
|
138
|
+
# remote_path will be the relative path from proj_base to full_path, i.e., it
|
|
139
|
+
# won't start with a slash, so we need to add one to get the correct path.
|
|
140
|
+
if full_path_resolved.as_posix() == proj_base.as_posix():
|
|
141
|
+
return Path("/")
|
|
142
|
+
remote_path = full_path_resolved.relative_to(proj_base)
|
|
143
|
+
return Path("/" + remote_path.as_posix())
|
|
144
|
+
except ValueError:
|
|
145
|
+
return full_path
|
|
143
146
|
|
|
144
147
|
|
|
145
148
|
def remote_to_local_project_path(proj_base: Path, remote_path: Path) -> Path:
|
|
@@ -90,21 +90,26 @@ async def ls2_subcommand_async(args, working_dir):
|
|
|
90
90
|
async_reconciler = AsyncReconciler(db=db, proj=proj, reconcile_mode="status")
|
|
91
91
|
which_class = LSAction if args.action else LSEntry
|
|
92
92
|
listdir_fn = make_merged_listdir_func(proj)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
p = Path(path)
|
|
96
|
-
if p.is_dir():
|
|
97
|
-
async for current_path, path_entries in async_reconciler.walk(path=path, listdir_fn=listdir_fn,
|
|
98
|
-
recursive=False, ignore_fn=None):
|
|
99
|
-
for entry_name in sorted(path_entries):
|
|
100
|
-
entry = path_entries[entry_name]
|
|
101
|
-
if entry.exception:
|
|
102
|
-
print(f"Error reconciling file: {entry.exception}")
|
|
103
|
-
continue
|
|
104
|
-
lstable.add_row(which_class.from_file_state(entry))
|
|
105
|
-
lstable.print_table()
|
|
106
|
-
elif p.is_file():
|
|
107
|
-
state = await async_reconciler.reconcile_file(p)
|
|
93
|
+
try:
|
|
94
|
+
for path in args.paths:
|
|
108
95
|
lstable = LSTable()
|
|
109
|
-
|
|
110
|
-
|
|
96
|
+
p = Path(path)
|
|
97
|
+
if p.is_dir():
|
|
98
|
+
async for current_path, path_entries in async_reconciler.walk(path=path, listdir_fn=listdir_fn,
|
|
99
|
+
recursive=False, ignore_fn=None):
|
|
100
|
+
for entry_name in sorted(path_entries):
|
|
101
|
+
entry = path_entries[entry_name]
|
|
102
|
+
if entry.exception:
|
|
103
|
+
print(f"Error reconciling file: {entry.exception}")
|
|
104
|
+
continue
|
|
105
|
+
lstable.add_row(which_class.from_file_state(entry))
|
|
106
|
+
lstable.print_table()
|
|
107
|
+
elif p.is_file():
|
|
108
|
+
state = await async_reconciler.reconcile_file(p)
|
|
109
|
+
lstable = LSTable()
|
|
110
|
+
lstable.add_row(which_class.from_file_state(state))
|
|
111
|
+
lstable.print_table()
|
|
112
|
+
except Exception as e:
|
|
113
|
+
pass
|
|
114
|
+
finally:
|
|
115
|
+
await db.close()
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/walk.py
RENAMED
|
@@ -118,26 +118,30 @@ async def local_listdir(path: str | Path) -> list[Observation]:
|
|
|
118
118
|
def _scan() -> list[Observation]:
|
|
119
119
|
items: list[Observation] = []
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
121
|
+
try:
|
|
122
|
+
for entry in root.iterdir():
|
|
123
|
+
local = path_to_local_file_entry(entry)
|
|
124
|
+
|
|
125
|
+
items.append(
|
|
126
|
+
Observation(
|
|
127
|
+
local_path=entry,
|
|
128
|
+
remote_path=None,
|
|
129
|
+
local_entry=local,
|
|
130
|
+
file_record=None,
|
|
131
|
+
remote_entry=None,
|
|
132
|
+
)
|
|
131
133
|
)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
except:
|
|
135
|
+
pass
|
|
136
|
+
finally:
|
|
137
|
+
return items
|
|
135
138
|
|
|
136
139
|
return await asyncio.to_thread(_scan)
|
|
137
140
|
|
|
138
141
|
|
|
139
142
|
def mcapi_file_to_remote_file_entry(entry: mcmodel.File) -> RemoteFileEntry:
|
|
140
143
|
kind: EntryKind = "dir" if entry.mime_type == "directory" else "file"
|
|
144
|
+
print(f"mcapi_file_to_remote_file_entry called for entry: {entry.mime_type}, {entry.name}, {entry.directory.path}")
|
|
141
145
|
remote_entry = RemoteFileEntry(
|
|
142
146
|
path=Path(entry.directory.path) / entry.name,
|
|
143
147
|
name=entry.name,
|
|
@@ -159,6 +163,7 @@ async def remote_listdir(project_path: str | Path, proj: OldLocalProject) -> lis
|
|
|
159
163
|
project_path: The path within the project to list directory contents of.
|
|
160
164
|
proj: The local project object representing the remote project.
|
|
161
165
|
"""
|
|
166
|
+
print(f"remote_listdir called for project_path: {project_path}, proj: {proj}")
|
|
162
167
|
entries = await asyncio.to_thread(proj.remote.list_directory_by_path, proj.id, project_path.as_posix())
|
|
163
168
|
items: list[Observation] = []
|
|
164
169
|
for entry in entries:
|
|
@@ -201,7 +206,9 @@ async def merged_local_remote_listdir(
|
|
|
201
206
|
"""
|
|
202
207
|
Merge local and remote directory listings, prioritizing local entries.
|
|
203
208
|
"""
|
|
209
|
+
print(f"merged_local_remote_listdir {proj.local_path}, {path}")
|
|
204
210
|
local_entries = await local_listdir_fn(path)
|
|
211
|
+
|
|
205
212
|
project_path = projects.local_to_remote_project_path(Path(proj.local_path), path)
|
|
206
213
|
remote_entries = await remote_listdir_fn(project_path)
|
|
207
214
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '2.3.0b5'
|
|
File without changes
|
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/LICENSE.txt
RENAMED
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/config.py
RENAMED
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/filedb.py
RENAMED
|
File without changes
|
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/globus.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/old/treedb.py
RENAMED
|
File without changes
|
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/parser.py
RENAMED
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/reconcile2.py
RENAMED
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/reconcile3.py
RENAMED
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/requests.py
RENAMED
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/materials_commons/cli/run.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_treecompare_no_cache.py
RENAMED
|
File without changes
|
{materials_commons_cli-2.3.0b5 → materials_commons_cli-2.3.0b7}/test/test_treecompare_with_cache.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|