itables 2.1.2__tar.gz → 2.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {itables-2.1.2 → itables-2.1.3}/PKG-INFO +1 -1
- {itables-2.1.2 → itables-2.1.3}/docs/changelog.md +8 -1
- {itables-2.1.2 → itables-2.1.3}/src/itables/datatables_format.py +11 -3
- {itables-2.1.2 → itables-2.1.3}/src/itables/version.py +1 -1
- {itables-2.1.2 → itables-2.1.3}/tests/test_datatables_format.py +16 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_polars.py +17 -0
- {itables-2.1.2 → itables-2.1.3}/.github/codecov.yml +0 -0
- {itables-2.1.2 → itables-2.1.3}/.github/workflows/comment-pr.yml +0 -0
- {itables-2.1.2 → itables-2.1.3}/.github/workflows/continuous-integration.yml +0 -0
- {itables-2.1.2 → itables-2.1.3}/.github/workflows/publish-book.yml +0 -0
- {itables-2.1.2 → itables-2.1.3}/.github/workflows/publish.yml +0 -0
- {itables-2.1.2 → itables-2.1.3}/.gitignore +0 -0
- {itables-2.1.2 → itables-2.1.3}/.pre-commit-config.yaml +0 -0
- {itables-2.1.2 → itables-2.1.3}/.pylintrc +0 -0
- {itables-2.1.2 → itables-2.1.3}/LICENSE +0 -0
- {itables-2.1.2 → itables-2.1.3}/README.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/binder/labconfig/default_setting_overrides.json +0 -0
- {itables-2.1.2 → itables-2.1.3}/binder/postBuild +0 -0
- {itables-2.1.2 → itables-2.1.3}/binder/requirements.txt +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/_config.yml +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/_toc.yml +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/advanced_parameters.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/contributing.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/custom_css.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/custom_extensions.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/dash.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/developing.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/df_example.png +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/downsampling.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/extensions.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/formatting.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/html_export.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/images/code.png +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/images/colab.png +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/images/html.png +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/images/lab.png +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/images/notebook.png +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/images/pycharm.png +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/ipywidgets.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/pandas_style.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/polars_dataframes.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/quarto/quarto_html.qmd +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/quarto/quarto_revealjs.qmd +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/quarto.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/quick_start.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/references.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/sample_dataframes.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/shiny.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/show_df.png +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/streamlit.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/supported_editors.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/docs/troubleshooting.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/environment.yml +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/dt_for_itables/CHANGELOG.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/dt_for_itables/LICENSE +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/dt_for_itables/README.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/dt_for_itables/package-lock.json +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/dt_for_itables/package.json +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/dt_for_itables/src/index.css +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/dt_for_itables/src/index.d.ts +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/dt_for_itables/src/index.js +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/itables_for_streamlit/README.md +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/itables_for_streamlit/package-lock.json +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/itables_for_streamlit/package.json +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/itables_for_streamlit/public/index.html +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/itables_for_streamlit/src/index.tsx +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/itables_for_streamlit/tsconfig.json +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/package-lock.json +0 -0
- {itables-2.1.2 → itables-2.1.3}/packages/package.json +0 -0
- {itables-2.1.2 → itables-2.1.3}/pyproject.toml +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/__init__.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/downsample.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/html/column_filters/initComplete.js +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/html/column_filters/pre_dt_code.js +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/html/datatables_template.html +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/html/dt_bundle.css +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/html/dt_bundle.js +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/html/init_datatables.html +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/interactive.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/itables_for_streamlit/asset-manifest.json +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/itables_for_streamlit/index.html +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/itables_for_streamlit/static/css/main.8eddd46d.css +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/itables_for_streamlit/static/css/main.8eddd46d.css.map +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/itables_for_streamlit/static/js/main.ffa367f6.js +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/itables_for_streamlit/static/js/main.ffa367f6.js.LICENSE.txt +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/itables_for_streamlit/static/js/main.ffa367f6.js.map +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/javascript.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/logo/loading.svg +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/logo/logo.svg +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/logo/text.svg +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/logo/wide.svg +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/logo/with_text.svg +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/options.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/sample_dfs.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/samples/countries.csv +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/samples/indicators.csv +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/samples/population.csv +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/shiny.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/streamlit.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/src/itables/utils.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/__init__.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/conftest.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/sample_python_apps/itables_in_a_shiny_app.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/sample_python_apps/itables_in_a_shiny_app_with_tabs.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_changelog.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_connected_notebook_is_small.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_documentation_notebooks_run.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_downsample.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_extension_arguments.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_html_in_table_header.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_init.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_javascript.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_json_dumps.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_notebook.ipynb +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_pandas_style.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_sample_dfs.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_sample_python_apps.py +0 -0
- {itables-2.1.2 → itables-2.1.3}/tests/test_update_samples.py +0 -0
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
ITables ChangeLog
|
|
2
2
|
=================
|
|
3
3
|
|
|
4
|
+
2.1.3 (2024-06-22)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
**Fixed**
|
|
8
|
+
- We have improved the detection of large integers in the context of Polars DataFrames ([#291](https://github.com/mwouts/itables/issues/291))
|
|
9
|
+
|
|
10
|
+
|
|
4
11
|
2.1.2 (2024-06-19)
|
|
5
12
|
------------------
|
|
6
13
|
|
|
@@ -9,7 +16,7 @@ ITables ChangeLog
|
|
|
9
16
|
an automatic horizontal scrolling in Jupyter, Jupyter Book and also Streamlit if the table is too wide ([#282](https://github.com/mwouts/itables/pull/282)).
|
|
10
17
|
|
|
11
18
|
**Fixed**
|
|
12
|
-
- The dependencies of the streamlit components have been updated to fix a vulnerability in `ws` ([Alert
|
|
19
|
+
- The dependencies of the streamlit components have been updated to fix a vulnerability in `ws` ([Alert 1](https://github.com/mwouts/itables/security/dependabot/1))
|
|
13
20
|
|
|
14
21
|
|
|
15
22
|
2.1.1 (2024-06-08)
|
|
@@ -129,7 +129,15 @@ def datatables_rows(df, count=None, warn_on_unexpected_types=False, pure_json=Fa
|
|
|
129
129
|
def n_suffix_for_bigints(js, pure_json=False):
|
|
130
130
|
def n_suffix(matchobj):
|
|
131
131
|
if pure_json:
|
|
132
|
-
return '"' + matchobj.group(
|
|
133
|
-
return
|
|
132
|
+
return matchobj.group(1) + '"' + matchobj.group(2) + '"' + matchobj.group(3)
|
|
133
|
+
return (
|
|
134
|
+
matchobj.group(1)
|
|
135
|
+
+ 'BigInt("'
|
|
136
|
+
+ matchobj.group(2)
|
|
137
|
+
+ '")'
|
|
138
|
+
+ matchobj.group(3)
|
|
139
|
+
)
|
|
134
140
|
|
|
135
|
-
|
|
141
|
+
big_int_re = re.compile(r"^([\[\s]+)(-?\d{16,})(\]*)$")
|
|
142
|
+
parts = js.split(",")
|
|
143
|
+
return ",".join(re.sub(big_int_re, n_suffix, part) for part in parts)
|
|
@@ -154,3 +154,19 @@ def test_encode_max_int(large):
|
|
|
154
154
|
def test_encode_not_max_int(large):
|
|
155
155
|
large //= 10
|
|
156
156
|
assert n_suffix_for_bigints(json.dumps([large])) == "[{}]".format(large)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def test_encode_mixed_contents():
|
|
160
|
+
# Make sure that the bigint escape works for mixed content # 291
|
|
161
|
+
df = pd.DataFrame(
|
|
162
|
+
{
|
|
163
|
+
"bigint": [1666767918216000000],
|
|
164
|
+
"int": [1699300000000],
|
|
165
|
+
"float": [0.9510565400123596],
|
|
166
|
+
"neg": [-0.30901700258255005],
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
assert (
|
|
170
|
+
datatables_rows(df)
|
|
171
|
+
== '[[BigInt("1666767918216000000"), 1699300000000, 0.951057, -0.309017]]'
|
|
172
|
+
)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import pytest
|
|
2
2
|
|
|
3
3
|
from itables import to_html_datatable
|
|
4
|
+
from itables.javascript import datatables_rows
|
|
4
5
|
from itables.sample_dfs import get_dict_of_test_dfs, get_dict_of_test_series
|
|
5
6
|
|
|
6
7
|
try:
|
|
@@ -21,3 +22,19 @@ def test_show_polars_series(name, x, use_to_html):
|
|
|
21
22
|
)
|
|
22
23
|
def test_show_polars_df(name, df, use_to_html):
|
|
23
24
|
to_html_datatable(df, use_to_html)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def test_encode_mixed_contents():
|
|
28
|
+
# Make sure that the bigint escape works for mixed content # 291
|
|
29
|
+
df = polars.DataFrame(
|
|
30
|
+
{
|
|
31
|
+
"bigint": [1666767918216000000],
|
|
32
|
+
"int": [1699300000000],
|
|
33
|
+
"float": [0.9510565400123596],
|
|
34
|
+
"neg": [-0.30901700258255005],
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
assert (
|
|
38
|
+
datatables_rows(df)
|
|
39
|
+
== '[[BigInt("1666767918216000000"), 1699300000000, 0.9510565400123596, -0.30901700258255005]]'
|
|
40
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{itables-2.1.2 → itables-2.1.3}/src/itables/itables_for_streamlit/static/css/main.8eddd46d.css
RENAMED
|
File without changes
|
{itables-2.1.2 → itables-2.1.3}/src/itables/itables_for_streamlit/static/css/main.8eddd46d.css.map
RENAMED
|
File without changes
|
{itables-2.1.2 → itables-2.1.3}/src/itables/itables_for_streamlit/static/js/main.ffa367f6.js
RENAMED
|
File without changes
|
|
File without changes
|
{itables-2.1.2 → itables-2.1.3}/src/itables/itables_for_streamlit/static/js/main.ffa367f6.js.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{itables-2.1.2 → itables-2.1.3}/tests/sample_python_apps/itables_in_a_shiny_app_with_tabs.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|