From 78d2f4ae81adefef42179c04721dd6b4b579bd6e Mon Sep 17 00:00:00 2001 From: minjk-bl Date: Fri, 30 Jun 2023 17:47:16 +0900 Subject: [PATCH 1/8] Edit package manager install code --- visualpython/js/com/component/PackageManager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/visualpython/js/com/component/PackageManager.js b/visualpython/js/com/component/PackageManager.js index f98af4f3..715b932c 100644 --- a/visualpython/js/com/component/PackageManager.js +++ b/visualpython/js/com/component/PackageManager.js @@ -148,7 +148,7 @@ define([ var pipName = that.packageLib[key].pipName; var code = com_util.formatString("!pip uninstall -y {0}", pipName); if (vpConfig.extensionType === 'lite') { - code = com_util.formatString("import piplite\npiplite.uninstall('{0}')", pipName); + code = com_util.formatString("%pip uninstall {0}", pipName); } // create block and run it $('#vp_wrapper').trigger({ @@ -162,7 +162,7 @@ define([ var pipName = that.packageLib[key].pipName; var code = com_util.formatString("!pip install --upgrade {0}", pipName); if (vpConfig.extensionType === 'lite') { - code = com_util.formatString("%pip install --upgrade {0}", pipName); + code = com_util.formatString("%pip install {0}", pipName); } // create block and run it $('#vp_wrapper').trigger({ @@ -269,7 +269,7 @@ define([ var pipName = this.packageLib[this.state.selected].pipName; var code = com_util.formatString("!pip install {0}", pipName); if (vpConfig.extensionType === 'lite') { - code = com_util.formatString("import piplite\npiplite.install('{0}')", pipName); + code = com_util.formatString("%pip install {0}", pipName); } if (versionType === 'specified') { // specified version @@ -277,7 +277,7 @@ define([ if (version && version !== '') { code = com_util.formatString("!pip install {0}=={1}", pipName, version); if (vpConfig.extensionType === 'lite') { - code = com_util.formatString("import piplite\npiplite.install('{0}=={1}')", pipName, version); + code = com_util.formatString("%pip install {0}=={1}", pipName, version); } } else { $(this.wrapSelector('.vp-inner-popup-version')).focus(); From 78ae30e07cd0dbac989d24e1a78c7a6c959234ff Mon Sep 17 00:00:00 2001 From: minjk-bl Date: Fri, 30 Jun 2023 17:48:20 +0900 Subject: [PATCH 2/8] Add installation of preinstall packages for jupyterlite --- visualpython/js/com/com_Config.js | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/visualpython/js/com/com_Config.js b/visualpython/js/com/com_Config.js index f23a1864..cf33bd8c 100644 --- a/visualpython/js/com/com_Config.js +++ b/visualpython/js/com/com_Config.js @@ -296,6 +296,7 @@ define([ * - automatically restart on jupyter kernel restart (loadVisualpython.js) */ readKernelFunction() { + let that = this; // CHROME: change method to load py files ($.get -> require) return new Promise(function(resolve, reject) { var libraryList = [ @@ -314,7 +315,26 @@ define([ libraryList.forEach(libCode => { promiseList.push(vpKernel.execute(libCode, true)); }); - + + if (that.extensionType === 'lite') { + let preInstallCode = ''; + let preInstallPackList = [ + 'seaborn', + 'plotly', + 'scikit-learn', + 'scipy', + 'statsmodels' + ]; + preInstallPackList.forEach((packName, idx) => { + preInstallCode += '%pip install ' + packName + if (idx < preInstallPackList.length - 1) { + preInstallCode += '\n'; + } + }); + // pre-install packages + promiseList.push(vpKernel.execute(preInstallCode, true)); + } + // run all promises let failed = false; Promise.all(promiseList).then(function(resultObj) { @@ -918,7 +938,7 @@ define([ '- Save VP Note before refreshing the page.' ]; com_interface.insertCell('markdown', info.join('\n')); - com_interface.insertCell('code', "import piplite\npiplite.install('jupyterlab-visualpython==" + latestVersion + "')"); + com_interface.insertCell('code', "%pip install jupyterlab-visualpython==" + latestVersion); } // update version_timestamp From 1eef553b6339aa469ff94f0f18ff0ca1bf1fb496 Mon Sep 17 00:00:00 2001 From: minjk-bl Date: Fri, 30 Jun 2023 17:48:39 +0900 Subject: [PATCH 3/8] Edit install code for jupyterlite --- visualpython/js/m_apps/PDF.js | 12 +++++++++--- visualpython/js/m_stats/Anova.js | 18 +++++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/visualpython/js/m_apps/PDF.js b/visualpython/js/m_apps/PDF.js index c4ea125b..e5fdf2ce 100644 --- a/visualpython/js/m_apps/PDF.js +++ b/visualpython/js/m_apps/PDF.js @@ -21,9 +21,9 @@ define([ 'vp_base/js/com/component/FileNavigation' ], function(pdfHtml, pdfCss, com_String, com_interface, PopupComponent, FileNavigation) { - const PDF_SHOW = '!pip show PyMuPDF nltk' - const PDF_INSTALL1 = '!pip install PyMuPDF' - const PDF_INSTALL2 = '!pip install nltk' + var PDF_SHOW = '!pip show PyMuPDF nltk' + var PDF_INSTALL1 = '!pip install PyMuPDF' + var PDF_INSTALL2 = '!pip install nltk' const PDF_IMPORT = `import pandas as pd import fitz @@ -80,6 +80,12 @@ nltk.download('punkt')`; vp_pdfReturn: '', ...this.state } + + if (vpConfig.extensionType === 'lite') { + PDF_SHOW = PDF_SHOW.replace('!', '%'); + PDF_INSTALL1 = PDF_INSTALL1.replace('!', '%'); + PDF_INSTALL2 = PDF_INSTALL2.replace('!', '%'); + } } _bindEvent() { diff --git a/visualpython/js/m_stats/Anova.js b/visualpython/js/m_stats/Anova.js index 9edc8752..191ed0f7 100644 --- a/visualpython/js/m_stats/Anova.js +++ b/visualpython/js/m_stats/Anova.js @@ -252,7 +252,11 @@ define([ } if (tukey === true || scheffe === true || duncan === true) { - codeList.push("!pip install scikit-posthocs"); + if (vpConfig.extensionType === 'lite') { + codeList.push("%pip install scikit-posthocs"); + } else { + codeList.push("!pip install scikit-posthocs"); + } // Post hoc analysis - Tukey if (tukey === true) { @@ -379,7 +383,11 @@ define([ } if (tukey === true || scheffe === true || duncan === true) { // Add installation code - codeList.push("!pip install scikit-posthocs"); + if (vpConfig.extensionType === 'lite') { + codeList.push("%pip install scikit-posthocs"); + } else { + codeList.push("!pip install scikit-posthocs"); + } // Post hoc analysis - Tukey if (tukey === true) { @@ -445,7 +453,11 @@ define([ } // Add installation code : # pip install pingouin - codeList.push("!pip install pingouin"); + if (vpConfig.extensionType === 'lite') { + codeList.push("%pip install pingouin"); + } else { + codeList.push("!pip install pingouin"); + } code.appendLine(); code.appendLine(); From 538a594702859f102af24d6cbdb7968050e00e8e Mon Sep 17 00:00:00 2001 From: minjk-bl Date: Fri, 30 Jun 2023 17:54:16 +0900 Subject: [PATCH 4/8] Add managable packages --- .../js/com/component/PackageManager.js | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/visualpython/js/com/component/PackageManager.js b/visualpython/js/com/component/PackageManager.js index 715b932c..95b7cb5f 100644 --- a/visualpython/js/com/component/PackageManager.js +++ b/visualpython/js/com/component/PackageManager.js @@ -64,6 +64,28 @@ define([ 'PyMuPDF': { pipName: 'PyMuPDF' }, 'sweetviz': { pipName: 'sweetviz' }, } + + if (vpConfig.extensionType === 'lite') { + this.packageLibTemplate = { + 'numpy': { pipName: 'numpy' }, + 'pandas': { pipName: 'pandas' }, + 'matplotlib': { pipName: 'matplotlib' }, + 'seaborn': { pipName: 'seaborn' }, + 'plotly': { pipName: 'plotly' }, + 'sklearn': { pipName: 'scikit-learn' }, + 'scikit-posthocs': { pipName: 'scikit-posthocs' }, + 'scipy': { pipName: 'scipy' }, + 'statsmodels': { pipName: 'statsmodels' }, + 'factor-analyzer': { pipName: 'factor-analyzer' }, + 'category_encoders': { pipName: 'category_encoders' }, + 'imblearn': { pipName: 'imblearn' }, + 'xgboost': { pipName: 'xgboost' }, + 'lightgbm': { pipName: 'lightgbm' }, + 'catboost': { pipName: 'catboost' }, + 'auto-sklearn': { pipName: 'auto-sklearn' }, + 'sweetviz': { pipName: 'sweetviz' }, + } + } } _bindEvent() { From 07bdc58902adfcb0bd57a791a1c139b55566f519 Mon Sep 17 00:00:00 2001 From: minjk-bl Date: Fri, 30 Jun 2023 17:54:40 +0900 Subject: [PATCH 5/8] Add installation code for factor analysis --- visualpython/js/m_stats/FactorAnalysis.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/visualpython/js/m_stats/FactorAnalysis.js b/visualpython/js/m_stats/FactorAnalysis.js index c9bcb1e0..be875252 100644 --- a/visualpython/js/m_stats/FactorAnalysis.js +++ b/visualpython/js/m_stats/FactorAnalysis.js @@ -167,6 +167,13 @@ define([ let codeList = []; let code = new com_String(); + // Add installation code FIXME: + if (vpConfig.extensionType === 'lite') { + codeList.push(that.generateInstallCode().replace('!', '%')); + } else { + codeList.push(that.generateInstallCode()); + } + // data declaration code.appendFormat("vp_df = {0}", data); if (this.columnSelector) { From a8fb13bc86a36bc91cfc21f14a795d2713319284 Mon Sep 17 00:00:00 2001 From: minjk-bl Date: Fri, 30 Jun 2023 17:54:58 +0900 Subject: [PATCH 6/8] add jupyterlite gitignore --- .gitignore | 1 + jupyterlab/.jupyterlite.doit.db | Bin 77824 -> 77824 bytes 2 files changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e05d4c22..396b0deb 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ jupyternotebook/visualpython colab/visualpython test/ .gitignore +visualpython/js/com/com_Config.js diff --git a/jupyterlab/.jupyterlite.doit.db b/jupyterlab/.jupyterlite.doit.db index 54f9b6a899317b18fd7d657cc812fe32421f0600..e60d75e06f12f867f55df5779b882d3f689efe1e 100644 GIT binary patch delta 3801 zcmdT`YitzP72esIU9Y__2k>M4zz-mRY_I3edt4FQ;00X3Hkc$(*WlTmS+E1P!4A-X zDbPyotV98yz&bpFfe;cBsLiN#M3XdXRS|?DL7-`aXaGe8($LaYA_)ab@9fwnhFD7b zuU>g}?%jLO{m!}H`OevNh1zt5+Mb;(*=)A4_}{%_;&%wCzv+Pg2|TjEpcVz9Zgi?(@DSz6;)q{!CxGU-ew_47l(4e(B%i>+D~(&<%Twme?IO zxL5RKl7m=4ZJtcPuS=)E8F3Pkh7MOUnPzWp zZSJJ*6_T^;P_Ql6?nr_M#UjxRVhM7dsiQVeuUarhisnfaSv>^zQw$@IqwX>sa=*408lDUbECK5+-!i;%F z`1$4)s>7K=X4tJ)veSI;&{nU}sIPptZ0Cdu02+|R}$M@m_Tzt$G8yh@n1Gq)yEuTg1aJ()7{V@#y4*(t|(TXp4^C-@-rgBKzS+1G6FBq{~cm-e#{H^Gv+&2#5`nM7xWe($PGzkDCUOy zTSNAm7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yc`QP?xS%%$gX2!a z%gx6~YUfF#a&d)@oJ9HO-|^t6*p+*Ql|i=x`@eiENUecCTquRUZ3d{RjQ Date: Fri, 30 Jun 2023 18:01:28 +0900 Subject: [PATCH 7/8] deploy visualpython 2.4.2 --- build.sh | 4 ++-- colab/build.colab.sh | 4 ++-- colab/manifest.json | 2 +- jupyterlab/build.jupyterlab.sh | 4 ++-- jupyterlab/package-lock.json | 4 ++-- jupyterlab/package.json | 2 +- jupyterlab/pyproject.toml | 4 ++-- jupyternotebook/build.jupyternotebook.sh | 4 ++-- jupyternotebook/setup.py | 2 +- visualpython/js/com/com_Config.js | 2 +- visualpython/js/com/com_Const.js | 2 +- visualpython/js/m_apps/Frame.js | 6 +++--- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/build.sh b/build.sh index 6aa7c9e7..880e30b4 100755 --- a/build.sh +++ b/build.sh @@ -11,8 +11,8 @@ #============================================================================= # Set version and replace it #============================================================================= -VP_ORG_VER=2.4.0 -VP_NEW_VER=2.4.1 +VP_ORG_VER=2.4.1 +VP_NEW_VER=2.4.2 # update version info grep -REil "VP_ORG_VER=.+$" colab/build.colab.sh jupyterlab/build.jupyterlab.sh jupyternotebook/build.jupyternotebook.sh | xargs sed -i "s/VP_ORG_VER=.\+$/VP_ORG_VER=${VP_ORG_VER}/g" diff --git a/colab/build.colab.sh b/colab/build.colab.sh index 0d2949c7..5990fd64 100755 --- a/colab/build.colab.sh +++ b/colab/build.colab.sh @@ -11,8 +11,8 @@ #============================================================================= # Replace Version #============================================================================= -VP_ORG_VER=2.4.0 -VP_NEW_VER=2.4.1 +VP_ORG_VER=2.4.1 +VP_NEW_VER=2.4.2 # update version info # update manifest version with new numbering for new version diff --git a/colab/manifest.json b/colab/manifest.json index 37b5a86b..f4f3d398 100644 --- a/colab/manifest.json +++ b/colab/manifest.json @@ -1,7 +1,7 @@ { "name": "Visual Python for Colab", "description": "GUI-based Python code generator for Google Colab as an extension", - "version": "2.4.1", + "version": "2.4.2", "manifest_version": 3, "icons": { "48": "icon.png", diff --git a/jupyterlab/build.jupyterlab.sh b/jupyterlab/build.jupyterlab.sh index 3b56420d..37eafb8e 100755 --- a/jupyterlab/build.jupyterlab.sh +++ b/jupyterlab/build.jupyterlab.sh @@ -11,8 +11,8 @@ #============================================================================= # Replace Version and Basic Files #============================================================================= -VP_ORG_VER=2.4.0 -VP_NEW_VER=2.4.1 +VP_ORG_VER=2.4.1 +VP_NEW_VER=2.4.2 # update version info grep -REil "\"version\": \"${VP_ORG_VER}\"" package.json | xargs sed -i "s/\"version\": \"${VP_ORG_VER//\./\\.}\"/\"version\": \"${VP_NEW_VER}\"/g" diff --git a/jupyterlab/package-lock.json b/jupyterlab/package-lock.json index 99412829..75071913 100644 --- a/jupyterlab/package-lock.json +++ b/jupyterlab/package-lock.json @@ -1,12 +1,12 @@ { "name": "jupyterlab-visualpython", - "version": "2.4.0", + "version": "2.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "jupyterlab-visualpython", - "version": "2.4.0", + "version": "2.4.1", "license": "GPLv3 with Visual Python special exception", "dependencies": { "@jupyterlab/cells": "^3.5.2", diff --git a/jupyterlab/package.json b/jupyterlab/package.json index 8c9823ac..8e5db399 100644 --- a/jupyterlab/package.json +++ b/jupyterlab/package.json @@ -1,6 +1,6 @@ { "name": "jupyterlab-visualpython", - "version": "2.4.1", + "version": "2.4.2", "description": "GUI-based Python code generator for Jupyter Lab as an extension", "keywords": [ "jupyter", diff --git a/jupyterlab/pyproject.toml b/jupyterlab/pyproject.toml index df58b53e..fa483d89 100644 --- a/jupyterlab/pyproject.toml +++ b/jupyterlab/pyproject.toml @@ -32,7 +32,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", ] -version = "2.4.1" +version = "2.4.2" [project.license] file = "LICENSE" @@ -92,7 +92,7 @@ file = [ ] [tool.tbump.version] -current = "2.4.1" +current = "2.4.2" regex = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)((?Pa|b|rc|.dev)(?P\\d+))?" [tool.tbump.git] diff --git a/jupyternotebook/build.jupyternotebook.sh b/jupyternotebook/build.jupyternotebook.sh index abd06aac..de423608 100755 --- a/jupyternotebook/build.jupyternotebook.sh +++ b/jupyternotebook/build.jupyternotebook.sh @@ -11,8 +11,8 @@ #============================================================================= # Replace Version and Basic Files #============================================================================= -VP_ORG_VER=2.4.0 -VP_NEW_VER=2.4.1 +VP_ORG_VER=2.4.1 +VP_NEW_VER=2.4.2 # update version info grep -REil ${VP_ORG_VER//\./\\.} setup.py visualpython/js/com/com_Config.js visualpython/js/com/com_Const.js | xargs sed -i --follow-symlinks "s/${VP_ORG_VER//\./\\.}/${VP_NEW_VER}/g" diff --git a/jupyternotebook/setup.py b/jupyternotebook/setup.py index bacaaf07..8ca9a97b 100644 --- a/jupyternotebook/setup.py +++ b/jupyternotebook/setup.py @@ -10,7 +10,7 @@ setup( name = name, - version = '2.4.1', + version = '2.4.2', packages = find_packages(), package_data = {"": ["*"], 'visualpython' : ['visualpython.yaml', 'README.md']}, scripts = ['visualpython/bin/visualpy', 'visualpython/bin/visualpy.bat'], diff --git a/visualpython/js/com/com_Config.js b/visualpython/js/com/com_Config.js index cf33bd8c..83593af3 100644 --- a/visualpython/js/com/com_Config.js +++ b/visualpython/js/com/com_Config.js @@ -1011,7 +1011,7 @@ define([ /** * Version */ - Config.version = "2.4.1"; + Config.version = "2.4.2"; /** * Type of mode diff --git a/visualpython/js/com/com_Const.js b/visualpython/js/com/com_Const.js index 639a58ce..8a1a3037 100644 --- a/visualpython/js/com/com_Const.js +++ b/visualpython/js/com/com_Const.js @@ -19,7 +19,7 @@ define ([ class Constants { } Constants.TOOLBAR_BTN_INFO = { - HELP: "Visual Python 2.4.1" + HELP: "Visual Python 2.4.2" , ICON: "vp-main-icon" , ID: "vpBtnToggle" , NAME: "toggle-vp" diff --git a/visualpython/js/m_apps/Frame.js b/visualpython/js/m_apps/Frame.js index 0bff2c10..e3b82b21 100644 --- a/visualpython/js/m_apps/Frame.js +++ b/visualpython/js/m_apps/Frame.js @@ -240,7 +240,7 @@ define([ that.setPreview(that.getCurrentCode()); }); - // menu on column (Deprecated on v2.3.6 - Temporarily Show on v.2.4.1) + // menu on column (Deprecated on v2.3.6 - Temporarily Show on v.2.4.2) $(document).on('contextmenu', this.wrapSelector('.' + VP_FE_TABLE + ' .' + VP_FE_TABLE_COLUMN), function(event) { event.preventDefault(); @@ -270,7 +270,7 @@ define([ that.showMenu(thisPos.left, thisPos.top + thisRect.height); }); - // menu on row (Deprecated on v2.3.6 - Temporarily Show on v.2.4.1) + // menu on row (Deprecated on v2.3.6 - Temporarily Show on v.2.4.2) $(document).on('contextmenu', this.wrapSelector('.' + VP_FE_TABLE + ' .' + VP_FE_TABLE_ROW), function(event) { event.preventDefault(); var idx = $(that.wrapSelector('.' + VP_FE_TABLE_ROW)).index(this); // 0 ~ n @@ -595,7 +595,7 @@ define([ that.loadCode(that.getTypeCode(FRAME_EDIT_TYPE.SHOW), true); }); - // click toolbar item (Deprecated on v2.3.6 - Temporarily Show on v.2.4.1) + // click toolbar item (Deprecated on v2.3.6 - Temporarily Show on v.2.4.2) $(document).on('click', this.wrapSelector('.vp-fe-toolbar-item'), function(evt) { evt.stopPropagation(); var itemType = $(this).data('type'); From 939c523b88dcea70e9a6628c37d2d3b3f70cc8ad Mon Sep 17 00:00:00 2001 From: visualpython Date: Fri, 30 Jun 2023 18:33:02 +0900 Subject: [PATCH 8/8] deploy visualpython 2.4.3 --- build.sh | 4 ++-- colab/build.colab.sh | 4 ++-- colab/manifest.json | 2 +- jupyterlab/build.jupyterlab.sh | 4 ++-- jupyterlab/package-lock.json | 4 ++-- jupyterlab/package.json | 2 +- jupyterlab/pyproject.toml | 4 ++-- jupyternotebook/build.jupyternotebook.sh | 4 ++-- jupyternotebook/setup.py | 2 +- visualpython/js/com/com_Config.js | 2 +- visualpython/js/com/com_Const.js | 2 +- visualpython/js/com/com_interface.js | 2 +- visualpython/js/m_apps/Frame.js | 6 +++--- visualpython/js/m_stats/FactorAnalysis.js | 4 ++-- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/build.sh b/build.sh index 880e30b4..d71b2bc5 100755 --- a/build.sh +++ b/build.sh @@ -11,8 +11,8 @@ #============================================================================= # Set version and replace it #============================================================================= -VP_ORG_VER=2.4.1 -VP_NEW_VER=2.4.2 +VP_ORG_VER=2.4.2 +VP_NEW_VER=2.4.3 # update version info grep -REil "VP_ORG_VER=.+$" colab/build.colab.sh jupyterlab/build.jupyterlab.sh jupyternotebook/build.jupyternotebook.sh | xargs sed -i "s/VP_ORG_VER=.\+$/VP_ORG_VER=${VP_ORG_VER}/g" diff --git a/colab/build.colab.sh b/colab/build.colab.sh index 5990fd64..57471d46 100755 --- a/colab/build.colab.sh +++ b/colab/build.colab.sh @@ -11,8 +11,8 @@ #============================================================================= # Replace Version #============================================================================= -VP_ORG_VER=2.4.1 -VP_NEW_VER=2.4.2 +VP_ORG_VER=2.4.2 +VP_NEW_VER=2.4.3 # update version info # update manifest version with new numbering for new version diff --git a/colab/manifest.json b/colab/manifest.json index f4f3d398..dcbc487d 100644 --- a/colab/manifest.json +++ b/colab/manifest.json @@ -1,7 +1,7 @@ { "name": "Visual Python for Colab", "description": "GUI-based Python code generator for Google Colab as an extension", - "version": "2.4.2", + "version": "2.4.3", "manifest_version": 3, "icons": { "48": "icon.png", diff --git a/jupyterlab/build.jupyterlab.sh b/jupyterlab/build.jupyterlab.sh index 37eafb8e..a477fb99 100755 --- a/jupyterlab/build.jupyterlab.sh +++ b/jupyterlab/build.jupyterlab.sh @@ -11,8 +11,8 @@ #============================================================================= # Replace Version and Basic Files #============================================================================= -VP_ORG_VER=2.4.1 -VP_NEW_VER=2.4.2 +VP_ORG_VER=2.4.2 +VP_NEW_VER=2.4.3 # update version info grep -REil "\"version\": \"${VP_ORG_VER}\"" package.json | xargs sed -i "s/\"version\": \"${VP_ORG_VER//\./\\.}\"/\"version\": \"${VP_NEW_VER}\"/g" diff --git a/jupyterlab/package-lock.json b/jupyterlab/package-lock.json index 75071913..899cf924 100644 --- a/jupyterlab/package-lock.json +++ b/jupyterlab/package-lock.json @@ -1,12 +1,12 @@ { "name": "jupyterlab-visualpython", - "version": "2.4.1", + "version": "2.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "jupyterlab-visualpython", - "version": "2.4.1", + "version": "2.4.2", "license": "GPLv3 with Visual Python special exception", "dependencies": { "@jupyterlab/cells": "^3.5.2", diff --git a/jupyterlab/package.json b/jupyterlab/package.json index 8e5db399..be5d17d1 100644 --- a/jupyterlab/package.json +++ b/jupyterlab/package.json @@ -1,6 +1,6 @@ { "name": "jupyterlab-visualpython", - "version": "2.4.2", + "version": "2.4.3", "description": "GUI-based Python code generator for Jupyter Lab as an extension", "keywords": [ "jupyter", diff --git a/jupyterlab/pyproject.toml b/jupyterlab/pyproject.toml index fa483d89..865e3110 100644 --- a/jupyterlab/pyproject.toml +++ b/jupyterlab/pyproject.toml @@ -32,7 +32,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", ] -version = "2.4.2" +version = "2.4.3" [project.license] file = "LICENSE" @@ -92,7 +92,7 @@ file = [ ] [tool.tbump.version] -current = "2.4.2" +current = "2.4.3" regex = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)((?Pa|b|rc|.dev)(?P\\d+))?" [tool.tbump.git] diff --git a/jupyternotebook/build.jupyternotebook.sh b/jupyternotebook/build.jupyternotebook.sh index de423608..5c52d21d 100755 --- a/jupyternotebook/build.jupyternotebook.sh +++ b/jupyternotebook/build.jupyternotebook.sh @@ -11,8 +11,8 @@ #============================================================================= # Replace Version and Basic Files #============================================================================= -VP_ORG_VER=2.4.1 -VP_NEW_VER=2.4.2 +VP_ORG_VER=2.4.2 +VP_NEW_VER=2.4.3 # update version info grep -REil ${VP_ORG_VER//\./\\.} setup.py visualpython/js/com/com_Config.js visualpython/js/com/com_Const.js | xargs sed -i --follow-symlinks "s/${VP_ORG_VER//\./\\.}/${VP_NEW_VER}/g" diff --git a/jupyternotebook/setup.py b/jupyternotebook/setup.py index 8ca9a97b..cd492f04 100644 --- a/jupyternotebook/setup.py +++ b/jupyternotebook/setup.py @@ -10,7 +10,7 @@ setup( name = name, - version = '2.4.2', + version = '2.4.3', packages = find_packages(), package_data = {"": ["*"], 'visualpython' : ['visualpython.yaml', 'README.md']}, scripts = ['visualpython/bin/visualpy', 'visualpython/bin/visualpy.bat'], diff --git a/visualpython/js/com/com_Config.js b/visualpython/js/com/com_Config.js index 83593af3..09825978 100644 --- a/visualpython/js/com/com_Config.js +++ b/visualpython/js/com/com_Config.js @@ -1011,7 +1011,7 @@ define([ /** * Version */ - Config.version = "2.4.2"; + Config.version = "2.4.3"; /** * Type of mode diff --git a/visualpython/js/com/com_Const.js b/visualpython/js/com/com_Const.js index 8a1a3037..7a936711 100644 --- a/visualpython/js/com/com_Const.js +++ b/visualpython/js/com/com_Const.js @@ -19,7 +19,7 @@ define ([ class Constants { } Constants.TOOLBAR_BTN_INFO = { - HELP: "Visual Python 2.4.2" + HELP: "Visual Python 2.4.3" , ICON: "vp-main-icon" , ID: "vpBtnToggle" , NAME: "toggle-vp" diff --git a/visualpython/js/com/com_interface.js b/visualpython/js/com/com_interface.js index 7742a29c..5a80ca98 100644 --- a/visualpython/js/com/com_interface.js +++ b/visualpython/js/com/com_interface.js @@ -240,7 +240,7 @@ define([ }, 300); } } - } else if (vpConfig.extensionType === 'lab') { + } else if (vpConfig.extensionType === 'lab' || vpConfig.extensionType === 'lite') { if (notebookPanel && notebookPanel.sessionContext){ var sessionContext = notebookPanel.sessionContext; let sessionType = sessionContext.type; diff --git a/visualpython/js/m_apps/Frame.js b/visualpython/js/m_apps/Frame.js index e3b82b21..a07f7299 100644 --- a/visualpython/js/m_apps/Frame.js +++ b/visualpython/js/m_apps/Frame.js @@ -240,7 +240,7 @@ define([ that.setPreview(that.getCurrentCode()); }); - // menu on column (Deprecated on v2.3.6 - Temporarily Show on v.2.4.2) + // menu on column (Deprecated on v2.3.6 - Temporarily Show on v.2.4.3) $(document).on('contextmenu', this.wrapSelector('.' + VP_FE_TABLE + ' .' + VP_FE_TABLE_COLUMN), function(event) { event.preventDefault(); @@ -270,7 +270,7 @@ define([ that.showMenu(thisPos.left, thisPos.top + thisRect.height); }); - // menu on row (Deprecated on v2.3.6 - Temporarily Show on v.2.4.2) + // menu on row (Deprecated on v2.3.6 - Temporarily Show on v.2.4.3) $(document).on('contextmenu', this.wrapSelector('.' + VP_FE_TABLE + ' .' + VP_FE_TABLE_ROW), function(event) { event.preventDefault(); var idx = $(that.wrapSelector('.' + VP_FE_TABLE_ROW)).index(this); // 0 ~ n @@ -595,7 +595,7 @@ define([ that.loadCode(that.getTypeCode(FRAME_EDIT_TYPE.SHOW), true); }); - // click toolbar item (Deprecated on v2.3.6 - Temporarily Show on v.2.4.2) + // click toolbar item (Deprecated on v2.3.6 - Temporarily Show on v.2.4.3) $(document).on('click', this.wrapSelector('.vp-fe-toolbar-item'), function(evt) { evt.stopPropagation(); var itemType = $(this).data('type'); diff --git a/visualpython/js/m_stats/FactorAnalysis.js b/visualpython/js/m_stats/FactorAnalysis.js index be875252..45b26abf 100644 --- a/visualpython/js/m_stats/FactorAnalysis.js +++ b/visualpython/js/m_stats/FactorAnalysis.js @@ -169,9 +169,9 @@ define([ // Add installation code FIXME: if (vpConfig.extensionType === 'lite') { - codeList.push(that.generateInstallCode().replace('!', '%')); + codeList.push('%pip install factor-analyzer'); } else { - codeList.push(that.generateInstallCode()); + codeList.push('!pip install factor-analyzer'); } // data declaration