Skip to content

Release v3.0.0 #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 44 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[lite]: https://visualpython.github.io/visualpython-lite/lab/index.html

## Introduction
Visual Python is a GUI-based Python code generator, developed on the **Jupyter Lab**, **Jupyter Notebook** and **Google Colab** as an extension. <br>
Visual Python is a GUI-based Python code generator, developed on the **[Jupyter Lab](#getting-started-with-jupyter-lab)**, **[Jupyter Notebook](#getting-started-with-jupyter-notebook-7x)** and **[Google Colab](#getting-started-with-google-colab)** as an extension. You can also simply use Visual Python using **[Visual Python Desktop](#getting-started-with-visual-python-desktop)**.<br>
Visual Python is an open source project started for students who struggle with coding during Python classes for data science.

<br>
Expand All @@ -30,26 +30,49 @@ Try Visual Python if you would like to: <br>

Visual Python is an extension to Jupyter Lab, so you must have Jupyter Lab installed already.<br>
- Python version 3.x
- Jupyter lab environment(<= 3.6.3)
- Jupyter lab environment

### 2. How to Install

**1) Install package from PyPI**
```
pip install jupyterlab-visualpython
```
- If you are using **Jupyter Lab version <= 3.x.x**, please install `jupyterlab-visualpython==2.5.0`
```
pip install jupyterlab-visualpython==2.5.0
```

**2) Activate Visual Python on Jupyter Lab**

Click orange square button on the right side of the Jupyter Lab.
Click orange square button on the right side of Jupyter Lab.

## Getting Started with Jupyter Notebook
## Getting Started with Jupyter Notebook(>= 7.x)

### 1. Requirements

Visual Python is an extension to Jupyter Notebook, so you must have Jupyter Notebook installed already.<br>
Visual Python is an extension to Jupyter Notebook, so you must have Jupyter Notebook installed already. You need latest version of Jupyter Notebook over version 7.x.x.<br>
- Python version 3.x
- Jupyter notebook environment
- Jupyter notebook environment >= 7.x

### 2. How to Install

**1) Install package from PyPI**
```
pip install jupyterlab-visualpython
```

**2) Activate Visual Python on Jupyter Notebook**

Click orange square button on the toolbar of Jupyter Notebook.

## Getting Started with Jupyter Notebook(<=6.x.x)

### 1. Requirements

Visual Python is an extension to Jupyter Notebook, so you must have Jupyter Notebook installed already. You need old version of Jupyter Notebook under version 6.x.x.<br>
- Python version 3.x
- Jupyter notebook environment <=6.x

### 2. How to Install

Expand All @@ -65,7 +88,7 @@ visualpy install

**3) Activate Visual Python on Jupyter Notebook**

Click orange square button on the right side of the Jupyter Notebook menu bar.
Click orange square button on the toolbar of Jupyter Notebook.

### 3. Package Control Info
* Usage: visualpy **[option]** <br>
Expand Down Expand Up @@ -108,8 +131,8 @@ It simplifies the process of configuring an independent Python environment, inst
- Minimum 10GB of disk space

### 3. How to Install
1) Download the Visual Python Desktop installer.
- [Link to Visual Python Desktop installer page](https://visualpython.ai/visualpython-desktop)
1) Download Visual Python Desktop installer from homepage.
- [Link to Visual Python Desktop installer page](https://visualpython.ai/visualpython-desktop)

2) Run the installer and follow the provided instructions for the installation process.

Expand All @@ -122,6 +145,18 @@ All skills from programmers, non-programmers, designers are welcomed.
* Programming Guide: [Developer Documentation](https://bird-energy-733.notion.site/visualpython-docs-85c0274ff7564747bb8e8d77909fc8b7)
* GUI Design Guide: [Visual Python GUI Kit 1.0](https://www.figma.com/community/file/976035035360380841)

### Maintainers & Contributors
[<a href="https://github.com/visualpython" title="Visual Python official"><img src="https://github.com/visualpython.png" width="50px;"/></a>](https://github.com/visualpython)
[<a href="https://github.com/leeraejung" title="Raejung Lee"><img src="https://github.com/leeraejung.png" width="50px;"/></a>](https://github.com/leeraejung)
[<a href="https://github.com/minjk-bl" title="Minju Kim"><img src="https://github.com/minjk-bl.png" width="50px;"/></a>](https://github.com/minjk-bl)
[<a href="https://github.com/llbtl" title="Hyewon Kang"><img src="https://github.com/llbtl.png" width="50px;"/></a>](https://github.com/llbtl)
[<a href="https://github.com/blacklogicdev" title="Black Logic Dev"><img src="https://github.com/blacklogicdev.png" width="50px;"/></a>](https://github.com/blacklogicdev)
[<a href="https://github.com/Minku-Koo" title="Minku Koo"><img src="https://github.com/Minku-Koo.png" width="50px;"/></a>](https://github.com/Minku-Koo)

Whoever wants to contribute or join our community, <br/>
You can contact us by creating issues on [Issue page](https://github.com/visualpython/visualpython/issues) or using [Discord server](https://discord.gg/PypQrBZWZv).


## License
GNU GPLv3 with Visual Python special exception (See LICENSE file).

Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#=============================================================================
# Set version and replace it
#=============================================================================
VP_ORG_VER=2.4.9
VP_NEW_VER=2.5.0
VP_ORG_VER=2.5.0
VP_NEW_VER=3.0.0

# 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"
Expand Down
4 changes: 2 additions & 2 deletions colab/build.colab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#=============================================================================
# Replace Version
#=============================================================================
VP_ORG_VER=2.4.9
VP_NEW_VER=2.5.0
VP_ORG_VER=2.5.0
VP_NEW_VER=3.0.0

# update version info
# update manifest version with new numbering for new version
Expand Down
2 changes: 1 addition & 1 deletion colab/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Visual Python for Colab",
"description": "GUI-based Python code generator for Google Colab as an extension",
"version": "2.5.0",
"version": "3.0.0",
"manifest_version": 3,
"icons": {
"48": "icon.png",
Expand Down
10 changes: 10 additions & 0 deletions jupyterlab/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
*.bundle.*
node_modules/
*.log
.eslintcache
.stylelintcache
*.egg-info/
.ipynb_checkpoints
*.tsbuildinfo
visualpython/labextension
jupyterlab-visualpython/labextension
# Version file is handled by hatchling
jupyterlab-visualpython/_version.py

# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python
Expand Down Expand Up @@ -54,6 +60,7 @@ htmlcov/
.coverage.*
.cache
nosetests.xml
coverage/
coverage.xml
*.cover
.hypothesis/
Expand Down Expand Up @@ -108,3 +115,6 @@ dmypy.json

# OSX files
.DS_Store

# Yarn cache
.yarn/
1 change: 1 addition & 0 deletions jupyterlab/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
53 changes: 44 additions & 9 deletions jupyterlab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[lite]: https://visualpython.github.io/visualpython-lite/lab/index.html

## Introduction
Visual Python is a GUI-based Python code generator, developed on the **Jupyter Lab**, **Jupyter Notebook** and **Google Colab** as an extension. <br>
Visual Python is a GUI-based Python code generator, developed on the **[Jupyter Lab](#getting-started-with-jupyter-lab)**, **[Jupyter Notebook](#getting-started-with-jupyter-notebook-7x)** and **[Google Colab](#getting-started-with-google-colab)** as an extension. You can also simply use Visual Python using **[Visual Python Desktop](#getting-started-with-visual-python-desktop)**.<br>
Visual Python is an open source project started for students who struggle with coding during Python classes for data science.

<br>
Expand All @@ -30,26 +30,49 @@ Try Visual Python if you would like to: <br>

Visual Python is an extension to Jupyter Lab, so you must have Jupyter Lab installed already.<br>
- Python version 3.x
- Jupyter lab environment(<= 3.6.3)
- Jupyter lab environment

### 2. How to Install

**1) Install package from PyPI**
```
pip install jupyterlab-visualpython
```
- If you are using **Jupyter Lab version <= 3.x.x**, please install `jupyterlab-visualpython==2.5.0`
```
pip install jupyterlab-visualpython==2.5.0
```

**2) Activate Visual Python on Jupyter Lab**

Click orange square button on the right side of the Jupyter Lab.
Click orange square button on the right side of Jupyter Lab.

## Getting Started with Jupyter Notebook
## Getting Started with Jupyter Notebook(>= 7.x)

### 1. Requirements

Visual Python is an extension to Jupyter Notebook, so you must have Jupyter Notebook installed already.<br>
Visual Python is an extension to Jupyter Notebook, so you must have Jupyter Notebook installed already. You need latest version of Jupyter Notebook over version 7.x.x.<br>
- Python version 3.x
- Jupyter notebook environment
- Jupyter notebook environment >= 7.x

### 2. How to Install

**1) Install package from PyPI**
```
pip install jupyterlab-visualpython
```

**2) Activate Visual Python on Jupyter Notebook**

Click orange square button on the toolbar of Jupyter Notebook.

## Getting Started with Jupyter Notebook(<=6.x.x)

### 1. Requirements

Visual Python is an extension to Jupyter Notebook, so you must have Jupyter Notebook installed already. You need old version of Jupyter Notebook under version 6.x.x.<br>
- Python version 3.x
- Jupyter notebook environment <=6.x

### 2. How to Install

Expand All @@ -65,7 +88,7 @@ visualpy install

**3) Activate Visual Python on Jupyter Notebook**

Click orange square button on the right side of the Jupyter Notebook menu bar.
Click orange square button on the toolbar of Jupyter Notebook.

### 3. Package Control Info
* Usage: visualpy **[option]** <br>
Expand Down Expand Up @@ -108,8 +131,8 @@ It simplifies the process of configuring an independent Python environment, inst
- Minimum 10GB of disk space

### 3. How to Install
1) Download the Visual Python Desktop installer.
- [Link to Visual Python Desktop installer page](https://visualpython.ai/visualpython-desktop)
1) Download Visual Python Desktop installer from homepage.
- [Link to Visual Python Desktop installer page](https://visualpython.ai/visualpython-desktop)

2) Run the installer and follow the provided instructions for the installation process.

Expand All @@ -122,6 +145,18 @@ All skills from programmers, non-programmers, designers are welcomed.
* Programming Guide: [Developer Documentation](https://bird-energy-733.notion.site/visualpython-docs-85c0274ff7564747bb8e8d77909fc8b7)
* GUI Design Guide: [Visual Python GUI Kit 1.0](https://www.figma.com/community/file/976035035360380841)

### Maintainers & Contributors
[<a href="https://github.com/visualpython" title="Visual Python official"><img src="https://github.com/visualpython.png" width="50px;"/></a>](https://github.com/visualpython)
[<a href="https://github.com/leeraejung" title="Raejung Lee"><img src="https://github.com/leeraejung.png" width="50px;"/></a>](https://github.com/leeraejung)
[<a href="https://github.com/minjk-bl" title="Minju Kim"><img src="https://github.com/minjk-bl.png" width="50px;"/></a>](https://github.com/minjk-bl)
[<a href="https://github.com/llbtl" title="Hyewon Kang"><img src="https://github.com/llbtl.png" width="50px;"/></a>](https://github.com/llbtl)
[<a href="https://github.com/blacklogicdev" title="Black Logic Dev"><img src="https://github.com/blacklogicdev.png" width="50px;"/></a>](https://github.com/blacklogicdev)
[<a href="https://github.com/Minku-Koo" title="Minku Koo"><img src="https://github.com/Minku-Koo.png" width="50px;"/></a>](https://github.com/Minku-Koo)

Whoever wants to contribute or join our community, <br/>
You can contact us by creating issues on [Issue page](https://github.com/visualpython/visualpython/issues) or using [Discord server](https://discord.gg/PypQrBZWZv).


## License
GNU GPLv3 with Visual Python special exception (See LICENSE file).

Expand Down
5 changes: 3 additions & 2 deletions jupyterlab/binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
""" perform a development install of visualpython
""" perform a development install of jupyterlab-visualpython

On Binder, this will run _after_ the environment has been fully created from
the environment.yml in this directory.
Expand Down Expand Up @@ -31,6 +31,7 @@ _(sys.executable, "-m", "pip", "check")

# install the labextension
_(sys.executable, "-m", "pip", "install", "-e", ".")
_(sys.executable, "-m", "jupyter", "labextension", "develop", "--overwrite", ".")

# verify the environment the extension didn't break anything
_(sys.executable, "-m", "pip", "check")
Expand All @@ -42,5 +43,5 @@ _("jupyter", "server", "extension", "list")
_("jupyter", "labextension", "list")


print("JupyterLab with visualpython is ready to run with:\n")
print("JupyterLab with jupyterlab-visualpython is ready to run with:\n")
print("\tjupyter lab\n")
4 changes: 2 additions & 2 deletions jupyterlab/build.jupyterlab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#=============================================================================
# Replace Version and Basic Files
#=============================================================================
VP_ORG_VER=2.4.9
VP_NEW_VER=2.5.0
VP_ORG_VER=2.5.0
VP_NEW_VER=3.0.0

# update version info
grep -REil "\"version\": \"${VP_ORG_VER}\"" package.json | xargs sed -i "s/\"version\": \"${VP_ORG_VER//\./\\.}\"/\"version\": \"${VP_NEW_VER}\"/g"
Expand Down
8 changes: 4 additions & 4 deletions jupyterlab/lib/VpPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define([
'jquery-ui',
'jquery-ui-css',
'codemirror/lib/codemirror',
// __VP_CSS_LOADER__('codemirror/lib/codemirror'), // INTEGRATION: unified version of css loader
'vp_base/lib/codemirror/lib/codemirror.css', // INTEGRATION: unified version of css loader
'vp_base/js/loadVisualpython',
'vp_base/js/com/com_Config'
], function(
Expand All @@ -17,7 +17,7 @@ define([
text, css, $,
ui, uiCss,
codemirror,
// cmCss,
cmCss,
loadVisualpython, com_Config) {

const {
Expand All @@ -41,9 +41,9 @@ define([
this.app = app;
this.vpFrame = loadVisualpython.initVisualpython();

this.id = 'visualpython_vpPanel';
this.id = 'jupyterlab-visualpython:panel';
// LabIcon with svg : @jupyterlab/ui-components/lib/icon/labicon.js
this.title.icon = new LabIcon({ name: 'visualpython:toggle', svgstr: vpIcon.default });
this.title.icon = new LabIcon({ name: 'jupyterlab-visualpython:toggle-icon', svgstr: vpIcon });
this.title.caption = 'Visual Python';

// register node using jquery to element
Expand Down
34 changes: 32 additions & 2 deletions jupyterlab/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ global.__VP_RAW_LOADER__ = function(path) {
return path;
}

const vpId = 'jupyterlab-visualpython:plugin';

const { ICommandPalette } = require('@jupyterlab/apputils');

global.$ = $;
global.vpBase = path.resolve(__dirname, "lib") + '/';
module.exports = [{
id: 'visualpython:entry',
id: vpId,
autoStart: true,
activate: function (app) {
requires: [ICommandPalette],
activate: function (app, palette) {
console.log(
'JupyterLab extension visualpython is activated!'
);
Expand All @@ -35,5 +40,30 @@ module.exports = [{
// Add vp to the right area:
var vpPanel = new VpPanel(app);
app.shell.add(vpPanel, 'right', { rank: 900, type: 'Visual Python' });

// Add toggle button
let isVpVisible = app.name !== 'JupyterLab'; // compatible for notebook 7.x (hidden for jupyterlab)
let toggleCommand = 'jupyterlab-visualpython:toggle-panel';
let vpLabel = isVpVisible?'Toggle Visual Python':'';
app.commands.addCommand(toggleCommand, {
isEnabled: () => isVpVisible,
isVisible: () => isVpVisible,
iconClass: 'jp-vp-icon',
iconLabel: vpLabel,
execute: () => {
if (app.shell.rightCollapsed === true || $('#vp_wrapper').is(':visible') === false) {
app.shell.activateById('vp_wrapper');
} else {
app.shell.collapseRight();
}
}
});

// Add command palette
palette.addItem({
command: toggleCommand,
category: 'Visual Python',
label: 'Toggle Visual Python'
});
}
}];
Loading