diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml new file mode 100644 index 00000000..aca32848 --- /dev/null +++ b/.github/workflows/lighthouse.yml @@ -0,0 +1,12 @@ +name: Lighthouse +on: [pull_request] + +jobs: + lighthouse: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Lighthouse + uses: foo-software/lighthouse-check-action@master + with: + urls: "https://docs.sunpy.org/en/stable/,https://docs.sunpy.org/projects/sunpy-sphinx-theme/latest/" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ebac47a8..38c58c7a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ ci: autoupdate_schedule: "quarterly" repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.4.3" + rev: "v0.4.5" hooks: - id: ruff args: ["--fix", "--unsafe-fixes"] @@ -41,8 +41,7 @@ repos: - id: mixed-line-ending args: ["--fix=lf"] - id: trailing-whitespace - - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + - repo: https://github.com/crate-ci/typos + rev: v1.21.0 hooks: - - id: codespell - args: ["--write-changes"] + - id: typos diff --git a/README.md b/README.md index f0773926..81cde515 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,6 @@ This repository contains the sphinx theme used by The Sunpy Project for all online resources. -This theme is a derivative of the excellent [pydata-sphinx-theme](https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html), customised to present a uniform navigation over all the projects. +This theme is a derivative of the excellent [pydata-sphinx-theme](https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html), customized to present a uniform navigation over all the projects. -For more information see the [documentation](https://sunpy-sphinx-theme.readthedocs.io/). +For more information see the [documentation](https://docs.sunpy.org/projects/sunpy-sphinx-theme/latest/). diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 00000000..49033a54 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,24 @@ +default.extend-ignore-identifiers-re = [ + "ANDed", # ANDed + "arange", + "iy1", + "iy2", + "EIS", + "eis", + "EIT", + "eit", + "HAE", + "hsi", + "Hsi", + "nd", + "NDData", + "alog", + "alog10", + "FOVs", + "FOV", + # HEK + "OT", + "ot", + # Coords, + "pn", +] diff --git a/docs/conf.py b/docs/conf.py index 514b111e..73ccff26 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,7 +7,7 @@ import sys from pathlib import Path -from sphinx_gallery.sorting import ExampleTitleSortKey, ExplicitOrder +from sphinx_gallery.sorting import ExplicitOrder from sunpy_sphinx_theme import SVG_ICON # Add the test package to the path so we can import it for automodapi @@ -94,7 +94,7 @@ "../examples/section", ] ), - "within_subsection_order": ExampleTitleSortKey, + "within_subsection_order": "ExampleTitleSortKey", "gallery_dirs": str(Path("generated") / Path("gallery")), "default_thumb_file": SVG_ICON, "abort_on_example_error": False, diff --git a/docs/subsections.rst b/docs/subsections.rst index b43663ee..ce97859d 100644 --- a/docs/subsections.rst +++ b/docs/subsections.rst @@ -19,7 +19,7 @@ Aliquam erat volutpat. Pellentesque lorem nisl, faucibus eu augue at, gravida lu Cdefghijklmnopqrstuvwxyz ======================== -Etiam venenatis erat eget orci finibus bibendum. Nulla pretium sollicitudin velit, ut consequat massa facilisis sed. Suspendisse blandit justo a mauris faucibus molestie. Integer id elit auctor ipsum venenatis aliquet. Nulla facilisi. In nulla tortor, vehicula vel blandit in, molestie sit amet tellus. Nulla auctor vitae velit id porttitor. Nullam commodo mattis semper. +Etiam venenatis erat eget orci finibus bibendum. Nulla pretium sollicitudin velit, ut consequat massa facilisis sed. Suspendisse blandit justo a mauris faucibus molestie. Integer id elit auctor ipsum venenatis aliquet. Nulla facilities. In nulla tortor, vehicula vel blandit in, molestie sit amet tellus. Nulla auctor vitae velit id porttitor. Nullam commodo mattis semper. Defghijklmnopqrstuvwxyz ----------------------- diff --git a/docs/subsections_toc.rst b/docs/subsections_toc.rst index 3b18356b..fb89b185 100644 --- a/docs/subsections_toc.rst +++ b/docs/subsections_toc.rst @@ -22,7 +22,7 @@ Aliquam erat volutpat. Pellentesque lorem nisl, faucibus eu augue at, gravida lu Cdefghijklmnopqrstuvwxyz ======================== -Etiam venenatis erat eget orci finibus bibendum. Nulla pretium sollicitudin velit, ut consequat massa facilisis sed. Suspendisse blandit justo a mauris faucibus molestie. Integer id elit auctor ipsum venenatis aliquet. Nulla facilisi. In nulla tortor, vehicula vel blandit in, molestie sit amet tellus. Nulla auctor vitae velit id porttitor. Nullam commodo mattis semper. +Etiam venenatis erat eget orci finibus bibendum. Nulla pretium sollicitudin velit, ut consequat massa facilisis sed. Suspendisse blandit justo a mauris faucibus molestie. Integer id elit auctor ipsum venenatis aliquet. Nulla facilities. In nulla tortor, vehicula vel blandit in, molestie sit amet tellus. Nulla auctor vitae velit id porttitor. Nullam commodo mattis semper. Defghijklmnopqrstuvwxyz ----------------------- diff --git a/examples/example_template.py b/examples/example_template.py index 18be2670..f596f613 100644 --- a/examples/example_template.py +++ b/examples/example_template.py @@ -52,9 +52,9 @@ # time to introduce the next code block generates 2 separate figures. plt.figure() -plt.imshow(z, cmap=plt.cm.get_cmap("hot")) +plt.imshow(z, cmap=plt.get_cmap("hot")) plt.figure() -plt.imshow(z, cmap=plt.cm.get_cmap("Spectral"), interpolation="none") +plt.imshow(z, cmap=plt.get_cmap("Spectral"), interpolation="none") ########################################################################## # There's some subtle differences between rendered html rendered comment diff --git a/examples/section/example_template_subsection.py b/examples/section/example_template_subsection.py index ac047f4f..7c8e5b5d 100644 --- a/examples/section/example_template_subsection.py +++ b/examples/section/example_template_subsection.py @@ -54,9 +54,9 @@ # time to introduce the next code block generates 2 separate figures. plt.figure() -plt.imshow(z, cmap=plt.cm.get_cmap("hot")) +plt.imshow(z, cmap=plt.get_cmap("hot")) plt.figure() -plt.imshow(z, cmap=plt.cm.get_cmap("Spectral"), interpolation="none") +plt.imshow(z, cmap=plt.get_cmap("Spectral"), interpolation="none") ########################################################################## # There's some subtle differences between rendered html rendered comment diff --git a/pyproject.toml b/pyproject.toml index 8fff9bcd..a965e5c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ requires-python = ">=3.9" dependencies = [ "pydata-sphinx-theme~=0.15.0", - "sphinx<7.3.0" + "sphinx" ] [project.optional-dependencies] diff --git a/tox.ini b/tox.ini index ab9660d5..062e9ea2 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,7 @@ pass_env = set_env = MPLBACKEND = agg SUNPY_SAMPLEDIR = {env:SUNPY_SAMPLEDIR:{toxinidir}/.tox/{envname}/sample_data/} - HIDE_PARFIVE_PROGESS = True + HIDE_PARFIVE_PROGRESS = True deps = devdeps: git+https://github.com/pydata/pydata-sphinx-theme.git