Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions examples/07_stackoverflow_tables_oltp.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
sys.exit(1)


# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION),
# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use).
UV_VERSION = "0.12.0"


def uv_bootstrap_commands(python_cmd: str) -> List[str]:
return [
(
f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; '
"arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; "
"req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); "
"version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); "
f"version='{UV_VERSION}'; "
"archive=pathlib.Path('/tmp/uv.tar.gz'); "
"archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); "
"target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); "
Expand Down
8 changes: 6 additions & 2 deletions examples/08_stackoverflow_tables_olap.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@
sys.exit(1)


# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION),
# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use).
UV_VERSION = "0.12.0"


def uv_bootstrap_commands(python_cmd: str) -> List[str]:
return [
(
f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; '
"arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; "
"req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); "
"version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); "
f"version='{UV_VERSION}'; "
"archive=pathlib.Path('/tmp/uv.tar.gz'); "
"archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); "
"target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); "
Expand Down
8 changes: 6 additions & 2 deletions examples/09_stackoverflow_graph_oltp.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@
sys.exit(1)


# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION),
# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use).
UV_VERSION = "0.12.0"


def uv_bootstrap_commands(python_cmd: str) -> List[str]:
return [
(
f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; '
"arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; "
"req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); "
"version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); "
f"version='{UV_VERSION}'; "
"archive=pathlib.Path('/tmp/uv.tar.gz'); "
"archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); "
"target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); "
Expand Down
8 changes: 6 additions & 2 deletions examples/10_stackoverflow_graph_olap.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@
sys.exit(1)


# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION),
# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use).
UV_VERSION = "0.12.0"


def uv_bootstrap_commands(python_cmd: str) -> List[str]:
return [
(
f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; '
"arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; "
"req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); "
"version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); "
f"version='{UV_VERSION}'; "
"archive=pathlib.Path('/tmp/uv.tar.gz'); "
"archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); "
"target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); "
Expand Down
8 changes: 6 additions & 2 deletions examples/11_vector_index_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,17 @@ def resolve_milvus_compose_version(release_tag: str) -> str:
return resolved


# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION),
# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use).
UV_VERSION = "0.12.0"


def uv_bootstrap_commands(python_cmd: str = "python") -> List[str]:
return [
(
f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; '
"arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; "
"req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); "
"version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); "
f"version='{UV_VERSION}'; "
"archive=pathlib.Path('/tmp/uv.tar.gz'); "
"archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); "
"target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); "
Expand Down
8 changes: 6 additions & 2 deletions examples/12_vector_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,17 @@ def resolve_milvus_compose_version(release_tag: str) -> str:
return resolved


# The uv release the containers download: the version the repo's CI pins (.github/workflows/test-native.yml UV_VERSION),
# fetched straight from its release URL instead of asking the GitHub API for "latest" (unpinned, and rate-limited for anonymous use).
UV_VERSION = "0.12.0"


def uv_bootstrap_commands(python_cmd: str = "python") -> List[str]:
return [
(
f'{python_cmd} -c "import json, pathlib, platform, shutil, tarfile, urllib.request; '
"arch={'x86_64':'x86_64-unknown-linux-gnu','amd64':'x86_64-unknown-linux-gnu','aarch64':'aarch64-unknown-linux-gnu','arm64':'aarch64-unknown-linux-gnu'}[platform.machine().lower()]; "
"req=urllib.request.Request('https://api.github.com/repos/astral-sh/uv/releases/latest', headers={'User-Agent':'arcadedb-bench'}); "
"version=json.load(urllib.request.urlopen(req, timeout=30))['tag_name'].lstrip('v'); "
f"version='{UV_VERSION}'; "
"archive=pathlib.Path('/tmp/uv.tar.gz'); "
"archive.write_bytes(urllib.request.urlopen(f'https://github.com/astral-sh/uv/releases/download/{version}/uv-{arch}.tar.gz', timeout=30).read()); "
"target=pathlib.Path('/tmp/uv-extract'); target.mkdir(parents=True, exist_ok=True); "
Expand Down
Loading