itables 2.1.1__tar.gz → 2.1.2__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.
Files changed (122) hide show
  1. {itables-2.1.1 → itables-2.1.2}/.github/workflows/continuous-integration.yml +5 -0
  2. {itables-2.1.1 → itables-2.1.2}/PKG-INFO +2 -1
  3. {itables-2.1.1 → itables-2.1.2}/README.md +1 -0
  4. {itables-2.1.1 → itables-2.1.2}/docs/advanced_parameters.md +1 -1
  5. {itables-2.1.1 → itables-2.1.2}/docs/changelog.md +11 -0
  6. {itables-2.1.1 → itables-2.1.2}/docs/custom_css.md +3 -4
  7. {itables-2.1.1 → itables-2.1.2}/docs/polars_dataframes.md +2 -2
  8. {itables-2.1.1 → itables-2.1.2}/docs/quick_start.md +1 -0
  9. {itables-2.1.1 → itables-2.1.2}/docs/streamlit.md +1 -4
  10. {itables-2.1.1 → itables-2.1.2}/environment.yml +1 -1
  11. {itables-2.1.1 → itables-2.1.2}/packages/dt_for_itables/CHANGELOG.md +6 -0
  12. {itables-2.1.1 → itables-2.1.2}/packages/dt_for_itables/package-lock.json +161 -107
  13. {itables-2.1.1 → itables-2.1.2}/packages/dt_for_itables/package.json +1 -1
  14. itables-2.1.2/packages/dt_for_itables/src/index.css +8 -0
  15. {itables-2.1.1 → itables-2.1.2}/packages/itables_for_streamlit/package-lock.json +14 -14
  16. {itables-2.1.1 → itables-2.1.2}/packages/itables_for_streamlit/src/index.tsx +6 -4
  17. {itables-2.1.1 → itables-2.1.2}/src/itables/html/dt_bundle.css +1 -1
  18. itables-2.1.2/src/itables/itables_for_streamlit/asset-manifest.json +13 -0
  19. {itables-2.1.1 → itables-2.1.2}/src/itables/itables_for_streamlit/index.html +1 -1
  20. itables-2.1.1/src/itables/itables_for_streamlit/static/css/main.36389519.css → itables-2.1.2/src/itables/itables_for_streamlit/static/css/main.8eddd46d.css +2 -2
  21. itables-2.1.2/src/itables/itables_for_streamlit/static/css/main.8eddd46d.css.map +1 -0
  22. itables-2.1.1/src/itables/itables_for_streamlit/static/js/main.c5cc2076.js → itables-2.1.2/src/itables/itables_for_streamlit/static/js/main.ffa367f6.js +3 -3
  23. itables-2.1.2/src/itables/itables_for_streamlit/static/js/main.ffa367f6.js.map +1 -0
  24. {itables-2.1.1 → itables-2.1.2}/src/itables/javascript.py +3 -5
  25. {itables-2.1.1 → itables-2.1.2}/src/itables/options.py +2 -1
  26. {itables-2.1.1 → itables-2.1.2}/src/itables/sample_dfs.py +1 -1
  27. {itables-2.1.1 → itables-2.1.2}/src/itables/utils.py +1 -1
  28. {itables-2.1.1 → itables-2.1.2}/src/itables/version.py +1 -1
  29. {itables-2.1.1 → itables-2.1.2}/tests/test_datatables_format.py +1 -1
  30. {itables-2.1.1 → itables-2.1.2}/tests/test_extension_arguments.py +0 -1
  31. itables-2.1.1/packages/dt_for_itables/src/index.css +0 -3
  32. itables-2.1.1/src/itables/itables_for_streamlit/asset-manifest.json +0 -13
  33. itables-2.1.1/src/itables/itables_for_streamlit/static/css/main.36389519.css.map +0 -1
  34. itables-2.1.1/src/itables/itables_for_streamlit/static/js/main.c5cc2076.js.map +0 -1
  35. {itables-2.1.1 → itables-2.1.2}/.github/codecov.yml +0 -0
  36. {itables-2.1.1 → itables-2.1.2}/.github/workflows/comment-pr.yml +0 -0
  37. {itables-2.1.1 → itables-2.1.2}/.github/workflows/publish-book.yml +0 -0
  38. {itables-2.1.1 → itables-2.1.2}/.github/workflows/publish.yml +0 -0
  39. {itables-2.1.1 → itables-2.1.2}/.gitignore +0 -0
  40. {itables-2.1.1 → itables-2.1.2}/.pre-commit-config.yaml +0 -0
  41. {itables-2.1.1 → itables-2.1.2}/.pylintrc +0 -0
  42. {itables-2.1.1 → itables-2.1.2}/LICENSE +0 -0
  43. {itables-2.1.1 → itables-2.1.2}/binder/labconfig/default_setting_overrides.json +0 -0
  44. {itables-2.1.1 → itables-2.1.2}/binder/postBuild +0 -0
  45. {itables-2.1.1 → itables-2.1.2}/binder/requirements.txt +0 -0
  46. {itables-2.1.1 → itables-2.1.2}/docs/_config.yml +0 -0
  47. {itables-2.1.1 → itables-2.1.2}/docs/_toc.yml +0 -0
  48. {itables-2.1.1 → itables-2.1.2}/docs/contributing.md +0 -0
  49. {itables-2.1.1 → itables-2.1.2}/docs/custom_extensions.md +0 -0
  50. {itables-2.1.1 → itables-2.1.2}/docs/dash.md +0 -0
  51. {itables-2.1.1 → itables-2.1.2}/docs/developing.md +0 -0
  52. {itables-2.1.1 → itables-2.1.2}/docs/df_example.png +0 -0
  53. {itables-2.1.1 → itables-2.1.2}/docs/downsampling.md +0 -0
  54. {itables-2.1.1 → itables-2.1.2}/docs/extensions.md +0 -0
  55. {itables-2.1.1 → itables-2.1.2}/docs/formatting.md +0 -0
  56. {itables-2.1.1 → itables-2.1.2}/docs/html_export.md +0 -0
  57. {itables-2.1.1 → itables-2.1.2}/docs/images/code.png +0 -0
  58. {itables-2.1.1 → itables-2.1.2}/docs/images/colab.png +0 -0
  59. {itables-2.1.1 → itables-2.1.2}/docs/images/html.png +0 -0
  60. {itables-2.1.1 → itables-2.1.2}/docs/images/lab.png +0 -0
  61. {itables-2.1.1 → itables-2.1.2}/docs/images/notebook.png +0 -0
  62. {itables-2.1.1 → itables-2.1.2}/docs/images/pycharm.png +0 -0
  63. {itables-2.1.1 → itables-2.1.2}/docs/ipywidgets.md +0 -0
  64. {itables-2.1.1 → itables-2.1.2}/docs/pandas_style.md +0 -0
  65. {itables-2.1.1 → itables-2.1.2}/docs/quarto/quarto_html.qmd +0 -0
  66. {itables-2.1.1 → itables-2.1.2}/docs/quarto/quarto_revealjs.qmd +0 -0
  67. {itables-2.1.1 → itables-2.1.2}/docs/quarto.md +0 -0
  68. {itables-2.1.1 → itables-2.1.2}/docs/references.md +0 -0
  69. {itables-2.1.1 → itables-2.1.2}/docs/sample_dataframes.md +0 -0
  70. {itables-2.1.1 → itables-2.1.2}/docs/shiny.md +0 -0
  71. {itables-2.1.1 → itables-2.1.2}/docs/show_df.png +0 -0
  72. {itables-2.1.1 → itables-2.1.2}/docs/supported_editors.md +0 -0
  73. {itables-2.1.1 → itables-2.1.2}/docs/troubleshooting.md +0 -0
  74. {itables-2.1.1 → itables-2.1.2}/packages/dt_for_itables/LICENSE +0 -0
  75. {itables-2.1.1 → itables-2.1.2}/packages/dt_for_itables/README.md +0 -0
  76. {itables-2.1.1 → itables-2.1.2}/packages/dt_for_itables/src/index.d.ts +0 -0
  77. {itables-2.1.1 → itables-2.1.2}/packages/dt_for_itables/src/index.js +0 -0
  78. {itables-2.1.1 → itables-2.1.2}/packages/itables_for_streamlit/README.md +0 -0
  79. {itables-2.1.1 → itables-2.1.2}/packages/itables_for_streamlit/package.json +0 -0
  80. {itables-2.1.1 → itables-2.1.2}/packages/itables_for_streamlit/public/index.html +0 -0
  81. {itables-2.1.1 → itables-2.1.2}/packages/itables_for_streamlit/tsconfig.json +0 -0
  82. {itables-2.1.1 → itables-2.1.2}/packages/package-lock.json +0 -0
  83. {itables-2.1.1 → itables-2.1.2}/packages/package.json +0 -0
  84. {itables-2.1.1 → itables-2.1.2}/pyproject.toml +0 -0
  85. {itables-2.1.1 → itables-2.1.2}/src/itables/__init__.py +0 -0
  86. {itables-2.1.1 → itables-2.1.2}/src/itables/datatables_format.py +0 -0
  87. {itables-2.1.1 → itables-2.1.2}/src/itables/downsample.py +0 -0
  88. {itables-2.1.1 → itables-2.1.2}/src/itables/html/column_filters/initComplete.js +0 -0
  89. {itables-2.1.1 → itables-2.1.2}/src/itables/html/column_filters/pre_dt_code.js +0 -0
  90. {itables-2.1.1 → itables-2.1.2}/src/itables/html/datatables_template.html +0 -0
  91. {itables-2.1.1 → itables-2.1.2}/src/itables/html/dt_bundle.js +0 -0
  92. {itables-2.1.1 → itables-2.1.2}/src/itables/html/init_datatables.html +0 -0
  93. {itables-2.1.1 → itables-2.1.2}/src/itables/interactive.py +0 -0
  94. /itables-2.1.1/src/itables/itables_for_streamlit/static/js/main.c5cc2076.js.LICENSE.txt → /itables-2.1.2/src/itables/itables_for_streamlit/static/js/main.ffa367f6.js.LICENSE.txt +0 -0
  95. {itables-2.1.1 → itables-2.1.2}/src/itables/logo/loading.svg +0 -0
  96. {itables-2.1.1 → itables-2.1.2}/src/itables/logo/logo.svg +0 -0
  97. {itables-2.1.1 → itables-2.1.2}/src/itables/logo/text.svg +0 -0
  98. {itables-2.1.1 → itables-2.1.2}/src/itables/logo/wide.svg +0 -0
  99. {itables-2.1.1 → itables-2.1.2}/src/itables/logo/with_text.svg +0 -0
  100. {itables-2.1.1 → itables-2.1.2}/src/itables/samples/countries.csv +0 -0
  101. {itables-2.1.1 → itables-2.1.2}/src/itables/samples/indicators.csv +0 -0
  102. {itables-2.1.1 → itables-2.1.2}/src/itables/samples/population.csv +0 -0
  103. {itables-2.1.1 → itables-2.1.2}/src/itables/shiny.py +0 -0
  104. {itables-2.1.1 → itables-2.1.2}/src/itables/streamlit.py +0 -0
  105. {itables-2.1.1 → itables-2.1.2}/tests/__init__.py +0 -0
  106. {itables-2.1.1 → itables-2.1.2}/tests/conftest.py +0 -0
  107. {itables-2.1.1 → itables-2.1.2}/tests/sample_python_apps/itables_in_a_shiny_app.py +0 -0
  108. {itables-2.1.1 → itables-2.1.2}/tests/sample_python_apps/itables_in_a_shiny_app_with_tabs.py +0 -0
  109. {itables-2.1.1 → itables-2.1.2}/tests/test_changelog.py +0 -0
  110. {itables-2.1.1 → itables-2.1.2}/tests/test_connected_notebook_is_small.py +0 -0
  111. {itables-2.1.1 → itables-2.1.2}/tests/test_documentation_notebooks_run.py +0 -0
  112. {itables-2.1.1 → itables-2.1.2}/tests/test_downsample.py +0 -0
  113. {itables-2.1.1 → itables-2.1.2}/tests/test_html_in_table_header.py +0 -0
  114. {itables-2.1.1 → itables-2.1.2}/tests/test_init.py +0 -0
  115. {itables-2.1.1 → itables-2.1.2}/tests/test_javascript.py +0 -0
  116. {itables-2.1.1 → itables-2.1.2}/tests/test_json_dumps.py +0 -0
  117. {itables-2.1.1 → itables-2.1.2}/tests/test_notebook.ipynb +0 -0
  118. {itables-2.1.1 → itables-2.1.2}/tests/test_pandas_style.py +0 -0
  119. {itables-2.1.1 → itables-2.1.2}/tests/test_polars.py +0 -0
  120. {itables-2.1.1 → itables-2.1.2}/tests/test_sample_dfs.py +0 -0
  121. {itables-2.1.1 → itables-2.1.2}/tests/test_sample_python_apps.py +0 -0
  122. {itables-2.1.1 → itables-2.1.2}/tests/test_update_samples.py +0 -0
@@ -42,11 +42,13 @@ jobs:
42
42
  matrix:
43
43
  python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
44
44
  pandas-version: [latest]
45
+ numpy-version: [latest]
45
46
  include:
46
47
  - python-version: 3.7
47
48
  pandas-version: '<1.0'
48
49
  - python-version: 3.9
49
50
  pandas-version: '<2.0'
51
+ numpy-version: '<2.0'
50
52
  - python-version: "3.12"
51
53
  pandas-version: pre
52
54
  polars: true
@@ -77,6 +79,9 @@ jobs:
77
79
  - name: Install pandas ${{ matrix.pandas-version }}
78
80
  if: matrix.pandas-version != 'pre' && matrix.pandas-version != 'latest'
79
81
  run: pip install 'pandas${{ matrix.pandas-version }}'
82
+ - name: Install numpy ${{ matrix.numpy-version }}
83
+ if: matrix.numpy-version != 'latest'
84
+ run: pip install 'numpy${{ matrix.numpy-version }}'
80
85
 
81
86
  - name: Install polars
82
87
  if: matrix.polars
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: itables
3
- Version: 2.1.1
3
+ Version: 2.1.2
4
4
  Summary: Pandas and Polar DataFrames as interactive DataTables
5
5
  Project-URL: Homepage, https://mwouts.github.io/itables/
6
6
  Project-URL: Documentation, https://mwouts.github.io/itables
@@ -86,6 +86,7 @@ Description-Content-Type: text/markdown
86
86
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/itables.svg)](https://anaconda.org/conda-forge/itables)
87
87
  [![pyversions](https://img.shields.io/pypi/pyversions/itables.svg)](https://pypi.python.org/pypi/itables)
88
88
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
89
+ [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_red.svg)](https://itables.streamlit.app)
89
90
 
90
91
  This packages changes how Pandas and Polars DataFrames are rendered in Jupyter Notebooks.
91
92
  With `itables` you can display your tables as interactive [DataTables](https://datatables.net/)
@@ -6,6 +6,7 @@
6
6
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/itables.svg)](https://anaconda.org/conda-forge/itables)
7
7
  [![pyversions](https://img.shields.io/pypi/pyversions/itables.svg)](https://pypi.python.org/pypi/itables)
8
8
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
9
+ [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_red.svg)](https://itables.streamlit.app)
9
10
 
10
11
  This packages changes how Pandas and Polars DataFrames are rendered in Jupyter Notebooks.
11
12
  With `itables` you can display your tables as interactive [DataTables](https://datatables.net/)
@@ -135,7 +135,7 @@ You can replace the pagination with a [vertical scroll](https://datatables.net/e
135
135
  show(df, scrollY="200px", scrollCollapse=True, paging=False)
136
136
  ```
137
137
 
138
- In the context of the notebook, a horizontal scroll bar should appear when the table is too wide. In other contexts like here in Jupyter Book, you might want to use `scrollX = True`.
138
+ Since ITables 2.1.2, the `.dt-layout-table` div has a default overflow equal to `auto`, so in most cases you won't need to use the `scrollX` option of datatables.
139
139
 
140
140
  ## Footer
141
141
 
@@ -1,6 +1,17 @@
1
1
  ITables ChangeLog
2
2
  =================
3
3
 
4
+ 2.1.2 (2024-06-19)
5
+ ------------------
6
+
7
+ **Changed**
8
+ - The default CSS contains now has `overflow:auto` on `div.dt-layout-table>div`. Thanks to this we now get
9
+ 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
+
11
+ **Fixed**
12
+ - 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
+
14
+
4
15
  2.1.1 (2024-06-08)
5
16
  ------------------
6
17
 
@@ -113,9 +113,9 @@ show(df, classes="display nowrap table_with_monospace_font")
113
113
  The `show` function has a `style` argument that determines the
114
114
  style for that particular table.
115
115
 
116
- The default value for `style` is `"table-layout:auto;width:auto;margin:auto;caption-side:bottom"`. When `scrollX` is `True`, `margin:auto` gets replaced with `margin:0` to avoid misaligned headers.
117
- Without `width:auto`, tables with few columns still take the full notebook width in Jupyter.
118
- Using `margin:auto` makes non-wide tables centered in Jupyter.
116
+ The default value for `style` is `"table-layout:auto;width:auto;margin:auto;caption-side:bottom"`.
117
+ Without `width:auto`, tables with few columns are stretched to fit the container width.
118
+ Using `margin:auto` makes non-wide tables centered.
119
119
 
120
120
  ## Position and width
121
121
 
@@ -152,7 +152,6 @@ You can set a fixed width for all the columns with `"targets": "_all"`:
152
152
  show(
153
153
  df,
154
154
  columnDefs=[{"width": "120px", "targets": "_all"}],
155
- scrollX=True,
156
155
  style="width:1200px",
157
156
  autoWidth=False,
158
157
  )
@@ -148,7 +148,7 @@ show(dict_of_test_dfs["int_float_str"])
148
148
  ```{code-cell}
149
149
  :tags: [full-width]
150
150
 
151
- show(dict_of_test_dfs["wide"], maxBytes=100000, maxColumns=100, scrollX=True)
151
+ show(dict_of_test_dfs["wide"], maxBytes=100000, maxColumns=100)
152
152
  ```
153
153
 
154
154
  ## long_column_names
@@ -156,7 +156,7 @@ show(dict_of_test_dfs["wide"], maxBytes=100000, maxColumns=100, scrollX=True)
156
156
  ```{code-cell}
157
157
  :tags: [full-width]
158
158
 
159
- show(dict_of_test_dfs["long_column_names"], scrollX=True)
159
+ show(dict_of_test_dfs["long_column_names"])
160
160
  ```
161
161
 
162
162
  ## named_column_index
@@ -20,6 +20,7 @@ kernelspec:
20
20
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/itables.svg)](https://anaconda.org/conda-forge/itables)
21
21
  [![pyversions](https://img.shields.io/pypi/pyversions/itables.svg)](https://pypi.python.org/pypi/itables)
22
22
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
23
+ [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_red.svg)](https://itables.streamlit.app)
23
24
  <a class="github-button" href="https://github.com/mwouts/itables" data-icon="octicon-star" data-show-count="true"></a>
24
25
  <script src="https://buttons.github.io/buttons.js"></script>
25
26
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ITables in version `2.1.0` or above can be used in Streamlit.
4
4
 
5
- To render a DataFrame with ITables in a Streamlit app, use `interactive_table`:
5
+ To render a DataFrame with ITables in a Streamlit app, use `itables.streamlit.interactive_table`:
6
6
  ```
7
7
  from itables.streamlit import interactive_table
8
8
  ```
@@ -11,9 +11,6 @@ The function `interactive_table` accepts the same arguments as `show` and `to_ht
11
11
  first argument is the dataframe that will be displayed, and then you
12
12
  can set a `caption`, custom `classes` or `style`, and even activate the `buttons` extension, etc...
13
13
 
14
- Unlike `show`, `interactive_table` has `scrollX=True` by default. This makes the
15
- rendering of wide tables more similar to that of `show` in Notebooks.
16
-
17
14
  ## A sample application
18
15
 
19
16
  A sample Streamlit application is available at [itables.streamlit.app](https://itables.streamlit.app) (source code [here](https://github.com/mwouts/demo_itables_in_streamlit/blob/main/itables_app.py))
@@ -7,6 +7,7 @@ dependencies:
7
7
  - python
8
8
  - jupyter
9
9
  - jupyterlab>=4
10
+ - jupyter-book
10
11
  - jupytext
11
12
  - nbconvert
12
13
  - ipykernel
@@ -26,4 +27,3 @@ dependencies:
26
27
  - streamlit
27
28
  - pip:
28
29
  - world_bank_data
29
- - jupyter_book
@@ -1,3 +1,9 @@
1
+ # 2.0.11 (2024-06-??)
2
+
3
+ **Added**
4
+ - The default CSS contains has `overflow:auto` on `.dt-layout-table>div`. This improves the horizontal scrolling in Jupyter, and discards the need for `scrollX` in Streamlit ([#282](https://github.com/mwouts/itables/pull/282))
5
+
6
+
1
7
  # 2.0.10 (2024-06-08)
2
8
 
3
9
  **Added**