From d023411518f0f73ec94775274e6bf141c8f05cd1 Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Fri, 22 Sep 2023 18:51:59 +0200 Subject: [PATCH 1/9] Add warning in front of generated code blocks --- scripts/generate_all_docs.sh | 2 +- scripts/generate_docs.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate_all_docs.sh b/scripts/generate_all_docs.sh index 95607ddd4a9..0fa42f28fad 100755 --- a/scripts/generate_all_docs.sh +++ b/scripts/generate_all_docs.sh @@ -3,7 +3,7 @@ set -xeuo pipefail if [ "${1-}" = "" ] then - echo >&2 "usage: $0 duckdb_dir" + echo >&2 "Usage: $0 duckdb_dir_with_debug_duckdb" exit 1 fi diff --git a/scripts/generate_docs.py b/scripts/generate_docs.py index 3afc2658e6e..83aa6176ef3 100644 --- a/scripts/generate_docs.py +++ b/scripts/generate_docs.py @@ -277,7 +277,7 @@ def replace_docs_in_file(file_name, group_name, docs_string_for_this_group): text = ( text.rsplit(api_ref_split, 1)[0] + api_ref_split - + '\n\n' + + '\n\n\n\n' + docs_string_for_this_group ) found = True From dbc8af5612fded0b02fe84e2a9b043cf2ff1d81a Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Sat, 23 Sep 2023 08:22:19 +0200 Subject: [PATCH 2/9] Document the execution of scripts/generate_all_docs.sh --- scripts/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 scripts/README.md diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 00000000000..197300bcf58 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,26 @@ +# DuckDB-Web scripts + +## `generate_all_docs.sh` + +### Prerequisites + +Build DuckDB in `debug` mode and install the `httpfs` and `icu` extensions: + +```bash +GEN=ninja BUILD_HTTPFS=1 BUILD_ICU=1 make debug +build/debug/duckdb -c "INSTALL 'build/debug/extension/httpfs/httpfs.duckdb_extension'; INSTALL 'build/debug/extension/icu/icu.duckdb_extension';" +``` + +Install the NodeJS dependencies: + +```bash +npm install +``` + +### Running the script + +Run the script as follows: + +```bash +scripts/generate_all_docs.sh +``` From e2ef64e8721421d07d61430a299aafd15e57acc3 Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Sat, 23 Sep 2023 08:49:18 +0200 Subject: [PATCH 3/9] Document installation instructions for DuckDB CLI/Python client --- scripts/README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/README.md b/scripts/README.md index 197300bcf58..f4f0577e8bd 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -4,11 +4,20 @@ ### Prerequisites -Build DuckDB in `debug` mode and install the `httpfs` and `icu` extensions: +Build DuckDB in `debug` mode. Install the Python client as well as the `httpfs` and `icu` extensions: ```bash -GEN=ninja BUILD_HTTPFS=1 BUILD_ICU=1 make debug -build/debug/duckdb -c "INSTALL 'build/debug/extension/httpfs/httpfs.duckdb_extension'; INSTALL 'build/debug/extension/icu/icu.duckdb_extension';" +# build DuckDB CLI binary +GEN=ninja BUILD_HTTPFS=1 BUILD_ICU=1 OPENSSL_ROOT_DIR=/opt/homebrew/bin/ make debug +# install extensions to DuckDB CLI binary +build/debug/duckdb -c "INSTALL 'build/debug/extension/httpfs/httpfs.duckdb_extension';" +build/debug/duckdb -c "INSTALL 'build/debug/extension/icu/icu.duckdb_extension';" + +# build DuckDB Python client +python3 tools/pythonpkg/setup.py install +# install extensions to Python client +python3 -c "import duckdb; duckdb.sql(\"INSTALL 'build/debug/extension/httpfs/httpfs.duckdb_extension';\")" +python3 -c "import duckdb; duckdb.sql(\"INSTALL 'build/debug/extension/icu/icu.duckdb_extension';\")" ``` Install the NodeJS dependencies: From e67816be9e054ba8cbd19ff7e0e3dbafadfbe071 Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Sat, 23 Sep 2023 11:59:29 +0200 Subject: [PATCH 4/9] Document Python dependencies --- scripts/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/README.md b/scripts/README.md index f4f0577e8bd..003319b6913 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -20,10 +20,11 @@ python3 -c "import duckdb; duckdb.sql(\"INSTALL 'build/debug/extension/httpfs/ht python3 -c "import duckdb; duckdb.sql(\"INSTALL 'build/debug/extension/icu/icu.duckdb_extension';\")" ``` -Install the NodeJS dependencies: +Install the NodeJS and Python dependencies: ```bash npm install +python -m pip install -r requirements.txt ``` ### Running the script From aece1da2289881dabd52856d98312dd9ddbe2aa1 Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Sat, 23 Sep 2023 12:05:01 +0200 Subject: [PATCH 5/9] Simplify installation instructions for scripts --- scripts/README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/README.md b/scripts/README.md index 003319b6913..301776e1d71 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -7,17 +7,15 @@ Build DuckDB in `debug` mode. Install the Python client as well as the `httpfs` and `icu` extensions: ```bash -# build DuckDB CLI binary +# build the DuckDB CLI client GEN=ninja BUILD_HTTPFS=1 BUILD_ICU=1 OPENSSL_ROOT_DIR=/opt/homebrew/bin/ make debug -# install extensions to DuckDB CLI binary +# install extensions to the DuckDB CLI client build/debug/duckdb -c "INSTALL 'build/debug/extension/httpfs/httpfs.duckdb_extension';" build/debug/duckdb -c "INSTALL 'build/debug/extension/icu/icu.duckdb_extension';" -# build DuckDB Python client +# build the DuckDB Python client python3 tools/pythonpkg/setup.py install -# install extensions to Python client -python3 -c "import duckdb; duckdb.sql(\"INSTALL 'build/debug/extension/httpfs/httpfs.duckdb_extension';\")" -python3 -c "import duckdb; duckdb.sql(\"INSTALL 'build/debug/extension/icu/icu.duckdb_extension';\")" +# extensions are shared across clients so there is no need to install them to Python ``` Install the NodeJS and Python dependencies: From 299adb85642047db2b2217697beeb5fc41fe8f96 Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Sat, 23 Sep 2023 22:59:37 +0200 Subject: [PATCH 6/9] Update scripts/README.md Co-authored-by: Elliana May --- scripts/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/README.md b/scripts/README.md index 301776e1d71..59f93aebcad 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -30,5 +30,5 @@ python -m pip install -r requirements.txt Run the script as follows: ```bash -scripts/generate_all_docs.sh +./scripts/generate_all_docs.sh ``` From 8df55d7563550ad339a588f1747e568d68d2133e Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Sat, 23 Sep 2023 22:59:44 +0200 Subject: [PATCH 7/9] Update scripts/README.md Co-authored-by: Elliana May --- scripts/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/README.md b/scripts/README.md index 59f93aebcad..1be28329f46 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -22,7 +22,7 @@ Install the NodeJS and Python dependencies: ```bash npm install -python -m pip install -r requirements.txt +pip install -r requirements.txt ``` ### Running the script From a6cadf11e4722295bca8243042b8eb7b427306fd Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Sat, 23 Sep 2023 22:59:51 +0200 Subject: [PATCH 8/9] Update scripts/README.md Co-authored-by: Elliana May --- scripts/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/README.md b/scripts/README.md index 1be28329f46..03cdd5ba83d 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -14,7 +14,7 @@ build/debug/duckdb -c "INSTALL 'build/debug/extension/httpfs/httpfs.duckdb_exten build/debug/duckdb -c "INSTALL 'build/debug/extension/icu/icu.duckdb_extension';" # build the DuckDB Python client -python3 tools/pythonpkg/setup.py install +pip install -e tools/pythonpkg # extensions are shared across clients so there is no need to install them to Python ``` From 164f9e92c6b5799b1111579b24cb9489c927d6d9 Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Sat, 23 Sep 2023 23:16:59 +0200 Subject: [PATCH 9/9] Refer users to the nightly build --- scripts/README.md | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/scripts/README.md b/scripts/README.md index 03cdd5ba83d..7a164f44798 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -4,19 +4,7 @@ ### Prerequisites -Build DuckDB in `debug` mode. Install the Python client as well as the `httpfs` and `icu` extensions: - -```bash -# build the DuckDB CLI client -GEN=ninja BUILD_HTTPFS=1 BUILD_ICU=1 OPENSSL_ROOT_DIR=/opt/homebrew/bin/ make debug -# install extensions to the DuckDB CLI client -build/debug/duckdb -c "INSTALL 'build/debug/extension/httpfs/httpfs.duckdb_extension';" -build/debug/duckdb -c "INSTALL 'build/debug/extension/icu/icu.duckdb_extension';" - -# build the DuckDB Python client -pip install -e tools/pythonpkg -# extensions are shared across clients so there is no need to install them to Python -``` +Get the DuckDB nightly build from the [installation page](https://duckdb.org/docs/installation/), available under the GitHub main (Bleeding Edge) tab. Install the NodeJS and Python dependencies: @@ -30,5 +18,5 @@ pip install -r requirements.txt Run the script as follows: ```bash -./scripts/generate_all_docs.sh +./scripts/generate_all_docs.sh ```