Skip to content

Commit c2a29d9

Browse files
authored
Binder links to itables in Jupyter Lab (#38)
* Add a default_setting_overrides.json * Binder Notebook & JupyterLab * Use the same binder instruction as for Jupytext * Link to Jupyter Lab rather than Notebook
1 parent 8c09df4 commit c2a29d9

File tree

4 files changed

+61
-42
lines changed

4 files changed

+61
-42
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
[![codecov.io](https://codecov.io/github/mwouts/itables/coverage.svg?branch=main)](https://codecov.io/github/mwouts/itables?branch=main)
66
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/mwouts/itables.svg)](https://lgtm.com/projects/g/mwouts/itables/context:python)
77
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
8-
[![Binder](https://img.shields.io/badge/Binder-Notebook-blue.svg)](https://mybinder.org/v2/gh/mwouts/itables/main?urlpath=lab/tree/README.md)
8+
[![Notebook](https://img.shields.io/badge/Binder-Notebook-blue.svg)](https://mybinder.org/v2/gh/mwouts/itables/main?filepath=README.md)
9+
[![Lab](https://img.shields.io/badge/Binder-JupyterLab-blue.svg)](https://mybinder.org/v2/gh/mwouts/itables/main?urlpath=lab/tree/README.md)
910
<a class="github-button" href="https://github.com/mwouts/itables" data-icon="octicon-star" data-show-count="true" aria-label="Star mwouts/itables on GitHub">Star</a>
1011

1112
Turn pandas DataFrames and Series into interactive [datatables](https://datatables.net) in both your notebooks and their HTML representation with `import itables.interactive`:
@@ -50,7 +51,7 @@ df = wb.get_countries()
5051
df
5152
```
5253

53-
You don't see any table above? Please either open the [HTML export](https://mwouts.github.io/itables/) of this notebook, or run this README on [Binder](https://mybinder.org/v2/gh/mwouts/itables/main?filepath=README.md)!
54+
You don't see any table above? Please either open the [HTML export](https://mwouts.github.io/itables/) of this notebook, or run this README on [Binder](https://mybinder.org/v2/gh/mwouts/itables/main?urlpath=lab/tree/README.md)!
5455

5556

5657
Or display just one series or dataframe as an interactive table with the `show` function.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"@jupyterlab/docmanager-extension:plugin": {
3+
"defaultViewers": {
4+
"markdown": "Jupytext Notebook",
5+
"myst": "Jupytext Notebook",
6+
"r-markdown": "Jupytext Notebook",
7+
"quarto": "Jupytext Notebook",
8+
"julia": "Jupytext Notebook",
9+
"python": "Jupytext Notebook",
10+
"r": "Jupytext Notebook"
11+
}
12+
}
13+
}

binder/postBuild

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ set -e
33

44
# Install from sources
55
pip install .
6+
7+
# Open .md notebooks with the Notebook editor
8+
mkdir -p ${HOME}/.jupyter/labconfig
9+
cp binder/labconfig/* ${HOME}/.jupyter/labconfig

index.html

Lines changed: 41 additions & 40 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)