Skip to content

Commit

Permalink
Version 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Sep 22, 2024
1 parent 1b22cf8 commit 2f7ee96
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 50 deletions.
11 changes: 7 additions & 4 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
ITables ChangeLog
=================

2.2.0-dev (2024-09-??)
2.2.0 (2024-09-22)
------------------

**Added**
- 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!
- 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))
- ITables works offline in Shiny applications too!
- 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))
- ITables works offline in Shiny applications too - just add `ui.HTML(init_itables())` to your application

**Changed**
- `tableId` has been renamed to `table_id`
- The `tableId` argument of `to_html_datatable` has been renamed to `table_id`

**Fixed**
- The dependencies of the streamlit component have been updated ([#320](https://github.com/mwouts/itables/issues/320))


2.1.5 (2024-09-08)
Expand Down
5 changes: 3 additions & 2 deletions docs/ipywidgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ ITables is available as a [Jupyter Widget](https://ipywidgets.readthedocs.io) si

## The `ITable` widget

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

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

Expand Down
31 changes: 0 additions & 31 deletions packages/itables_anywidget/pyproject.toml

This file was deleted.

10 changes: 0 additions & 10 deletions src/itables/interactive.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
"""Activate the representation of Pandas dataframes as interactive tables"""

import warnings

from .javascript import init_notebook_mode

# We issue a FutureWarning rather than a DeprecationWarning...
# because the DeprecationWarning is not shown in the notebook
warnings.warn(
"""Importing itables.interactive is deprecated.
Please execute instead 'from itables import init_notebook_mode; init_notebook_mode(all_interactive=True)'""",
FutureWarning,
)

init_notebook_mode(all_interactive=True)
2 changes: 1 addition & 1 deletion src/itables/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from io import open
from pathlib import Path

UNPKG_DT_BUNDLE_URL = "https://www.unpkg.com/[email protected].12/dt_bundle.js"
UNPKG_DT_BUNDLE_URL = "https://www.unpkg.com/[email protected].13/dt_bundle.js"
UNPKG_DT_BUNDLE_CSS = UNPKG_DT_BUNDLE_URL.replace(".js", ".css")
UNPKG_DT_BUNDLE_URL_NO_VERSION = "https://www.unpkg.com/dt_for_itables/dt_bundle.js"
UNPKG_DT_BUNDLE_CSS_NO_VERSION = "https://www.unpkg.com/dt_for_itables/dt_bundle.css"
Expand Down
2 changes: 1 addition & 1 deletion src/itables/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""ITables' version number"""

__version__ = "2.2.0-dev"
__version__ = "2.2.0"
2 changes: 1 addition & 1 deletion tests/test_extension_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_get_itables_extension_arguments(df):
def test_no_use_to_html():
with pytest.raises(
TypeError,
match="In the context of the streamlit extension, these options are not available",
match="In the context of the itable widget or streamlit extension, these options are not available",
):
get_itables_extension_arguments(pd.DataFrame({"a": [0]}), use_to_html=True)

Expand Down

0 comments on commit 2f7ee96

Please sign in to comment.