Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d843521
Refactor app references to use ipylab.App() instead of ipylab.app acr…
fleming79 Mar 16, 2025
8f703da
Remove TODO comments from log_viewer, menu, and shell modules
fleming79 Mar 16, 2025
af90239
Update ruff pre-commit hook to version 0.11.0
fleming79 Mar 16, 2025
b1f1102
Update ruff_defaults.toml to modify selected rules for improved linting
fleming79 Mar 16, 2025
9a87295
Enhance Ipylab class docstring to provide detailed attribute descript…
fleming79 Mar 16, 2025
72247c3
Refactor imports in __init__.py to include common module and update _…
fleming79 Mar 16, 2025
9c6ef97
Refactor initialization checks in CSSStyleSheet and Menu classes for …
fleming79 Mar 16, 2025
3f8a7f0
Add autostart_once hook for initial app readiness and update autostar…
fleming79 Mar 16, 2025
055227f
Enhance Singular class to allow None as a key for instance creation. …
fleming79 Mar 16, 2025
37478a0
Refactor Fixed usage in menu and widget classes to utilize lambda fun…
fleming79 Mar 17, 2025
c407783
Update VS Code settings and README for Pyright integration; adjust ty…
fleming79 Mar 17, 2025
064f804
Add docstring to Fixed descriptor class for improved clarity and usag…
fleming79 Mar 17, 2025
51b81db
Clarify error message for forbidden attribute setting in Fixed class
fleming79 Mar 17, 2025
8cb9d70
Refactor Fixed for faster loading.
fleming79 Mar 18, 2025
32fd503
Add Fixed to module exports for improved accessibility
fleming79 Mar 18, 2025
15b4255
Remove unused ready hook specification and related callback execution…
fleming79 Mar 20, 2025
8900681
Refactor readiness handling in Ipylab class to use for futures instea…
fleming79 Mar 20, 2025
9fc0051
Remove default_editor_key_bindings hook and clean up related code in …
fleming79 Mar 20, 2025
28b5d4d
Improve logging format in Ipylab class for better clarity during exce…
fleming79 Mar 20, 2025
bc8b1e9
Update Python version in conda environment setup to 3.12
fleming79 Mar 21, 2025
1baaed8
Mark App as final.
fleming79 Mar 27, 2025
c690e10
Fix type hint in Fixed class __get__ method for better clarity
fleming79 Mar 27, 2025
2d6531d
Make threadsafe
fleming79 Apr 2, 2025
a4fd53e
temp
fleming79 Apr 2, 2025
df462c2
Asyncio loop in app
fleming79 Apr 2, 2025
48045a2
Make most functions async instead of tasks. Make anyio compatible and…
fleming79 Apr 6, 2025
94b79cf
Update pre-commit hook versions
fleming79 Apr 6, 2025
09cd99e
Update README and pyproject.toml to simplify installation and remove …
fleming79 Apr 6, 2025
1edc755
Refactor CSSStyleSheet to update css_rules using set_trait and improv…
fleming79 Apr 6, 2025
6cd8fde
Reinstate support for Python 3.11 iaw. https://numpy.org/neps/nep-002…
fleming79 Apr 7, 2025
13dc861
Update example notebooks to for async function calls
fleming79 Apr 7, 2025
75b492d
Make on_ready a historic type callback. Plus a few minor bugfixes.
fleming79 Apr 8, 2025
1c6e205
Enhance method documentation for Ipylab class, adding detailed docstr…
fleming79 Apr 8, 2025
3c47745
Refactor LogViewer and widgets to introduce AddToShellType for improv…
fleming79 Apr 8, 2025
13ebc4d
Improve error reporting when evaluating code in another shell.
fleming79 Apr 9, 2025
c6f720f
Refactor expression evaluation in App class to use compile for better…
fleming79 Apr 9, 2025
a5b7711
Add type annotation for module_version in _frontend.py; remove unused…
fleming79 Apr 9, 2025
aa0292d
Add module_obj_to_import_string function for converting module object…
fleming79 Apr 9, 2025
1039df4
ShellConnection activate will now expand the sidebar if the widget is…
fleming79 Apr 10, 2025
a28da7e
Uses shell connection for activate when adding to the shell instead o…
fleming79 Apr 10, 2025
7b511ec
Add open_somewhere methods to RankedMenu
fleming79 Apr 11, 2025
ac2b872
RankedMenu - add extra close_with_self features for better removal of…
fleming79 Apr 11, 2025
e582200
Split out useful functionality from Ipylab into HasApp.
fleming79 Apr 12, 2025
380a27e
Shell.add will now close a launcher if it is the active widget when a…
fleming79 Apr 12, 2025
ebd7547
Add singular attribute for Singular to enable tracking of the instanc…
fleming79 Apr 17, 2025
1c72061
Enhance pack function to handle class objects and improve error messa…
fleming79 Apr 18, 2025
2ce1182
Rename `_single_instances` to `_singular_instances` in Singular class…
fleming79 Apr 18, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
python-version: '3.11'
architecture: 'x64'
- uses: actions/download-artifact@v4
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python: ['3.12', '3.13']
python: ['3.11', '3.13']
include:
- python: '3.12'
- python: '3.11'
dist: 'ipylab*.tar.gz'
- python: '3.13'
dist: 'ipylab*.whl'
- os: windows
py_cmd: python
pip_cmd: python -m pip
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ repos:
hooks:
- id: check-json5
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.3
rev: 0.32.1
hooks:
- id: check-github-workflows
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.10
rev: v0.11.4
hooks:
- id: ruff
types_or: [python, jupyter]
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"editor.formatOnSave": true,
"python.terminal.activateEnvInCurrentTerminal": true,
"python.createEnvironment.trigger": "prompt",
"python.analysis.typeCheckingMode": "basic",
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ These versions enable:
- Viewing widgets from kernels inside from other kernels.

```bash
# For per-kernel-widget-manager support (Install modified version of ipywidgets, jupyterlab_widgets & widgetsnbextension)

pip install --no-binary --force-reinstall ipylab[per-kernel-widget-manager]
pip install --no-binary --force-reinstall ipylab
```

## Running the examples locally
Expand All @@ -115,13 +113,13 @@ jupyter lab

```bash
# create a new conda environment
mamba create -n ipylab -c conda-forge nodejs python=3.11 -y
conda create -n ipylab -c conda-forge nodejs python=3.11 -y

# activate the environment
conda activate ipylab

# install the Python package
pip install -e .[dev,per-kernel-widget-manager,test] # (with per-kernel-widget-manager)
pip install -e .[dev,test,examples]

# link the extension files
jupyter labextension develop . --overwrite
Expand All @@ -142,6 +140,10 @@ jlpm lint
#or
jlpm lint:check

# Pyright

pip install pyright[nodejs]
pyright
```

### VS code debugging
Expand Down
36 changes: 13 additions & 23 deletions examples/code_editor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"metadata": {},
"outputs": [],
"source": [
"import asyncio\n",
"import anyio\n",
"\n",
"import ipylab\n",
"from ipylab.code_editor import CodeEditorOptions"
Expand All @@ -51,12 +51,13 @@
" mime_type=\"text/x-python\",\n",
" description=\"<b>Code editor</b>\",\n",
" tooltip=\"This is a code editor. Code completion is provided for Python\",\n",
" value=\"def test():\\n ipylab.app.notification.notify('CodeEditor evaluation')\\n\\n# Place the cursor in the CodeEditor and press `Shift Enter`\\ntest()\",\n",
" value=\"def test():\\n app.notification.notify('CodeEditor evaluation')\\n\\n# Place the cursor in the CodeEditor and press `Shift Enter`\\ntest()\",\n",
" layout={\"height\": \"120px\", \"overflow\": \"hidden\"},\n",
" description_allow_html=True,\n",
")\n",
"asyncio.get_event_loop().call_later(0.5, ce.focus)\n",
"ce"
"display(ce)\n",
"await ce.ready()\n",
"ce.focus()"
]
},
{
Expand Down Expand Up @@ -123,12 +124,11 @@
"\n",
"\n",
"async def test():\n",
" import asyncio\n",
" import random\n",
"\n",
" for _ in range(20):\n",
" ce.value = random.choice(values) # noqa: S311\n",
" await asyncio.sleep(random.randint(10, 300) / 1e3) # noqa: S311"
" await anyio.sleep(random.randint(10, 300) / 1e3) # noqa: S311"
]
},
{
Expand All @@ -148,7 +148,7 @@
"metadata": {},
"outputs": [],
"source": [
"t = ce.to_task(test())"
"await test()"
]
},
{
Expand All @@ -157,16 +157,6 @@
"id": "11",
"metadata": {},
"outputs": [],
"source": [
"t.cancel()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "12",
"metadata": {},
"outputs": [],
"source": [
"# Place the label above\n",
"ce.layout.flex_flow = \"column\""
Expand All @@ -175,17 +165,17 @@
{
"cell_type": "code",
"execution_count": null,
"id": "13",
"id": "12",
"metadata": {},
"outputs": [],
"source": [
"# Add the same editor to the shell.\n",
"ipylab.app.shell.add(ce)"
"await ce.app.shell.add(ce)"
]
},
{
"cell_type": "markdown",
"id": "14",
"id": "13",
"metadata": {},
"source": [
"### Other mime_types\n",
Expand All @@ -196,7 +186,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "15",
"id": "14",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -206,7 +196,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "16",
"id": "15",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -230,7 +220,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
"version": "3.12.9"
}
},
"nbformat": 4,
Expand Down
Loading
Loading