Skip to content

Commit 3f8e953

Browse files
authored
Remove copy_dataset API (#218)
It is now no longer needed for any platform
1 parent f479277 commit 3f8e953

3 files changed

Lines changed: 1 addition & 47 deletions

File tree

environment/aws/topology_setup/test_server.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
from __future__ import annotations
4444

4545
import importlib
46-
import shutil
4746
from abc import ABC, abstractmethod
4847
from collections.abc import Callable
4948
from pathlib import Path
@@ -272,28 +271,4 @@ def create_bridge(self, **kwargs) -> PlatformBridge:
272271
pass
273272

274273

275-
def copy_dataset(dest_dir: Path):
276-
header("Copying dataset resources")
277-
click.secho(
278-
"WARNING: This call is deprecated, and the server should not need this anymore.",
279-
fg="yellow",
280-
)
281-
db_dir = TEST_SERVER_DIR.parent / "dataset" / "server" / "dbs" / "3.2"
282-
blob_dir = TEST_SERVER_DIR.parent / "dataset" / "server" / "blobs"
283-
284-
dest_db_dir = dest_dir / "dbs"
285-
shutil.rmtree(dest_db_dir, ignore_errors=True)
286-
dest_db_dir.mkdir(0o755)
287-
for db in db_dir.glob("*.zip"):
288-
click.echo(f"Copying {db} -> {dest_db_dir / db.name}")
289-
shutil.copy2(db, dest_db_dir)
290-
291-
dest_blob_dir = dest_dir / "blobs"
292-
shutil.rmtree(dest_blob_dir, ignore_errors=True)
293-
dest_blob_dir.mkdir(0o755)
294-
for blob in blob_dir.iterdir():
295-
click.echo(f"Copying {blob} -> {dest_blob_dir / blob.name}")
296-
shutil.copy2(blob, dest_blob_dir)
297-
298-
299274
assert __name__ != "__main__", "This module is not meant to be run directly"

environment/aws/topology_setup/test_server_platforms/java_register.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@
3838

3939
from environment.aws.common.io import download_progress_bar, unzip_directory
4040
from environment.aws.common.output import header
41-
from environment.aws.topology_setup.test_server import (
42-
TEST_SERVER_DIR,
43-
TestServer,
44-
copy_dataset,
45-
)
41+
from environment.aws.topology_setup.test_server import TEST_SERVER_DIR, TestServer
4642

4743
from .android_bridge import AndroidBridge
4844
from .platform_bridge import PlatformBridge
@@ -251,21 +247,10 @@ def __init__(self, version: str, gradle_target: str = "jar"):
251247
super().__init__(version)
252248
self.__gradle_target = gradle_target
253249

254-
def _copy_dataset(self) -> None:
255-
# The original script this was ported from copied all versions
256-
# regardless of what was being built. I opted to not do this
257-
# and instead only copy the one that is going to be built
258-
# so that way there is no need to keep a manual list of versions
259-
# here.
260-
dest_dir = JAK_TEST_SERVER_DIR / "assets" / "3.2"
261-
dest_dir.mkdir(0o755, parents=True, exist_ok=True)
262-
copy_dataset(dest_dir)
263-
264250
def build(self) -> None:
265251
"""
266252
Build the JAK test server.
267253
"""
268-
self._copy_dataset()
269254
gradle_path = JAK_TEST_SERVER_DIR / self.test_server_path / "gradlew"
270255
if platform.system() == "Windows":
271256
gradle_path = gradle_path.with_suffix(".bat")

environment/aws/topology_setup/test_server_platforms/swift_register.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
DOWNLOADED_TEST_SERVER_DIR,
3737
TEST_SERVER_DIR,
3838
TestServer,
39-
copy_dataset,
4039
)
4140

4241
from .ios_bridge import iOSBridge
@@ -85,10 +84,6 @@ def _download_cbl(self) -> None:
8584
unzip_directory(download_file, FRAMEWORKS_DIR)
8685
download_file.unlink()
8786

88-
def _copy_dataset(self) -> None:
89-
dest_dir = SWIFT_TEST_SERVER_DIR / "Assets"
90-
copy_dataset(dest_dir)
91-
9287

9388
@TestServer.register("swift_ios")
9489
class SwiftTestServer_iOS(SwiftTestServer):
@@ -124,7 +119,6 @@ def latestbuilds_path(self) -> str:
124119
return f"couchbase-lite-ios/{version_parts[0]}/{version_parts[1]}/testserver_ios.zip"
125120

126121
def build(self) -> None:
127-
self._copy_dataset()
128122
self._download_cbl()
129123
header("Building")
130124
env = os.environ.copy()

0 commit comments

Comments
 (0)