From 7c487f223557770903de591a683c11209ff51d88 Mon Sep 17 00:00:00 2001 From: Dianeod <40861871+Dianeod@users.noreply.github.com> Date: Thu, 17 Sep 2020 07:49:09 +0100 Subject: [PATCH] Update travis/appveyor files. Removed sys argv statement due to embedPy update (#25) * update merge * update function name * fixed findDates function to account for the word of or in between dates, months and years * removed sys argv statement * fix appveyor and travis files * fix copy error * removed getembedpy --- .travis.yml | 4 ++-- build/buildscript.bat | 12 +++++------- build/getembedpy.q | 10 ---------- build/getkdb.bat | 7 +++---- code/parser.q | 2 -- 5 files changed, 10 insertions(+), 25 deletions(-) delete mode 100644 build/getembedpy.q diff --git a/.travis.yml b/.travis.yml index d72bb68..5d216d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,9 @@ install: # We do this conditionally because it saves us some downloading if the # version is the same. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; + wget https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh -O miniconda.sh; else - wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; + wget https://repo.continuum.io/miniconda/Miniconda3-4.5.4-MacOSX-x86_64.sh -O miniconda.sh; fi - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" diff --git a/build/buildscript.bat b/build/buildscript.bat index efb09fa..4e85384 100644 --- a/build/buildscript.bat +++ b/build/buildscript.bat @@ -6,23 +6,21 @@ if "%APPVEYOR_REPO_TAG%"=="true" ( set PATH=C:\Perl;%PATH% perl -p -i.bak -e s/NLPVERSION/`\$\"%NLP_VERSION%\"/g nlp.q + if not defined QLIC_KC ( goto :nokdb ) -call "build\getkdb.bat" || goto :error set PATH=C:\Miniconda3-x64;C:\Miniconda3-x64\Scripts;%PATH% -mkdir embedpy -cd embedpy -echo getembedpy"latest" | q ..\build\getembedpy.q -q || goto :error -cd .. -echo p)print('embedpy runs') | q -q || goto :error +conda config --set always_yes yes --set changeps1 no +call "build\getkdb.bat" || goto :error + exit /b 0 :error echo failed with error -exit /b +exit /b :nokdb echo no kdb diff --git a/build/getembedpy.q b/build/getembedpy.q deleted file mode 100644 index fe30fc6..0000000 --- a/build/getembedpy.q +++ /dev/null @@ -1,10 +0,0 @@ -qhome:hsym`$$[not count u:getenv`QHOME;[-2"QHOME not defined";exit 1];u]; -dl:{[s;url]$[s;;`/:]system "curl -u ",getenv[`GH_APIREAD]," -s -L ",url,$[s;" -J -O";""]} -download:{ - assets:.j.k[dl[0b]"https://api.github.com/repos/KxSystems/embedPy/releases/",$[not[count x]|x~"latest";"latest";"tags/",x]]`assets; - relurl:first exec browser_download_url from assets where name like{"*",x,"*"}(`m64`l64`w64!string`osx`linux`windows).z.o; - $[count relurl;-1"downloading embedpy from ",relurl;'"release not found"]; - dl[1b]relurl;last ` vs hsym`$relurl} -extract:{system$[x like"*.tgz";"tar -zxf";x like"*.zip";$[.z.o~`w64;"7z x -y";"unzip"];'"not zip or tgz"]," ",string x} -install:{{(` sv qhome,x)1:read1 x}each`p.k`p.q,`${$[x~"w64";x,"/p.dll";x,"/p.so"]}string .z.o} -getembedpy:{@[x;y;{-2"ERROR: ",x;exit 1}]}{install extract download x} diff --git a/build/getkdb.bat b/build/getkdb.bat index 1a910d2..65cf23d 100644 --- a/build/getkdb.bat +++ b/build/getkdb.bat @@ -1,9 +1,8 @@ -curl -fsSOJL %W64% +conda install -c kx embedPy mkdir q -7z x w64.zip -oq +xcopy /E C:\Miniconda3-x64\q q echo|set /P =%QLIC_KC% >q\kc.lic.enc certutil -decode q\kc.lic.enc q\kc.lic - set QHOME=%cd%\q set PATH=%QHOME%\w64;%PATH% -echo .z.K | q -q +echo show .z.K;show .z.k;exit 0 | q -q diff --git a/code/parser.q b/code/parser.q index 2e4e705..56456f9 100644 --- a/code/parser.q +++ b/code/parser.q @@ -1,7 +1,5 @@ \d .nlp -.p.import[`sys;:;`:argv;()]; / spacy expects python be the main process - p)def spell(doc,model): lst=[] for s in doc: