diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c2f776..b9653b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,9 @@ jobs: node-version: '14.x' - name: Base Setup uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + with: + python_version: "3.8" + node_version: '14.x' - name: Install dependencies run: make devenv - name: Build the extension diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9080e0..b129bd2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,9 @@ jobs: - name: Base Setup uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + with: + python_version: "3.8" + node_version: '14.x' - name: Install dependencies run: make devenv - name: Build and publish diff --git a/fugue_jupyter/_constants.py b/fugue_jupyter/_constants.py index 3e71d3a..37aed1d 100644 --- a/fugue_jupyter/_constants.py +++ b/fugue_jupyter/_constants.py @@ -7,7 +7,7 @@ for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } -var fugue_keywords = "fill hash rand even presort persist broadcast params process output outtransform rowcount concurrency prepartition zip print title save append parquet csv json single checkpoint weak strong deterministic yield connect sample seed take sub callback dataframe file"; +var fugue_keywords = "system bernoulli reservoir approx fill hash rand even presort persist broadcast params process output outtransform rowcount concurrency prepartition zip print title save append parquet csv json single checkpoint weak strong deterministic yield connect sample seed take sub callback dataframe file"; CodeMirror.defineMIME("text/x-fsql", { name: "sql", keywords: set(fugue_keywords + " add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"), diff --git a/fugue_jupyter/nbextension/main.js b/fugue_jupyter/nbextension/main.js index d75d40b..91a87e9 100644 --- a/fugue_jupyter/nbextension/main.js +++ b/fugue_jupyter/nbextension/main.js @@ -21,7 +21,7 @@ define([ return obj; } - var fugue_keywords = "fill hash rand even presort persist broadcast params process output outtransform rowcount concurrency prepartition zip print title save append parquet csv json single checkpoint weak strong deterministic yield connect sample seed take sub callback dataframe file"; + var fugue_keywords = "system bernoulli reservoir approx fill hash rand even presort persist broadcast params process output outtransform rowcount concurrency prepartition zip print title save append parquet csv json single checkpoint weak strong deterministic yield connect sample seed take sub callback dataframe file"; function load_extension() { diff --git a/package.json b/package.json index 39f5fd7..215b29a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fugue-jupyter", - "version": "0.2.1", + "version": "0.2.2", "description": "Jupyterlab Extension for Fugue", "keywords": [ "jupyter", diff --git a/requirements.txt b/requirements.txt index 474b38f..df96f55 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,5 +22,6 @@ jupyterlab jupyter-packaging jupyterlab-lsp cookiecutter +bleach>5.0.0 check-manifest diff --git a/src/utils.ts b/src/utils.ts index 462503c..c9e14ac 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -91,7 +91,7 @@ function set(str: string) { } const fugue_keywords = - 'fill hash rand even presort persist broadcast params process output outtransform rowcount concurrency prepartition zip print title save append parquet csv json single checkpoint weak strong deterministic yield connect sample seed take sub callback dataframe file'; + 'system bernoulli reservoir approx fill hash rand even presort persist broadcast params process output outtransform rowcount concurrency prepartition zip print title save append parquet csv json single checkpoint weak strong deterministic yield connect sample seed take sub callback dataframe file'; /** * Register text editor based on file type. diff --git a/tests/fugue_jupyter/test_notebook.ipynb b/tests/fugue_jupyter/test_notebook.ipynb index 2c0e6c0..d758f93 100644 --- a/tests/fugue_jupyter/test_notebook.ipynb +++ b/tests/fugue_jupyter/test_notebook.ipynb @@ -420,39 +420,7 @@ }, { "data": { - "application/javascript": [ - "\n", - "require([\"codemirror/lib/codemirror\"]);\n", - "function set(str) {\n", - " var obj = {}, words = str.split(\" \");\n", - " for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n", - " return obj;\n", - " }\n", - "var fugue_keywords = \"fill hash rand even presort persist broadcast params process output outtransform rowcount concurrency prepartition zip print title save append parquet csv json single checkpoint weak strong deterministic yield connect sample seed take sub callback dataframe file\";\n", - "CodeMirror.defineMIME(\"text/x-fsql\", {\n", - " name: \"sql\",\n", - " keywords: set(fugue_keywords + \" add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with\"),\n", - " builtin: set(\"date datetime tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat\"),\n", - " atoms: set(\"false true null\"),\n", - " operatorChars: /^[*\\/+\\-%<>!=~&|^]/,\n", - " dateSQL: set(\"time\"),\n", - " support: set(\"ODBCdotTable doubleQuote zerolessFloat\")\n", - " });\n", - "\n", - "CodeMirror.modeInfo.push( {\n", - " name: \"Fugue SQL\",\n", - " mime: \"text/x-fsql\",\n", - " mode: \"sql\"\n", - " } );\n", - "\n", - "require(['notebook/js/codecell'], function(codecell) {\n", - " codecell.CodeCell.options_default.highlight_modes['magic_text/x-fsql'] = {'reg':[/%%fsql/]} ;\n", - " Jupyter.notebook.events.on('kernel_ready.Kernel', function(){\n", - " Jupyter.notebook.get_cells().map(function(cell){\n", - " if (cell.cell_type == 'code'){ cell.auto_highlight(); } }) ;\n", - " });\n", - " });\n" - ], + "application/javascript": "\nrequire([\"codemirror/lib/codemirror\"]);\nfunction set(str) {\n var obj = {}, words = str.split(\" \");\n for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n return obj;\n }\nvar fugue_keywords = \"fill hash rand even presort persist broadcast params process output outtransform rowcount concurrency prepartition zip print title save append parquet csv json single checkpoint weak strong deterministic yield connect sample seed take sub callback dataframe file\";\nCodeMirror.defineMIME(\"text/x-fsql\", {\n name: \"sql\",\n keywords: set(fugue_keywords + \" add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with\"),\n builtin: set(\"date datetime tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat\"),\n atoms: set(\"false true null\"),\n operatorChars: /^[*\\/+\\-%<>!=~&|^]/,\n dateSQL: set(\"time\"),\n support: set(\"ODBCdotTable doubleQuote zerolessFloat\")\n });\n\nCodeMirror.modeInfo.push( {\n name: \"Fugue SQL\",\n mime: \"text/x-fsql\",\n mode: \"sql\"\n } );\n\nrequire(['notebook/js/codecell'], function(codecell) {\n codecell.CodeCell.options_default.highlight_modes['magic_text/x-fsql'] = {'reg':[/%%fsql/]} ;\n Jupyter.notebook.events.on('kernel_ready.Kernel', function(){\n Jupyter.notebook.get_cells().map(function(cell){\n if (cell.cell_type == 'code'){ cell.auto_highlight(); } }) ;\n });\n });\n", "text/plain": [ "" ] @@ -568,7 +536,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.13 (default, Apr 7 2022, 04:56:26) \n[GCC 10.2.1 20210110]" } }, "nbformat": 4,