Repository: banesullivan/localtileserver
Pull request #234 (2025-01-01 21:55:45)

Bump pydata-sphinx-theme from 0.16.0 to 0.16.1
Bumps [pydata-sphinx-theme](https://github.com/pydata/pydata-sphinx-theme) from 0.16.0 to 0.16.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/pydata/pydata-sphinx-theme/releases">pydata-sphinx-theme's releases</a>.</em></p>
<blockquote>
<h2>v0.16.1</h2>
<h2>Enhancements</h2>
<ul>
<li>Stop moving the Read the Docs version switcher into the sidebar by <a href="https://github.com/gabalafou"><code>@​gabalafou</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2034">pydata/pydata-sphinx-theme#2034</a></li>
<li>When using the copybutton in code blocks, exclude copying the prompt by <a href="https://github.com/stevepiercy"><code>@​stevepiercy</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2036">pydata/pydata-sphinx-theme#2036</a></li>
<li>Remove hover striping from all but .dataframe tables by <a href="https://github.com/gabalafou"><code>@​gabalafou</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2059">pydata/pydata-sphinx-theme#2059</a></li>
<li>Higher contrast table hover stripe (light mode) by <a href="https://github.com/gabalafou"><code>@​gabalafou</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2062">pydata/pydata-sphinx-theme#2062</a></li>
<li>Match Sphinx toggle button and Sphinx Design hover and focus styles by <a href="https://github.com/gabalafou"><code>@​gabalafou</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2061">pydata/pydata-sphinx-theme#2061</a></li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>Remove mention of <code>sidebarwidth</code> in config file by <a href="https://github.com/Carreau"><code>@​Carreau</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2031">pydata/pydata-sphinx-theme#2031</a></li>
<li>Fix translator_setup: undefined default_translator_class for linkcheck builder by <a href="https://github.com/lang-m"><code>@​lang-m</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2029">pydata/pydata-sphinx-theme#2029</a></li>
<li>BUG - Fix i18n files and compilation for distribution by <a href="https://github.com/trallard"><code>@​trallard</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2042">pydata/pydata-sphinx-theme#2042</a></li>
<li>Fix colour variables by <a href="https://github.com/trallard"><code>@​trallard</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2058">pydata/pydata-sphinx-theme#2058</a></li>
<li>Import Bootstrap after importing our variable overrides by <a href="https://github.com/gabalafou"><code>@​gabalafou</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2066">pydata/pydata-sphinx-theme#2066</a></li>
<li>Fix wrong switcher JSON loaded for dev docs by <a href="https://github.com/drammock"><code>@​drammock</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2048">pydata/pydata-sphinx-theme#2048</a></li>
<li>Restore focus ring Sphinx Design dropdowns by <a href="https://github.com/gabalafou"><code>@​gabalafou</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2060">pydata/pydata-sphinx-theme#2060</a></li>
</ul>
<h2>Maintenance and Upkeep</h2>
<ul>
<li>DEV -  Go back to dev - post-release by <a href="https://github.com/trallard"><code>@​trallard</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2019">pydata/pydata-sphinx-theme#2019</a></li>
<li>Fix preferred-version in JSON by <a href="https://github.com/drammock"><code>@​drammock</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2028">pydata/pydata-sphinx-theme#2028</a></li>
</ul>
<h2>Documentation</h2>
<ul>
<li>DOC: Fix link to custom CSS example by <a href="https://github.com/pllim"><code>@​pllim</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2025">pydata/pydata-sphinx-theme#2025</a></li>
<li>Update accessibility docs by <a href="https://github.com/gabalafou"><code>@​gabalafou</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2039">pydata/pydata-sphinx-theme#2039</a></li>
<li>DOC - Add design system documentation by <a href="https://github.com/trallard"><code>@​trallard</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2046">pydata/pydata-sphinx-theme#2046</a></li>
<li>Added itom to projects using this theme by <a href="https://github.com/photoniker"><code>@​photoniker</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2037">pydata/pydata-sphinx-theme#2037</a></li>
<li>MAINT - update from Twitter -&gt; X by <a href="https://github.com/partev"><code>@​partev</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2052">pydata/pydata-sphinx-theme#2052</a></li>
<li>DOC - Update documentation regarding formatting files by <a href="https://github.com/trallard"><code>@​trallard</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2057">pydata/pydata-sphinx-theme#2057</a></li>
</ul>
<h2>Deprecations and Upgrades</h2>
<ul>
<li>MAINT - Bump node version (22.x) by <a href="https://github.com/trallard"><code>@​trallard</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/1993">pydata/pydata-sphinx-theme#1993</a></li>
</ul>
<h2>Translations and internationalization</h2>
<ul>
<li>Updates for file src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po in ca by <a href="https://github.com/transifex-integration"><code>@​transifex-integration</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2021">pydata/pydata-sphinx-theme#2021</a></li>
<li>i18n - Update localisation files by <a href="https://github.com/trallard"><code>@​trallard</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2072">pydata/pydata-sphinx-theme#2072</a></li>
<li>Updates for file src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po in fr by <a href="https://github.com/transifex-integration"><code>@​transifex-integration</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2075">pydata/pydata-sphinx-theme#2075</a></li>
<li>Updates for file src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po in es by <a href="https://github.com/transifex-integration"><code>@​transifex-integration</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2079">pydata/pydata-sphinx-theme#2079</a></li>
</ul>
<h2>Miscellaneous</h2>
<ul>
<li>[pre-commit.ci] pre-commit autoupdate hooks by <a href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2005">pydata/pydata-sphinx-theme#2005</a></li>
<li>LINT - Run updated pre-commit hooks by <a href="https://github.com/trallard"><code>@​trallard</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2049">pydata/pydata-sphinx-theme#2049</a></li>
<li>~Revert &quot;LINT - Run updated pre-commit hooks (<a href="https://redirect.github.com/pydata/pydata-sphinx-theme/issues/2049">#2049</a>)&quot; by <a href="https://github.com/drammock"><code>@​drammock</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2054">pydata/pydata-sphinx-theme#2054</a></li>
<li>Redo precommit changes by <a href="https://github.com/drammock"><code>@​drammock</code></a> in <a href="https://redirect.github.com/pydata/pydata-sphinx-theme/pull/2055">pydata/pydata-sphinx-theme#2055</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pydata/pydata-sphinx-theme/commit/c47786b993c85f0f442cc8d6e6b55e5d4e92b6b9"><code>c47786b</code></a> Bump: 0.16.1rc0 -&gt; 0.16.1</li>
<li><a href="https://github.com/pydata/pydata-sphinx-theme/commit/e1904a017b083b4980b360c2a99020757f9ff5d6"><code>e1904a0</code></a> Updates for file src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po in e...</li>
<li><a href="https://github.com/pydata/pydata-sphinx-theme/commit/42741052becb690380a712ae7d7bc5d5c1c9f34e"><code>4274105</code></a> Updates for file src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po in f...</li>
<li><a href="https://github.com/pydata/pydata-sphinx-theme/commit/01731d0cc57768b9eff1c97f38909932ecd7e7d1"><code>01731d0</code></a> bump: 0.16.0 -&gt; 0.16.1rc0</li>
<li><a href="https://github.com/pydata/pydata-sphinx-theme/commit/7de38e5deaf3dc56781c78654a2d747b257078ad"><code>7de38e5</code></a> i18n - Update localisation files (<a href="https://redirect.github.com/pydata/pydata-sphinx-theme/issues/2072">#2072</a>)</li>
<li><a href="https://github.com/pydata/pydata-sphinx-theme/commit/85aba79501bfe0cb749a30b2acc7a36ffcfc7717"><code>85aba79</code></a> Match Sphinx toggle button and Sphinx Design hover and focus styles (<a href="https://redirect.github.com/pydata/pydata-sphinx-theme/issues/2061">#2061</a>)</li>
<li><a href="https://github.com/pydata/pydata-sphinx-theme/commit/933ce14d08f20e220b6fb33df0884b91b128021b"><code>933ce14</code></a> Import Bootstrap after importing our variable overrides (<a href="https://redirect.github.com/pydata/pydata-sphinx-theme/issues/2066">#2066</a>)</li>
<li><a href="https://github.com/pydata/pydata-sphinx-theme/commit/6cc8ddf5c58e6ff00823e5a6f58010a95c3d42da"><code>6cc8ddf</code></a> Higher contrast table hover stripe (light mode) (<a href="https://redirect.github.com/pydata/pydata-sphinx-theme/issues/2062">#2062</a>)</li>
<li><a href="https://github.com/pydata/pydata-sphinx-theme/commit/bdd253ed0ad2dede6afb3d7cc9ef5b4b669f9631"><code>bdd253e</code></a> Restore focus ring Sphinx Design dropdowns (<a href="https://redirect.github.com/pydata/pydata-sphinx-theme/issues/2060">#2060</a>)</li>
<li><a href="https://github.com/pydata/pydata-sphinx-theme/commit/0ca99135b84e2a623382cf67b70d1e4bd96b2152"><code>0ca9913</code></a> DOC - Update documentation regarding formatting files (<a href="https://redirect.github.com/pydata/pydata-sphinx-theme/issues/2057">#2057</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/pydata/pydata-sphinx-theme/compare/v0.16.0...v0.16.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pydata-sphinx-theme&package-manager=pip&previous-version=0.16.0&new-version=0.16.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/localtileserver/tiler/data/__init__.py b/localtileserver/tiler/data/__init__.py
index abbd5a2..7da0690 100644
--- a/localtileserver/tiler/data/__init__.py
+++ b/localtileserver/tiler/data/__init__.py
@@ -24,17 +24,15 @@ def get_data_path(name):
 
 
 def get_sf_bay_url():
-    # Non-COG: https://data.kitware.com/#item/60747d792fa25629b9a79538
-    # COG: https://data.kitware.com/#item/626854a04acac99f42126a72
-    return "https://data.kitware.com/api/v1/file/626854a14acac99f42126a74/download"
+    return "https://localtileserver.s3.us-west-2.amazonaws.com/examples/TC_NG_SFBay_US_Geo_COG.tif"
 
 
 def get_elevation_us_url():
-    return "https://data.kitware.com/api/v1/file/5dbc4f66e3566bda4b4ed3af/download"
+    return "https://localtileserver.s3.us-west-2.amazonaws.com/examples/elevation_cog.tif"
 
 
 def get_oam2_url():
-    return "https://oin-hotosm.s3.amazonaws.com/59c66c5223c8440011d7b1e4/0/7ad397c0-bba2-4f98-a08a-931ec3a6e943.tif"
+    return "https://localtileserver.s3.us-west-2.amazonaws.com/examples/oam2.tif"
 
 
 def convert_dropbox_url(url: str):
@@ -47,4 +45,4 @@ def clean_url(url: str):
 
 
 def get_co_elevation_url():
-    return "https://data.kitware.com/api/v1/file/62e4408fbddec9d0c4443918/download"
+    return "https://localtileserver.s3.us-west-2.amazonaws.com/examples/co_elevation.tif"
diff --git a/localtileserver/tiler/palettes.py b/localtileserver/tiler/palettes.py
index 2b24efd..d1f6528 100644
--- a/localtileserver/tiler/palettes.py
+++ b/localtileserver/tiler/palettes.py
@@ -1,43 +1,20 @@
 import logging
 
-try:
-    import cmocean  # noqa
-except ImportError:
-    pass
-try:
-    import colorcet  # noqa
-except ImportError:
-    pass
+from rio_tiler.colormap import cmap as RIO_CMAPS
 
 logger = logging.getLogger(__name__)
 
 
-def is_mpl_cmap(name: str):
-    """This will silently fail if matplotlib is not installed."""
-    try:
-        import matplotlib
-
-        matplotlib.colormaps.get_cmap(name)
-        return True
-    except ImportError:  # pragma: no cover
-        logger.error("Install matplotlib for additional colormap choices.")
-    except ValueError:
-        pass
-    return False
+def is_rio_cmap(name: str):
+    """Check whether cmap is supported by rio-tiler."""
+    return name in RIO_CMAPS.data.keys()
 
 
 def palette_valid_or_raise(name: str):
-    if not is_mpl_cmap(name):
-        raise ValueError(f"Please use a valid matplotlib colormap name. Invalid: {name}")
+    if not is_rio_cmap(name):
+        raise ValueError(f"Please use a valid rio-tiler registered colormap name. Invalid: {name}")
 
 
 def get_palettes():
     """List of available palettes."""
-    cmaps = {}
-    try:
-        import matplotlib.pyplot
-
-        cmaps["matplotlib"] = list(matplotlib.pyplot.colormaps())
-    except ImportError:  # pragma: no cover
-        logger.error("Install matplotlib for additional colormap choices.")
-    return cmaps
+    return {"matplotlib": list(RIO_CMAPS.data.keys())}
diff --git a/localtileserver/web/rest.py b/localtileserver/web/rest.py
index 196316e..348624c 100644
--- a/localtileserver/web/rest.py
+++ b/localtileserver/web/rest.py
@@ -40,7 +40,7 @@ BASE_PARAMS = {
         "description": "The local path or URL to the image to use.",
         "in": "query",
         "type": "str",
-        "example": "https://data.kitware.com/api/v1/file/60747d792fa25629b9a79565/download",
+        "example": "https://localtileserver.s3.us-west-2.amazonaws.com/examples/TC_NG_SFBay_US_Geo.tif",
     },
 }
 STYLE_PARAMS = {
diff --git a/pyproject.toml b/pyproject.toml
index f869618..8d8507d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'
 
 [project]
 name = "localtileserver"
-version = "0.10.5"
+version = "0.10.6"
 description = "Locally serve geospatial raster tiles in the Slippy Map standard."
 readme = "README.md"
 authors = [
diff --git a/requirements_doc.txt b/requirements_doc.txt
index 0035fef..4e1769d 100644
--- a/requirements_doc.txt
+++ b/requirements_doc.txt
@@ -1,6 +1,6 @@
 bokeh
 jupyter-sphinx
-pydata-sphinx-theme==0.16.0
+pydata-sphinx-theme==0.16.1
 sphinx==7.3.7
 sphinx-copybutton
 sphinx-notfound-page


Test patch:
diff --git a/tests/test_app.py b/tests/test_app.py
index ae374ac..3b9a655 100644
--- a/tests/test_app.py
+++ b/tests/test_app.py
@@ -41,9 +41,6 @@ def test_list_palettes(flask_client):
 def test_cog_validate_endpoint(flask_client, remote_file_url):
     r = flask_client.get(f"/api/validate?filename={remote_file_url}")
     assert r.status_code == 200
-    non_cog = "https://data.kitware.com/api/v1/file/60747d792fa25629b9a79565/download"
-    r = flask_client.get(f"/api/validate?filename={non_cog}")
-    assert r.status_code == 415
 
 
 def test_run_app():
diff --git a/tests/test_utilities.py b/tests/test_utilities.py
index 6c07552..0e093eb 100644
--- a/tests/test_utilities.py
+++ b/tests/test_utilities.py
@@ -1,7 +1,7 @@
 import pytest
 
 from localtileserver import Report, TileClient
-from localtileserver.tiler.palettes import get_palettes, is_mpl_cmap
+from localtileserver.tiler.palettes import get_palettes, is_rio_cmap
 from localtileserver.validate import validate_cog
 
 has_mpl = False
@@ -14,14 +14,14 @@ except ImportError:
 
 
 def test_is_valid_palette_name():
-    assert is_mpl_cmap("viridis")
-    assert not is_mpl_cmap("foobar")
+    assert is_rio_cmap("viridis")
+    assert not is_rio_cmap("foobar")
 
 
 @pytest.mark.skipif(not has_mpl, reason="matplotlib not installed.")
 def test_mpl_colormaps():
-    assert is_mpl_cmap("viridis")
-    assert is_mpl_cmap("jet")
+    assert is_rio_cmap("viridis")
+    assert is_rio_cmap("jet")
 
 
 def test_report():