Skip to content

Commit

Permalink
deploy: 014d22e
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Sep 7, 2024
1 parent 6a9589b commit 13814c4
Show file tree
Hide file tree
Showing 45 changed files with 3,091 additions and 2,102 deletions.
218 changes: 116 additions & 102 deletions _sources/advanced_parameters.ipynb

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion _sources/changelog.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
ITables ChangeLog
=================

2.1.5-dev (2024-08-??)
2.1.5-dev (2024-09-??)
------------------

**Fixed**
- We have improved the function that determines whether a dark theme is being used ([#294](https://github.com/mwouts/itables/issues/294))
- We have adjusted the generation of the Polars sample dataframes to fix the CI ([Polars-18130](https://github.com/pola-rs/polars/issues/18130))
- The test on the Shiny app fallbacks to `ui.nav_panel` when `ui.nav` is not available
- The dependencies of the streamlit component have been updated ([#313](https://github.com/mwouts/itables/issues/313), [#315](https://github.com/mwouts/itables/issues/315))


2.1.4 (2024-07-03)
Expand Down
6 changes: 3 additions & 3 deletions _sources/contributing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "cf8de926",
"id": "07f6c35f",
"metadata": {},
"source": [
"# Contributing\n",
Expand Down Expand Up @@ -36,7 +36,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "3df34e2c",
"id": "4229aeab",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -69,7 +69,7 @@
},
{
"cell_type": "markdown",
"id": "65a44773",
"id": "cafe8dac",
"metadata": {},
"source": [
"## Support DataTables\n",
Expand Down
152 changes: 83 additions & 69 deletions _sources/custom_css.ipynb

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions _sources/custom_extensions.ipynb

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions _sources/dark_mode.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "1c1e9776",
"metadata": {},
"source": [
"# Dark Themes\n",
"\n",
"When a notebook or application is rendered using a dark theme, DataTable requires that a `dark`\n",
"class be added to the HTML document. This can be done with the following Javascript snippet:\n",
"```javascript\n",
"document.documentElement.classList.add('dark');\n",
"```\n",
"\n",
"When ITables is used in a notebook, this is handled by\n",
"`init_notebook_mode` which displays the [`init_datatables.html`](https://github.com/mwouts/itables/blob/main/src/itables/html/init_datatables.html) snippet.\n",
"\n",
"Please open a PR if you see how to further improve the\n",
"support of light vs dark themes, and e.g. set the `dark`\n",
"class dynamically when the theme is changed."
]
}
],
"metadata": {
"jupytext": {
"formats": "md:myst",
"notebook_metadata_filter": "-jupytext.text_representation.jupytext_version",
"text_representation": {
"extension": ".md",
"format_name": "myst",
"format_version": 0.13
}
},
"kernelspec": {
"display_name": "itables",
"language": "python",
"name": "itables"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
},
"source_map": [
13
]
},
"nbformat": 4,
"nbformat_minor": 5
}
28 changes: 28 additions & 0 deletions _sources/dark_mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
jupytext:
formats: md:myst
notebook_metadata_filter: -jupytext.text_representation.jupytext_version
text_representation:
extension: .md
format_name: myst
format_version: 0.13
kernelspec:
display_name: itables
language: python
name: itables
---

# Dark Themes

When a notebook or application is rendered using a dark theme, DataTable requires that a `dark`
class be added to the HTML document. This can be done with the following Javascript snippet:
```javascript
document.documentElement.classList.add('dark');
```

When ITables is used in a notebook, this is handled by
`init_notebook_mode` which displays the [`init_datatables.html`](https://github.com/mwouts/itables/blob/main/src/itables/html/init_datatables.html) snippet.

Please open a PR if you see how to further improve the
support of light vs dark themes, and e.g. set the `dark`
class dynamically when the theme is changed.
70 changes: 42 additions & 28 deletions _sources/downsampling.ipynb

Large diffs are not rendered by default.

148 changes: 81 additions & 67 deletions _sources/extensions.ipynb

Large diffs are not rendered by default.

116 changes: 65 additions & 51 deletions _sources/formatting.ipynb

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions _sources/html_export.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "8eb7fb69",
"id": "95de48c4",
"metadata": {},
"source": [
"# HTML export\n",
Expand All @@ -13,7 +13,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "526c91aa",
"id": "b3b6e772",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
"id": "93017afc",
"id": "5c73722d",
"metadata": {},
"source": [
"You can then save the `html` variable to a text file (note: if you're writing an HTML application, you could consider using [Shiny](shiny.md) or [Streamlit](streamlit.md) instead), or print it:"
Expand All @@ -37,7 +37,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "788f69a1",
"id": "83aa67f4",
"metadata": {
"tags": [
"scroll-output"
Expand All @@ -48,7 +48,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"<table id=\"itables_e47e3e40_d42c_479f_b0c8_b0bbe188f37b\" class=\"display nowrap\" data-quarto-disable-processing=\"true\" style=\"table-layout:auto;width:auto;margin:auto;caption-side:bottom\">\n",
"<table id=\"itables_f8115103_a9d5_4824_b79b_24c521fafb46\" class=\"display nowrap\" data-quarto-disable-processing=\"true\" style=\"table-layout:auto;width:auto;margin:auto;caption-side:bottom\">\n",
"<thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
Expand All @@ -69,7 +69,7 @@
" </thead><tbody><tr>\n",
"<td style=\"vertical-align:middle; text-align:left\">\n",
"<div>\n",
"Loading ITables v2.1.4 from the internet...\n",
"Loading ITables v2.1.5-dev from the internet...\n",
"(need <a href=https://mwouts.github.io/itables/troubleshooting.html>help</a>?)</td>\n",
"</div>\n",
"</tr></tbody>\n",
Expand All @@ -79,7 +79,7 @@
"<script type=\"module\">\n",
" import {DataTable, jQuery as $} from 'https://www.unpkg.com/[email protected]/dt_bundle.js';\n",
"\n",
" document.querySelectorAll(\"#itables_e47e3e40_d42c_479f_b0c8_b0bbe188f37b:not(.dataTable)\").forEach(table => {\n",
" document.querySelectorAll(\"#itables_f8115103_a9d5_4824_b79b_24c521fafb46:not(.dataTable)\").forEach(table => {\n",
" // Define the table data\n",
" const data = [[\"AW\", \"Latin America & Caribbean \", \"Aruba\", \"Oranjestad\", -70.0167, 12.5167], [\"AF\", \"South Asia\", \"Afghanistan\", \"Kabul\", 69.1761, 34.5228], [\"AO\", \"Sub-Saharan Africa \", \"Angola\", \"Luanda\", 13.242, -8.81155]];\n",
"\n",
Expand All @@ -101,7 +101,7 @@
},
{
"cell_type": "markdown",
"id": "5e65ed05",
"id": "e8d8f6df",
"metadata": {},
"source": [
"or display it, like `show` does:"
Expand All @@ -110,13 +110,13 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "debf9f6a",
"id": "057303f5",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table id=\"itables_e47e3e40_d42c_479f_b0c8_b0bbe188f37b\" class=\"display nowrap\" data-quarto-disable-processing=\"true\" style=\"table-layout:auto;width:auto;margin:auto;caption-side:bottom\">\n",
"<table id=\"itables_f8115103_a9d5_4824_b79b_24c521fafb46\" class=\"display nowrap\" data-quarto-disable-processing=\"true\" style=\"table-layout:auto;width:auto;margin:auto;caption-side:bottom\">\n",
"<thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
Expand All @@ -137,7 +137,7 @@
" </thead><tbody><tr>\n",
"<td style=\"vertical-align:middle; text-align:left\">\n",
"<div>\n",
"Loading ITables v2.1.4 from the internet...\n",
"Loading ITables v2.1.5-dev from the internet...\n",
"(need <a href=https://mwouts.github.io/itables/troubleshooting.html>help</a>?)</td>\n",
"</div>\n",
"</tr></tbody>\n",
Expand All @@ -147,7 +147,7 @@
"<script type=\"module\">\n",
" import {DataTable, jQuery as $} from 'https://www.unpkg.com/[email protected]/dt_bundle.js';\n",
"\n",
" document.querySelectorAll(\"#itables_e47e3e40_d42c_479f_b0c8_b0bbe188f37b:not(.dataTable)\").forEach(table => {\n",
" document.querySelectorAll(\"#itables_f8115103_a9d5_4824_b79b_24c521fafb46:not(.dataTable)\").forEach(table => {\n",
" // Define the table data\n",
" const data = [[\"AW\", \"Latin America & Caribbean \", \"Aruba\", \"Oranjestad\", -70.0167, 12.5167], [\"AF\", \"South Asia\", \"Afghanistan\", \"Kabul\", 69.1761, 34.5228], [\"AO\", \"Sub-Saharan Africa \", \"Angola\", \"Luanda\", 13.242, -8.81155]];\n",
"\n",
Expand Down
958 changes: 486 additions & 472 deletions _sources/pandas_style.ipynb

Large diffs are not rendered by default.

310 changes: 162 additions & 148 deletions _sources/polars_dataframes.ipynb

Large diffs are not rendered by default.

60 changes: 37 additions & 23 deletions _sources/quick_start.ipynb

Large diffs are not rendered by default.

334 changes: 174 additions & 160 deletions _sources/sample_dataframes.ipynb

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions _sources/troubleshooting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "ef6d7f04",
"id": "472692dc",
"metadata": {},
"source": [
"# Troubleshooting\n",
Expand All @@ -13,7 +13,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "18e844bd",
"id": "cb9a30f1",
"metadata": {
"tags": [
"hide-input"
Expand All @@ -23,7 +23,7 @@
{
"data": {
"text/html": [
"<table id=\"itables_6e4be22e_708e_4243_aa7b_08abb2febeff\" class=\"display nowrap\" data-quarto-disable-processing=\"true\" style=\"table-layout:auto;width:auto;margin:auto;caption-side:bottom\">\n",
"<table id=\"itables_69d68d76_9c68_4473_9c30_0bd9ff658687\" class=\"display nowrap\" data-quarto-disable-processing=\"true\" style=\"table-layout:auto;width:auto;margin:auto;caption-side:bottom\">\n",
"<caption style=\"caption-side: bottom\">A table that does not load, due to <code>init_notebook_mode</code><br>not being called in this document</caption><thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
Expand Down Expand Up @@ -123,16 +123,16 @@
"</a>\n",
"</div>\n",
"<div>\n",
"Loading ITables v2.1.4 from the <code>init_notebook_mode</code> cell...\n",
"Loading ITables v2.1.5-dev from the <code>init_notebook_mode</code> cell...\n",
"(need <a href=https://mwouts.github.io/itables/troubleshooting.html>help</a>?)</td>\n",
"</div>\n",
"</tr></tbody>\n",
"\n",
"</table>\n",
"<script type=\"module\">\n",
" const { DataTable, jQuery: $ } = await import(window._datatables_src_for_itables_2_1_4);\n",
" const { DataTable, jQuery: $ } = await import(window._datatables_src_for_itables_2_1_5_dev);\n",
"\n",
" document.querySelectorAll(\"#itables_6e4be22e_708e_4243_aa7b_08abb2febeff:not(.dataTable)\").forEach(table => {\n",
" document.querySelectorAll(\"#itables_69d68d76_9c68_4473_9c30_0bd9ff658687:not(.dataTable)\").forEach(table => {\n",
" // Define the table data\n",
" const data = [];\n",
"\n",
Expand Down Expand Up @@ -169,7 +169,7 @@
},
{
"cell_type": "markdown",
"id": "e76d0b76",
"id": "21b5b2a4",
"metadata": {},
"source": [
"If a table says \"Loading...\" forever, then maybe\n",
Expand Down
155 changes: 85 additions & 70 deletions advanced_parameters.html

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
<li class="toctree-l1"><a class="reference internal" href="pandas_style.html">Using Pandas Style</a></li>
<li class="toctree-l1"><a class="reference internal" href="extensions.html">Download Buttons and Other Extensions</a></li>
<li class="toctree-l1"><a class="reference internal" href="custom_extensions.html">Custom Extensions</a></li>
<li class="toctree-l1"><a class="reference internal" href="dark_mode.html">Dark Themes</a></li>
<li class="toctree-l1"><a class="reference internal" href="quarto.html">Quarto</a></li>
<li class="toctree-l1"><a class="reference internal" href="downsampling.html">Downsampling</a></li>
<li class="toctree-l1"><a class="reference internal" href="references.html">References</a></li>
Expand Down Expand Up @@ -423,7 +424,7 @@ <h2> Contents </h2>
</div>
<nav aria-label="Page">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#dev-2024-08">2.1.5-dev (2024-08-??)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#dev-2024-09">2.1.5-dev (2024-09-??)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id1">2.1.4 (2024-07-03)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id2">2.1.3 (2024-06-22)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id3">2.1.2 (2024-06-19)</a></li>
Expand Down Expand Up @@ -489,12 +490,14 @@ <h2> Contents </h2>

<section class="tex2jax_ignore mathjax_ignore" id="itables-changelog">
<h1>ITables ChangeLog<a class="headerlink" href="#itables-changelog" title="Link to this heading">#</a></h1>
<section id="dev-2024-08">
<h2>2.1.5-dev (2024-08-??)<a class="headerlink" href="#dev-2024-08" title="Link to this heading">#</a></h2>
<section id="dev-2024-09">
<h2>2.1.5-dev (2024-09-??)<a class="headerlink" href="#dev-2024-09" title="Link to this heading">#</a></h2>
<p><strong>Fixed</strong></p>
<ul class="simple">
<li><p>We have improved the function that determines whether a dark theme is being used (<a class="reference external" href="https://github.com/mwouts/itables/issues/294">#294</a>)</p></li>
<li><p>We have adjusted the generation of the Polars sample dataframes to fix the CI (<a class="reference external" href="https://github.com/pola-rs/polars/issues/18130">Polars-18130</a>)</p></li>
<li><p>The test on the Shiny app fallbacks to <code class="docutils literal notranslate"><span class="pre">ui.nav_panel</span></code> when <code class="docutils literal notranslate"><span class="pre">ui.nav</span></code> is not available</p></li>
<li><p>The dependencies of the streamlit component have been updated (<a class="reference external" href="https://github.com/mwouts/itables/issues/313">#313</a>, <a class="reference external" href="https://github.com/mwouts/itables/issues/315">#315</a>)</p></li>
</ul>
</section>
<section id="id1">
Expand Down Expand Up @@ -1099,7 +1102,7 @@ <h2>0.1.0 (2019-04-23)<a class="headerlink" href="#id52" title="Link to this hea
</div>
<nav class="bd-toc-nav page-toc">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#dev-2024-08">2.1.5-dev (2024-08-??)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#dev-2024-09">2.1.5-dev (2024-09-??)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id1">2.1.4 (2024-07-03)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id2">2.1.3 (2024-06-22)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#id3">2.1.2 (2024-06-19)</a></li>
Expand Down
1 change: 1 addition & 0 deletions contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
<li class="toctree-l1"><a class="reference internal" href="pandas_style.html">Using Pandas Style</a></li>
<li class="toctree-l1"><a class="reference internal" href="extensions.html">Download Buttons and Other Extensions</a></li>
<li class="toctree-l1"><a class="reference internal" href="custom_extensions.html">Custom Extensions</a></li>
<li class="toctree-l1"><a class="reference internal" href="dark_mode.html">Dark Themes</a></li>
<li class="toctree-l1"><a class="reference internal" href="quarto.html">Quarto</a></li>
<li class="toctree-l1"><a class="reference internal" href="downsampling.html">Downsampling</a></li>
<li class="toctree-l1"><a class="reference internal" href="references.html">References</a></li>
Expand Down
103 changes: 59 additions & 44 deletions custom_css.html

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions custom_extensions.html

Large diffs are not rendered by default.

Loading

0 comments on commit 13814c4

Please sign in to comment.