Skip to content

Commit 2f7ee96

Browse files
committed
Version 2.2.0
1 parent 1b22cf8 commit 2f7ee96

File tree

7 files changed

+13
-50
lines changed

7 files changed

+13
-50
lines changed

docs/changelog.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
ITables ChangeLog
22
=================
33

4-
2.2.0-dev (2024-09-??)
4+
2.2.0 (2024-09-22)
55
------------------
66

77
**Added**
88
- ITables has a Jupyter Widget ([#267](https://github.com/mwouts/itables/issues/267)). Our widget was developed and packaged using [AnyWidget](https://anywidget.dev/) which I highly recommend!
9-
- The selected rows are now available! Use either the `selected_rows` attribute of the `ITable` widget, or the returned value of the Streamlit `interactive_table` component, or the `{table_id}_selected_rows` input in Shiny ([#208](https://github.com/mwouts/itables/issues/208), [#250](https://github.com/mwouts/itables/issues/250))
10-
- ITables works offline in Shiny applications too!
9+
- The selected rows are now available in the apps. Use either the `selected_rows` attribute of the `ITable` widget, the returned value of the Streamlit `interactive_table` component, or the `{table_id}_selected_rows` input in Shiny ([#208](https://github.com/mwouts/itables/issues/208), [#250](https://github.com/mwouts/itables/issues/250))
10+
- ITables works offline in Shiny applications too - just add `ui.HTML(init_itables())` to your application
1111

1212
**Changed**
13-
- `tableId` has been renamed to `table_id`
13+
- The `tableId` argument of `to_html_datatable` has been renamed to `table_id`
14+
15+
**Fixed**
16+
- The dependencies of the streamlit component have been updated ([#320](https://github.com/mwouts/itables/issues/320))
1417

1518

1619
2.1.5 (2024-09-08)

docs/ipywidgets.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ ITables is available as a [Jupyter Widget](https://ipywidgets.readthedocs.io) si
1818

1919
## The `ITable` widget
2020

21-
The `ITable` widget has a few dependencies that you can install with
21+
The `ITable` widget has a few dependencies (essentially [AnyWidget](https://anywidget.dev),
22+
a great widget development framework!) that you can install with
2223
```bash
2324
pip install itables[widget]
2425
```
@@ -91,7 +92,7 @@ table.update(df.head(20), selected_rows=[7, 8])
9192
Compared to `show`, the `ITable` widget has the same limitations as the [streamlit component](streamlit.md#limitations),
9293
e.g. structured headers are not available, you can't pass JavaScript callback, etc.
9394

94-
The good news is that if you only want to _display_ the table, you **do not need**
95+
The good news is that if you only want to _display_ the table, you do not need
9596
the `ITables` widget. Below is an example in which we use `show` to display a different
9697
table depending on the value of a drop-down component:
9798

packages/itables_anywidget/pyproject.toml

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/itables/interactive.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
"""Activate the representation of Pandas dataframes as interactive tables"""
22

3-
import warnings
4-
53
from .javascript import init_notebook_mode
64

7-
# We issue a FutureWarning rather than a DeprecationWarning...
8-
# because the DeprecationWarning is not shown in the notebook
9-
warnings.warn(
10-
"""Importing itables.interactive is deprecated.
11-
Please execute instead 'from itables import init_notebook_mode; init_notebook_mode(all_interactive=True)'""",
12-
FutureWarning,
13-
)
14-
155
init_notebook_mode(all_interactive=True)

src/itables/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from io import open
22
from pathlib import Path
33

4-
UNPKG_DT_BUNDLE_URL = "https://www.unpkg.com/[email protected].12/dt_bundle.js"
4+
UNPKG_DT_BUNDLE_URL = "https://www.unpkg.com/[email protected].13/dt_bundle.js"
55
UNPKG_DT_BUNDLE_CSS = UNPKG_DT_BUNDLE_URL.replace(".js", ".css")
66
UNPKG_DT_BUNDLE_URL_NO_VERSION = "https://www.unpkg.com/dt_for_itables/dt_bundle.js"
77
UNPKG_DT_BUNDLE_CSS_NO_VERSION = "https://www.unpkg.com/dt_for_itables/dt_bundle.css"

src/itables/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""ITables' version number"""
22

3-
__version__ = "2.2.0-dev"
3+
__version__ = "2.2.0"

tests/test_extension_arguments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_get_itables_extension_arguments(df):
3636
def test_no_use_to_html():
3737
with pytest.raises(
3838
TypeError,
39-
match="In the context of the streamlit extension, these options are not available",
39+
match="In the context of the itable widget or streamlit extension, these options are not available",
4040
):
4141
get_itables_extension_arguments(pd.DataFrame({"a": [0]}), use_to_html=True)
4242

0 commit comments

Comments
 (0)