Skip to content

Commit e949829

Browse files
committed
Change all graphflow to kuzu
1 parent 96617ab commit e949829

File tree

680 files changed

+2329
-2306
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

680 files changed

+2329
-2306
lines changed

.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ BreakConstructorInitializers: BeforeColon
5555
BreakInheritanceList: BeforeColon
5656
BreakStringLiterals: true
5757
ColumnLimit: 100
58-
CommentPragmas: '^GF pragma:'
58+
CommentPragmas: '^KU pragma:'
5959
CompactNamespaces: false
6060
ConstructorInitializerAllOnOneLineOrOnePerLine: false
6161
ConstructorInitializerIndentWidth: 4

.github/workflows/linux-precompiled-bin-workflow.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323

2424
- uses: actions/upload-artifact@v3
2525
with:
26-
name: graphflowdb-${{ github.event.inputs.packageVersion }}-linux-x86_64
26+
name: kuzu-${{ github.event.inputs.packageVersion }}-linux-x86_64
2727
path: |
28-
./scripts/pre-compiled-bins/graphflowdb
28+
./scripts/pre-compiled-bins/kuzu
2929
./scripts/pre-compiled-bins/include
30-
./scripts/pre-compiled-bins/libgraphflowdb.so
30+
./scripts/pre-compiled-bins/libkuzu.so
3131
3232
- name: cleanup
33-
run: rm -rf ./scripts/pre-compiled-bins/graphflowdb ./scripts/pre-compiled-bins/include ./scripts/pre-compiled-bins/libgraphflowdb.so
33+
run: rm -rf ./scripts/pre-compiled-bins/kuzu ./scripts/pre-compiled-bins/include ./scripts/pre-compiled-bins/libkuzu.so

.github/workflows/mac-precompiled-bin-workflow.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626

2727
- uses: actions/upload-artifact@v3
2828
with:
29-
name: graphflowdb-${{ github.event.inputs.packageVersion }}-osx-arm64
29+
name: kuzu-${{ github.event.inputs.packageVersion }}-osx-arm64
3030
path: |
31-
./scripts/pre-compiled-bins/graphflowdb
31+
./scripts/pre-compiled-bins/kuzu
3232
./scripts/pre-compiled-bins/include
33-
./scripts/pre-compiled-bins/libgraphflowdb.dylib
33+
./scripts/pre-compiled-bins/libkuzu.dylib
3434
3535
- name: cleanup
36-
run: rm -rf ./scripts/pre-compiled-bins/graphflowdb ./scripts/pre-compiled-bins/include ./scripts/pre-compiled-bins/libgraphflowdb.dylib
36+
run: rm -rf ./scripts/pre-compiled-bins/kuzu ./scripts/pre-compiled-bins/include ./scripts/pre-compiled-bins/libkuzu.dylib
3737

3838
- name: build-x86_64
3939
run: python3 pre_compile.py
@@ -44,11 +44,11 @@ jobs:
4444

4545
- uses: actions/upload-artifact@v3
4646
with:
47-
name: graphflowdb-${{ github.event.inputs.packageVersion }}-osx-x86_64
47+
name: kuzu-${{ github.event.inputs.packageVersion }}-osx-x86_64
4848
path: |
49-
./scripts/pre-compiled-bins/graphflowdb
49+
./scripts/pre-compiled-bins/kuzu
5050
./scripts/pre-compiled-bins/include
51-
./scripts/pre-compiled-bins/libgraphflowdb.dylib
51+
./scripts/pre-compiled-bins/libkuzu.dylib
5252
5353
- name: cleanup
54-
run: rm -rf ./scripts/pre-compiled-bins/graphflowdb ./scripts/pre-compiled-bins/include ./scripts/pre-compiled-bins/libgraphflowdb.dylib
54+
run: rm -rf ./scripts/pre-compiled-bins/kuzu ./scripts/pre-compiled-bins/include ./scripts/pre-compiled-bins/libkuzu.dylib

.github/workflows/mac-wheel-workflow.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: create-source-distribution
2020
working-directory: ./scripts/pip-package/
2121
run: |
22-
rm -rf wheelhouse graphflowdb.tar.gz
22+
rm -rf wheelhouse kuzu.tar.gz
2323
mkdir wheelhouse
2424
bash package_tar.sh
2525
@@ -31,7 +31,7 @@ jobs:
3131
CIBW_BUILD_VERBOSITY: 3
3232
MACOSX_DEPLOYMENT_TARGET: 11.0
3333
with:
34-
package-dir: ./scripts/pip-package/graphflowdb.tar.gz
34+
package-dir: ./scripts/pip-package/kuzu.tar.gz
3535
output-dir: ./scripts/pip-package/wheelhouse
3636

3737
- name: build-x86-wheel
@@ -42,7 +42,7 @@ jobs:
4242
CIBW_BUILD_VERBOSITY: 3
4343
MACOSX_DEPLOYMENT_TARGET: 10.15
4444
with:
45-
package-dir: ./scripts/pip-package/graphflowdb.tar.gz
45+
package-dir: ./scripts/pip-package/kuzu.tar.gz
4646
output-dir: ./scripts/pip-package/wheelhouse
4747

4848
- uses: actions/upload-artifact@v3

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# graphflowDB
1+
# kuzu
22

33
## Compilation
44

@@ -17,7 +17,7 @@
1717

1818
## CLI
1919

20-
- To start CLI `bazel run //tools/shell:graphflowdb -- -i <serialized-graph-path>`
20+
- To start CLI `bazel run //tools/shell:kuzu -- -i <serialized-graph-path>`
2121
- CLI built in commands
2222
:help get command list
2323
:clear clear shell
@@ -28,7 +28,7 @@
2828

2929
## Benchmark runner
3030

31-
Benchmark runner is designed to be used in graphflowdb-benchmark. Deirectly using benchmark runner is not recommended.
31+
Benchmark runner is designed to be used in kuzu-benchmark. Deirectly using benchmark runner is not recommended.
3232

3333
- benchmark file should have the following format
3434

WORKSPACE.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
workspace(name = "graphflowdb")
1+
workspace(name = "kuzu")
22

33
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
44
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_jar")

benchmark/benchmark_runner.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
datasets = {'ldbc-sf10', 'ldbc-sf100'}
1111

1212
datasets_path = {
13-
'ldbc-sf10-gf': '/home/x74feng/CI/ldbc-sf10',
14-
'ldbc-sf100-gf': '/home/x74feng/CI/ldbc-sf100'
13+
'ldbc-sf10-ku': '/home/x74feng/CI/ldbc-sf10',
14+
'ldbc-sf100-ku': '/home/x74feng/CI/ldbc-sf100'
1515
}
1616

1717
serialized_graphs_path = {
18-
'ldbc-sf10-gf': '/home/x74feng/CI/ldbc-sf10-serialized',
19-
'ldbc-sf100-gf': '/home/x74feng/CI/ldbc-sf100-serialized'
18+
'ldbc-sf10-ku': '/home/x74feng/CI/ldbc-sf10-serialized',
19+
'ldbc-sf100-ku': '/home/x74feng/CI/ldbc-sf100-serialized'
2020
}
2121

2222
benchmark_server_dir = '/home/x74feng/CI/server'
2323
benchmark_log_dir = benchmark_server_dir + '/data/logs'
2424
benchmark_files = os.getenv("GITHUB_WORKSPACE") + '/benchmark/queries'
25-
graphflowDB_benchmark_tool = os.getenv(
25+
kuzu_benchmark_tool = os.getenv(
2626
"GITHUB_WORKSPACE") + '/bazel-out/k8-fastbuild/bin/tools/benchmark/benchmark_tool'
2727

2828
# benchmark configuration
@@ -134,10 +134,10 @@ def get_run_num():
134134
return 1
135135

136136

137-
def run_graphflowdb(serialized_graph_path):
137+
def run_kuzu(serialized_graph_path):
138138
for group, _ in benchmark_group.group_to_benchmarks.items():
139139
benchmark_cmd = [
140-
graphflowDB_benchmark_tool,
140+
kuzu_benchmark_tool,
141141
'--dataset=' + serialized_graph_path,
142142
'--benchmark=' + benchmark_files + '/' + group,
143143
'--warmup=' + str(num_warmup),
@@ -202,13 +202,13 @@ def upload_benchmark_result(run_num):
202202
if not os.path.exists(benchmark_log_dir):
203203
os.mkdir(benchmark_log_dir)
204204
benchmark_files = benchmark_files + '/' + args.dataset
205-
dataset_path = datasets_path[args.dataset + '-gf']
205+
dataset_path = datasets_path[args.dataset + '-ku']
206206

207207
# load benchmark
208208
benchmark_group = BenchmarkGroup(benchmark_files)
209209
benchmark_group.load()
210210

211-
run_graphflowdb(serialized_graphs_path[args.dataset + '-gf'])
211+
run_kuzu(serialized_graphs_path[args.dataset + '-ku'])
212212

213213
# upload benchmark result and logs
214214
upload_benchmark_result(run_num)
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## Build
22
```
3-
docker build -t graphflow-self-hosted-test-runner .
3+
docker build -t kuzu-self-hosted-test-runner .
44
```
55

66
## Start Container
77
```
88
docker run --name self-hosted-test-runner-X --detach --restart=always\
99
-e GITHUB_ACCESS_TOKEN=YOUR_GITHUB_ACCESS_TOKEN\
10-
-e MACHINE_NAME=NAME_OF_THE_PHYSICAL_MACHINE graphflow-self-hosted-test-runner
10+
-e MACHINE_NAME=NAME_OF_THE_PHYSICAL_MACHINE kuzu-self-hosted-test-runner
1111
```
1212

1313
Note: `GITHUB_ACCESS_TOKEN` is the account-level access token that can be acquired at [GitHub developer settings](https://github.com/settings/tokens).

scripts/pip-package/MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include graphflowdb/*.so
1+
include kuzu/*.so

scripts/pip-package/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
```
33
chmod +x package_tar.sh
44
./package_tar.sh
5-
pip install graphflowdb.tar.gz
5+
pip install kuzu.tar.gz
66
```
77

88
Note: installing from source requires the full toolchain for building the project, including bazel, OpenJDK, and a compiler compatible with C++20. The package works for both Linux and macOS.
@@ -13,14 +13,14 @@ The container for manylinux builder automatically builds and upload wheels compa
1313

1414
## Build
1515
```
16-
docker build -t graphflow-self-hosted-linux-builder .
16+
docker build -t kuzu-self-hosted-linux-builder .
1717
```
1818

1919
## Start container
2020
```
2121
docker run --name self-hosted-linux-builder --detach --restart=always\
2222
-e GITHUB_ACCESS_TOKEN=YOUR_GITHUB_ACCESS_TOKEN\
23-
-e MACHINE_NAME=NAME_OF_THE_PHYSICAL_MACHINE graphflow-self-hosted-linux-builder
23+
-e MACHINE_NAME=NAME_OF_THE_PHYSICAL_MACHINE kuzu-self-hosted-linux-builder
2424
```
2525

2626
Note: `GITHUB_ACCESS_TOKEN` is the account-level access token that can be acquired at [GitHub developer settings](https://github.com/settings/tokens).

scripts/pip-package/build_all_packages.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
PLATFORM="manylinux2014_x86_64"
44

55
chmod +x ./package_tar.sh
6-
rm -rf wheelhouse graphflowdb.tar.gz && ./package_tar.sh
6+
rm -rf wheelhouse kuzu.tar.gz && ./package_tar.sh
77
mkdir wheelhouse
88

99
# Build wheels, excluding pypy platforms
@@ -13,7 +13,7 @@ for PYBIN in /opt/python/*/bin; do
1313
fi
1414
echo "Building wheel for $PYBIN..."
1515
"${PYBIN}/pip" install -r ../../tools/python_api/requirements_dev.txt
16-
"${PYBIN}/pip" wheel graphflowdb.tar.gz --no-deps -w wheelhouse/
16+
"${PYBIN}/pip" wheel kuzu.tar.gz --no-deps -w wheelhouse/
1717
done
1818

1919
for whl in wheelhouse/*.whl; do

scripts/pip-package/graphflowdb/__init__.py

-1
This file was deleted.

scripts/pip-package/kuzu/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from ._kuzu import *

scripts/pip-package/package_tar.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ tar --exclude="$(pwd)" \
66
--exclude="./scripts" \
77
--exclude="./.?*" \
88
-cf\
9-
graphflowdb-source.tar\
9+
kuzu-source.tar\
1010
-C ../../. .
11-
rm -rf graphflowdb-source && mkdir graphflowdb-source
12-
tar -xf graphflowdb-source.tar -C ./graphflowdb-source
13-
rm -rf graphflowdb-source.tar
11+
rm -rf kuzu-source && mkdir kuzu-source
12+
tar -xf kuzu-source.tar -C ./kuzu-source
13+
rm -rf kuzu-source.tar
1414

1515
# Add all files under current directory
1616
touch sdist.tar
@@ -20,6 +20,6 @@ tar -xf sdist.tar -C ./sdist
2020
rm -rf sdist.tar
2121

2222
# Create tar.gz for PyPI
23-
rm -rf graphflowdb.tar.gz
24-
tar -czf graphflowdb.tar.gz sdist
25-
rm -rf sdist graphflowdb-source
23+
rm -rf kuzu.tar.gz
24+
tar -czf kuzu.tar.gz sdist
25+
rm -rf sdist kuzu-source

scripts/pip-package/setup.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
base_dir = os.path.dirname(__file__)
1212

13-
with open(os.path.join(base_dir, 'graphflowdb-source', 'tools', 'python_api', 'requirements_dev.txt')) as f:
13+
with open(os.path.join(base_dir, 'kuzu-source', 'tools', 'python_api', 'requirements_dev.txt')) as f:
1414
requirements = f.read().splitlines()
1515

1616

@@ -47,13 +47,13 @@ def build_extension(self, ext: BazelExtension) -> None:
4747
full_cmd = ['bazel', 'build', *args, '//tools/python_api:all']
4848
env_vars = os.environ.copy()
4949
env_vars['PYTHON_BIN_PATH'] = sys.executable
50-
build_dir = os.path.join(ext.sourcedir, 'graphflowdb-source')
50+
build_dir = os.path.join(ext.sourcedir, 'kuzu-source')
5151

5252
subprocess.run(full_cmd, cwd=build_dir, check=True, env=env_vars)
5353
self.announce("Done building native extension.", level=3)
5454
self.announce("Copying native extension...", level=3)
5555
shutil.copyfile(os.path.join(build_dir, 'bazel-bin', 'tools', 'python_api',
56-
'_graphflowdb.so'), os.path.join(ext.sourcedir, ext.name, '_graphflowdb.so'))
56+
'_kuzu.so'), os.path.join(ext.sourcedir, ext.name, '_kuzu.so'))
5757
self.announce("Done copying native extension.", level=3)
5858

5959

@@ -64,15 +64,15 @@ def run(self):
6464
return super().run()
6565

6666

67-
setup(name='graphflowdb',
67+
setup(name='kuzu',
6868
version=os.environ['PYTHON_PACKAGE_VERSION'] if 'PYTHON_PACKAGE_VERSION' in os.environ else '0.0.1',
6969
install_requires=requirements,
7070
ext_modules=[BazelExtension(
71-
name="graphflowdb", sourcedir=base_dir)],
72-
description='GraphflowDB Python API',
71+
name="kuzu", sourcedir=base_dir)],
72+
description='KuzuDB Python API',
7373
long_description=open(os.path.join(base_dir, "README.md"), 'r').read(),
7474
long_description_content_type="text/markdown",
75-
packages=["graphflowdb"],
75+
packages=["kuzu"],
7676
zip_safe=True,
7777
include_package_data=True,
7878
cmdclass={

scripts/pre-compiled-bins/collect_files.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,20 @@
1212

1313
MAIN_HEADER_PATH = os.path.realpath(
1414
os.path.join(os.path.dirname(__file__), '../../src/'))
15+
MAIN_DIR_NAME = os.path.basename(os.path.realpath(
16+
os.path.join(os.path.dirname(__file__), '../../')))
17+
18+
BAZEL_WORKSPACE_NAME = 'bazel-%s' % MAIN_DIR_NAME
1519
EXTERNAL_HEADER_PATH = os.path.realpath(
16-
os.path.join(os.path.dirname(__file__), '../../bazel-graphflowdb/external'))
20+
os.path.join(os.path.dirname(__file__), '../../%s/external' % BAZEL_WORKSPACE_NAME))
1721

1822
MAIN_OBJ_PATH = os.path.realpath(
1923
os.path.join(os.path.dirname(__file__), '../../bazel-bin/src'))
2024
EXTERNAL_OBJ_PATH = os.path.realpath(
2125
os.path.join(os.path.dirname(__file__), '../../bazel-bin/external'))
2226

2327
MAIN_EXE_PATH = os.path.realpath(
24-
os.path.join(os.path.dirname(__file__), '../../bazel-bin/tools/shell/graphflowdb'))
28+
os.path.join(os.path.dirname(__file__), '../../bazel-bin/tools/shell/kuzu'))
2529

2630
UNUSED_HEADER_EXCLUDE_PREFIXES = [
2731
'src/main',
@@ -243,7 +247,7 @@ def collect_obj_files(external_lib_names):
243247
def collect_executable():
244248
logging.info("Collecting executable...")
245249
dest = os.path.realpath(
246-
os.path.join('.', 'graphflowdb'))
250+
os.path.join('.', 'kuzu'))
247251
logging.debug("Copying executable: " + MAIN_EXE_PATH + " -> " + dest)
248252
shutil.copyfile(MAIN_EXE_PATH, dest)
249253
logging.debug("Fixing permissions for executable: " + dest)

0 commit comments

Comments
 (0)