From f5a1d36b5818d3c51714c25a35fd02b4f7700426 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Thu, 23 May 2024 15:56:59 -0600 Subject: [PATCH 1/7] Remove sphinx pin --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] From ba5bc251254ec76dfcaef29d8a1790ad617f0bbc Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 24 May 2024 09:08:18 -0600 Subject: [PATCH 2/7] Update example_template.py --- examples/example_template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From cb0f85872ca5c5aae29bf48f0b3e44aaf3a44e1a Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 24 May 2024 09:14:16 -0600 Subject: [PATCH 3/7] Update example_template_subsection.py --- examples/section/example_template_subsection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 932b16661cf96b098d57977a863b202ef441d67b Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 24 May 2024 09:23:34 -0600 Subject: [PATCH 4/7] Update conf.py --- docs/conf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 514b111e..7c067c3f 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 @@ -88,14 +88,14 @@ ] sphinx_gallery_conf = { "filename_pattern": "^((?!skip_).)*$", - "examples_dirs": str(Path("..") / Path("examples")), + "examples_dirs": Path("..") / Path("examples"), "subsection_order": ExplicitOrder( [ "../examples/section", ] ), - "within_subsection_order": ExampleTitleSortKey, - "gallery_dirs": str(Path("generated") / Path("gallery")), + "within_subsection_order": "ExampleTitleSortKey", + "gallery_dirs": Path("generated") / Path("gallery"), "default_thumb_file": SVG_ICON, "abort_on_example_error": False, "plot_gallery": "True", From 9aaae8935e743fdfa4cf16499423275d7369af2f Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 24 May 2024 09:40:32 -0600 Subject: [PATCH 5/7] Update conf.py --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 7c067c3f..73ccff26 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -88,14 +88,14 @@ ] sphinx_gallery_conf = { "filename_pattern": "^((?!skip_).)*$", - "examples_dirs": Path("..") / Path("examples"), + "examples_dirs": str(Path("..") / Path("examples")), "subsection_order": ExplicitOrder( [ "../examples/section", ] ), "within_subsection_order": "ExampleTitleSortKey", - "gallery_dirs": Path("generated") / Path("gallery"), + "gallery_dirs": str(Path("generated") / Path("gallery")), "default_thumb_file": SVG_ICON, "abort_on_example_error": False, "plot_gallery": "True", From 2d0daf1db297b675fae1f6db2678f28b1a91477e Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 24 May 2024 09:49:28 -0600 Subject: [PATCH 6/7] lighthouse --- .github/workflows/lighthouse.yml | 12 ++++++++++++ .pre-commit-config.yaml | 4 ++-- lighthouserc.js | 7 +++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/lighthouse.yml create mode 100644 lighthouserc.js diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml new file mode 100644 index 00000000..daad5d24 --- /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/" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ebac47a8..099719fd 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"] @@ -42,7 +42,7 @@ repos: args: ["--fix=lf"] - id: trailing-whitespace - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell args: ["--write-changes"] diff --git a/lighthouserc.js b/lighthouserc.js new file mode 100644 index 00000000..79c1d872 --- /dev/null +++ b/lighthouserc.js @@ -0,0 +1,7 @@ +module.exports = { + ci: { + upload: { + target: "temporary-public-storage", + }, + }, +}; From b533c5ee2597ee9938696ddb85225f342a953927 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Fri, 24 May 2024 09:59:53 -0600 Subject: [PATCH 7/7] yolo --- .github/workflows/lighthouse.yml | 2 +- .pre-commit-config.yaml | 7 +++---- README.md | 4 ++-- _typos.toml | 24 ++++++++++++++++++++++++ docs/subsections.rst | 2 +- docs/subsections_toc.rst | 2 +- lighthouserc.js | 7 ------- tox.ini | 2 +- 8 files changed, 33 insertions(+), 17 deletions(-) create mode 100644 _typos.toml delete mode 100644 lighthouserc.js diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index daad5d24..aca32848 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -9,4 +9,4 @@ jobs: - name: Lighthouse uses: foo-software/lighthouse-check-action@master with: - urls: "https://docs.sunpy.org/en/stable/" + 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 099719fd..38c58c7a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,8 +41,7 @@ repos: - id: mixed-line-ending args: ["--fix=lf"] - id: trailing-whitespace - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + - 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/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/lighthouserc.js b/lighthouserc.js deleted file mode 100644 index 79c1d872..00000000 --- a/lighthouserc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - ci: { - upload: { - target: "temporary-public-storage", - }, - }, -}; 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