From 42ed2555dc16522f84a1f487fe711cd108ccffca Mon Sep 17 00:00:00 2001 From: Luca Beurer-Kellner Date: Tue, 10 Oct 2023 16:20:32 +0200 Subject: [PATCH] Fix CI (#236) --- flake.nix | 1 - scripts/browser-build/wheels/.gitignore | 3 +++ scripts/browser-build/wheels/get-wheels.sh | 19 +++++++++++++++++++ src/lmql/ui/playground/public/doc-snippets | 1 - 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 scripts/browser-build/wheels/.gitignore create mode 100644 scripts/browser-build/wheels/get-wheels.sh delete mode 120000 src/lmql/ui/playground/public/doc-snippets diff --git a/flake.nix b/flake.nix index 9264db04..19c055b4 100644 --- a/flake.nix +++ b/flake.nix @@ -79,7 +79,6 @@ patchPhase = '' find . -type d -name browser-build -exec rm -rf -- {} + - rm -f -- public/doc-snippets ''; DISABLE_ESLINT_PLUGIN = "true"; diff --git a/scripts/browser-build/wheels/.gitignore b/scripts/browser-build/wheels/.gitignore new file mode 100644 index 00000000..3950b58a --- /dev/null +++ b/scripts/browser-build/wheels/.gitignore @@ -0,0 +1,3 @@ +*.whl +*.tar.gz +*.zip \ No newline at end of file diff --git a/scripts/browser-build/wheels/get-wheels.sh b/scripts/browser-build/wheels/get-wheels.sh new file mode 100644 index 00000000..9604f999 --- /dev/null +++ b/scripts/browser-build/wheels/get-wheels.sh @@ -0,0 +1,19 @@ +if [ ! -f "astunparse-1.6.3-py2.py3-none-any.whl" ]; then + wget https://files.pythonhosted.org/packages/2b/03/13dde6512ad7b4557eb792fbcf0c653af6076b81e5941d36ec61f7ce6028/astunparse-1.6.3-py2.py3-none-any.whl +fi + +if [ ! -f "comma-fix.zip" ]; then + # get GH https://github.com/lbeurerkellner/gpt3-tokenizer/archive/refs/heads/comma-fix.zip + wget https://github.com/lbeurerkellner/gpt3-tokenizer/archive/refs/heads/comma-fix.zip +fi +rm -rf gpt3-tokenizer-comma-fix +# unzip comma-fix.zip +unzip comma-fix.zip +# make new archive with gpt3-tokenizer-comma-fix/* files +pushd gpt3-tokenizer-comma-fix +zip -r ../gpt3-tokenizer.zip * +popd + +pushd ../ +bash package.sh openai +popd diff --git a/src/lmql/ui/playground/public/doc-snippets b/src/lmql/ui/playground/public/doc-snippets deleted file mode 120000 index 6cdfc35f..00000000 --- a/src/lmql/ui/playground/public/doc-snippets +++ /dev/null @@ -1 +0,0 @@ -../../../../../docs/build/html/doc-snippets \ No newline at end of file