From 137a81fbab83ef2fb018d2ad870d951d5d43d52a Mon Sep 17 00:00:00 2001 From: Cadair <1391051+Cadair@users.noreply.github.com> Date: Mon, 18 Nov 2024 07:06:22 +0000 Subject: [PATCH 01/10] Automatic package template update --- .cruft.json | 2 +- .pre-commit-config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cruft.json b/.cruft.json index 1e4c883..0b49d1d 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "75f84c4adf1753af67967930c3335bc73bca9bf5", + "commit": "93422b39fbffc8a574649203a8710f00608ce831", "checkout": null, "context": { "cookiecutter": { diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1518dc2..7cfa989 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # This should be before any formatting hooks like isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.2" + rev: "v0.7.3" hooks: - id: ruff args: ["--fix"] From 722b556715a64fb46a3dc27c297ccf1263546602 Mon Sep 17 00:00:00 2001 From: Cadair <1391051+Cadair@users.noreply.github.com> Date: Mon, 25 Nov 2024 07:06:25 +0000 Subject: [PATCH 02/10] Automatic package template update --- .cruft.json | 2 +- .pre-commit-config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cruft.json b/.cruft.json index 0b49d1d..90956ce 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "93422b39fbffc8a574649203a8710f00608ce831", + "commit": "cd21e0d710513a891ed03f29e8afd6e0b9217f04", "checkout": null, "context": { "cookiecutter": { diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7cfa989..6a8919f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # This should be before any formatting hooks like isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.3" + rev: "v0.7.4" hooks: - id: ruff args: ["--fix"] From 83e469091b06b6f89220fa84ab04b4d7ed6fa641 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Wed, 18 Dec 2024 10:49:43 +0000 Subject: [PATCH 03/10] Update cruft with batchpr --- .cruft.json | 8 ++- .github/workflows/ci.yml | 12 ++-- .github/workflows/sub_package_update.yml | 2 + .pre-commit-config.yaml | 2 +- .ruff.toml | 1 - CHANGELOG.rst | 0 changelog/README.rst | 34 +++++++++++ docs/conf.py | 4 ++ docs/index.rst | 8 +++ docs/whatsnew/changelog.rst | 10 ++++ docs/whatsnew/index.rst | 12 ++++ pyproject.toml | 72 ++++++++++++++++++++++++ 12 files changed, 156 insertions(+), 9 deletions(-) create mode 100644 CHANGELOG.rst create mode 100644 changelog/README.rst create mode 100644 docs/whatsnew/changelog.rst create mode 100644 docs/whatsnew/index.rst diff --git a/.cruft.json b/.cruft.json index 90956ce..fdb40bf 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "cd21e0d710513a891ed03f29e8afd6e0b9217f04", + "commit": "c60ccf2ddc71d3cf126cea15132a15da307864f7", "checkout": null, "context": { "cookiecutter": { @@ -10,6 +10,12 @@ "author_name": "The SunPy Community", "author_email": "sunpy@googlegroups.com", "project_url": "https://sunpy.org", + "github_repo": "", + "sourcecode_url": "", + "download_url": "https://pypi.org/project/sunkit-magex", + "documentation_url": "", + "changelog_url": "", + "issue_tracker_url": "", "license": "GNU GPL v3+", "minimum_python_version": "3.10", "use_compiled_extensions": "n", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 089d5de..8aea841 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ - +# Main CI Workflow name: CI on: @@ -22,7 +22,7 @@ concurrency: jobs: core: - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: submodules: false coverage: codecov @@ -47,7 +47,7 @@ jobs: test: needs: [core, sdist_verify] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: submodules: false coverage: codecov @@ -62,7 +62,7 @@ jobs: docs: needs: [core] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: default_python: '3.12' submodules: false @@ -80,7 +80,7 @@ jobs: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Run cron CI') ) - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: default_python: '3.12' submodules: false @@ -101,7 +101,7 @@ jobs: contains(github.event.pull_request.labels.*.name, 'Run publish') ) needs: [test, docs] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 with: python-version: '3.12' test_extras: 'tests' diff --git a/.github/workflows/sub_package_update.yml b/.github/workflows/sub_package_update.yml index 0b657f2..523cca3 100644 --- a/.github/workflows/sub_package_update.yml +++ b/.github/workflows/sub_package_update.yml @@ -86,6 +86,8 @@ jobs: delete-branch: true draft: ${{ steps.cruft_update.outputs.merge_conflicts == '1' }} title: "Updates from the package template" + labels: | + No Changelog Entry Needed body: | This is an autogenerated PR, which will applies the latest changes from the [SunPy Package Template](https://github.com/sunpy/package-template). If this pull request has been opened as a draft there are conflicts which need fixing. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6a8919f..f7c49ac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # This should be before any formatting hooks like isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.4" + rev: "v0.8.3" hooks: - id: ruff args: ["--fix"] diff --git a/.ruff.toml b/.ruff.toml index 0112266..c84d0ae 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -23,7 +23,6 @@ extend-ignore = [ "UP038", # Use | in isinstance - not compatible with models and is slower # pytest (PT) "PT001", # Always use pytest.fixture() - "PT004", # Fixtures which don't return anything should have leading _ "PT023", # Always use () on pytest decorators # flake8-pie (PIE) "PIE808", # Disallow passing 0 as the first argument to range diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..e69de29 diff --git a/changelog/README.rst b/changelog/README.rst new file mode 100644 index 0000000..7d388e3 --- /dev/null +++ b/changelog/README.rst @@ -0,0 +1,34 @@ +========= +Changelog +========= + +.. note:: + + This README was adapted from the pytest changelog readme under the terms of the MIT licence. + +This directory contains "news fragments" which are short files that contain a small **ReST**-formatted text that will be added to the next ``CHANGELOG``. + +The ``CHANGELOG`` will be read by users, so this description should be aimed at SunPy users instead of describing internal changes which are only relevant to the developers. + +Make sure to use full sentences with correct case and punctuation, for example:: + + Add support for Helioprojective coordinates in `sunpy.coordinates.frames`. + +Please try to use Sphinx intersphinx using backticks. + +Each file should be named like ``.[.].rst``, where ```` is a pull request number, ``COUNTER`` is an optional number if a PR needs multiple entries with the same type and ```` is one of: + +* ``breaking``: A change which requires users to change code and is not backwards compatible. (Not to be used for removal of deprecated features.) +* ``feature``: New user facing features and any new behavior. +* ``bugfix``: Fixes a reported bug. +* ``doc``: Documentation addition or improvement, like rewording an entire session or adding missing docs. +* ``deprecation``: Feature deprecation +* ``removal``: Feature removal. +* ``trivial``: A change which has no user facing effect or is tiny change. + +So for example: ``123.feature.rst``, ``456.bugfix.rst``. + +If you are unsure what pull request type to use, don't hesitate to ask in your PR. + +Note that the ``towncrier`` tool will automatically reflow your text, so it will work best if you stick to a single paragraph, but multiple sentences and links are OK and encouraged. +You can install ``towncrier`` and then run ``towncrier --draft`` if you want to get a preview of how your change will look in the final release notes. diff --git a/docs/conf.py b/docs/conf.py index 87c2bd4..0c076bd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -46,7 +46,11 @@ "sphinx.ext.mathjax", "sphinx_automodapi.automodapi", "sphinx_automodapi.smart_resolver", +<<<<<<< 'sphinx_gallery.gen_gallery', +======= + "sphinx_changelog", +>>>>>>> ] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/index.rst b/docs/index.rst index 577afb9..573af54 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,6 +8,14 @@ This is the documentation for sunkit-magex. :maxdepth: 2 :caption: Contents: +<<<<<<< +======= + whatsnew/index + +Indices and tables +================== + +>>>>>>> installing heritage generated/gallery/index diff --git a/docs/whatsnew/changelog.rst b/docs/whatsnew/changelog.rst new file mode 100644 index 0000000..a3678c4 --- /dev/null +++ b/docs/whatsnew/changelog.rst @@ -0,0 +1,10 @@ +.. _changelog: + +************** +Full Changelog +************** + +.. changelog:: + :towncrier: ../../ + :towncrier-skip-if-empty: + :changelog_file: ../../CHANGELOG.rst diff --git a/docs/whatsnew/index.rst b/docs/whatsnew/index.rst new file mode 100644 index 0000000..bd08a51 --- /dev/null +++ b/docs/whatsnew/index.rst @@ -0,0 +1,12 @@ +.. _whatsnew: + +*************** +Release History +*************** + +This page documents the releases for sunkit-magex + +.. toctree:: + :maxdepth: 1 + + changelog diff --git a/pyproject.toml b/pyproject.toml index c669772..2eed099 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,8 +40,20 @@ tests = [ docs = [ "sphinx", "sphinx-automodapi", + "sphinx-changelog", "sunpy-sphinx-theme", "packaging", +<<<<<<< +======= +] + +[project.urls] +Homepage = "https://sunpy.org" +Download = "https://pypi.org/project/sunkit-magex" + +[tool.setuptools] +zip-safe = false +>>>>>>> "pillow", "reproject", "sphinx-gallery", @@ -77,3 +89,63 @@ exclude = ["sunkit_magex._dev*"] [tool.setuptools_scm] write_to = "sunkit_magex/_version.py" + +[tool.gilesbot] + [tool.gilesbot.pull_requests] + enabled = true + + [tool.gilesbot.towncrier_changelog] + enabled = true + verify_pr_number = true + changelog_skip_label = "No Changelog Entry Needed" + help_url = "https://github.com//blob/main/changelog/README.rst" + + changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com//blob/main/changelog/README.rst)." + + type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com//blob/main/changelog/README.rst)" + + number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file." + +# TODO: This should be in towncrier.toml but Giles currently only works looks in +# pyproject.toml we should move this back when it's fixed. +[tool.towncrier] + package = "sunkit_magex" + filename = "CHANGELOG.rst" + directory = "changelog/" + issue_format = "`#{issue} `__" + title_format = "{version} ({project_date})" + + [[tool.towncrier.type]] + directory = "breaking" + name = "Breaking Changes" + showcontent = true + + [[tool.towncrier.type]] + directory = "deprecation" + name = "Deprecations" + showcontent = true + + [[tool.towncrier.type]] + directory = "removal" + name = "Removals" + showcontent = true + + [[tool.towncrier.type]] + directory = "feature" + name = "New Features" + showcontent = true + + [[tool.towncrier.type]] + directory = "bugfix" + name = "Bug Fixes" + showcontent = true + + [[tool.towncrier.type]] + directory = "doc" + name = "Documentation" + showcontent = true + + [[tool.towncrier.type]] + directory = "trivial" + name = "Internal Changes" + showcontent = true From 792038287e8fb95cde406ce4e2f11130a26127e4 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Wed, 18 Dec 2024 10:57:22 +0000 Subject: [PATCH 04/10] Update conf.py --- docs/conf.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0c076bd..385959d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,12 +45,9 @@ "sphinx.ext.doctest", "sphinx.ext.mathjax", "sphinx_automodapi.automodapi", - "sphinx_automodapi.smart_resolver", -<<<<<<< - 'sphinx_gallery.gen_gallery', -======= + "sphinx_automodapi.smart_resolver", "sphinx_changelog", ->>>>>>> + "sphinx_gallery.gen_gallery", ] # Add any paths that contain templates here, relative to this directory. From 152525ca36ab335f6513ae34246365fabcbe3461 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Wed, 18 Dec 2024 10:57:45 +0000 Subject: [PATCH 05/10] Update index.rst --- docs/index.rst | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 573af54..50aafa4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,14 +8,6 @@ This is the documentation for sunkit-magex. :maxdepth: 2 :caption: Contents: -<<<<<<< -======= - whatsnew/index - -Indices and tables -================== - ->>>>>>> installing heritage generated/gallery/index @@ -23,4 +15,4 @@ Indices and tables performance numerical_methods_pfss/index.rst synoptic_fits - changelog + whatsnew/index From 6cdf1ffe18fcdd3a1aae15a1af6c5d08a660e1a0 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Wed, 18 Dec 2024 11:00:02 +0000 Subject: [PATCH 06/10] Update pyproject.toml --- pyproject.toml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2eed099..3bdee30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,17 +43,6 @@ docs = [ "sphinx-changelog", "sunpy-sphinx-theme", "packaging", -<<<<<<< -======= -] - -[project.urls] -Homepage = "https://sunpy.org" -Download = "https://pypi.org/project/sunkit-magex" - -[tool.setuptools] -zip-safe = false ->>>>>>> "pillow", "reproject", "sphinx-gallery", From 1f0c18cffaa57e7adfae8e4025636c545346cd78 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Wed, 18 Dec 2024 11:06:22 +0000 Subject: [PATCH 07/10] More crufty --- .cruft.json | 8 ++++---- CHANGELOG.rst | 22 ++++++++++++++++++++++ docs/changelog.rst | 28 ---------------------------- pyproject.toml | 8 ++++---- 4 files changed, 30 insertions(+), 36 deletions(-) delete mode 100644 docs/changelog.rst diff --git a/.cruft.json b/.cruft.json index fdb40bf..064cb80 100644 --- a/.cruft.json +++ b/.cruft.json @@ -10,11 +10,11 @@ "author_name": "The SunPy Community", "author_email": "sunpy@googlegroups.com", "project_url": "https://sunpy.org", - "github_repo": "", - "sourcecode_url": "", + "github_repo": "sunpy/sunkit-magex", + "sourcecode_url": "https://github.com/sunpy/sunkit-magex", "download_url": "https://pypi.org/project/sunkit-magex", - "documentation_url": "", - "changelog_url": "", + "documentation_url": "https://docs.sunpy.org/projects/sunkit-magex", + "changelog_url": "https://docs.sunpy.org/projects/sunkit-magex/en/stable/whatsnew/changelog.html", "issue_tracker_url": "", "license": "GNU GPL v3+", "minimum_python_version": "3.10", diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e69de29..5c6435e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -0,0 +1,22 @@ +1.0.0 (2024-05-31) +================== + +This is the first release and aims to keep the API the same from `pfsspy` to +`sunkit_magex`. The main difference is that you will need to replace the +import like so: + + .. code-block:: python + + # Before + import pfsspy + from pfsspy import tracing + + # After + from sunkit_magex import pfss as pfsspy + from sunkit_magex.pfss import tracing + +The main changes from the previous release of `pfsspy` are as follows: + +* The ``GongSynopticMap`` class has moved into `sunpy`, note that the new + class in ``sunpy`` is slightly different in that it does not modify the + header. diff --git a/docs/changelog.rst b/docs/changelog.rst deleted file mode 100644 index c22f33b..0000000 --- a/docs/changelog.rst +++ /dev/null @@ -1,28 +0,0 @@ -.. _sunkit-magex-changelog: - -************** -Full Changelog -************** - -1.0.0 (2024-05-31) -================== - -This is the first release and aims to keep the API the same from `pfsspy` to -`sunkit_magex`. The main difference is that you will need to replace the -import like so: - - .. code-block:: python - - # Before - import pfsspy - from pfsspy import tracing - - # After - from sunkit_magex import pfss as pfsspy - from sunkit_magex.pfss import tracing - -The main changes from the previous release of `pfsspy` are as follows: - -* The ``GongSynopticMap`` class has moved into `sunpy`, note that the new - class in ``sunpy`` is slightly different in that it does not modify the - header. diff --git a/pyproject.toml b/pyproject.toml index 3bdee30..593736c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,11 +87,11 @@ write_to = "sunkit_magex/_version.py" enabled = true verify_pr_number = true changelog_skip_label = "No Changelog Entry Needed" - help_url = "https://github.com//blob/main/changelog/README.rst" + help_url = "https://github.com/sunpy/sunkit-magex/blob/main/changelog/README.rst" - changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com//blob/main/changelog/README.rst)." + changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com/sunpy/sunkit-magex/blob/main/changelog/README.rst)." - type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com//blob/main/changelog/README.rst)" + type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/sunpy/sunkit-magex/blob/main/changelog/README.rst)" number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file." @@ -101,7 +101,7 @@ write_to = "sunkit_magex/_version.py" package = "sunkit_magex" filename = "CHANGELOG.rst" directory = "changelog/" - issue_format = "`#{issue} `__" + issue_format = "`#{issue} `__" title_format = "{version} ({project_date})" [[tool.towncrier.type]] From 4ef2736b2360b643cc7b682e2bce90c8193c0f95 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Wed, 18 Dec 2024 11:17:25 +0000 Subject: [PATCH 08/10] more --- .cruft.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cruft.json b/.cruft.json index 064cb80..791dc83 100644 --- a/.cruft.json +++ b/.cruft.json @@ -15,7 +15,7 @@ "download_url": "https://pypi.org/project/sunkit-magex", "documentation_url": "https://docs.sunpy.org/projects/sunkit-magex", "changelog_url": "https://docs.sunpy.org/projects/sunkit-magex/en/stable/whatsnew/changelog.html", - "issue_tracker_url": "", + "issue_tracker_url": "https://github.com/sunpy/sunkit-magex/issues", "license": "GNU GPL v3+", "minimum_python_version": "3.10", "use_compiled_extensions": "n", From 7e921be4232f21817f9f1ecc483d2b0de9e1dd5b Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Wed, 18 Dec 2024 11:22:06 +0000 Subject: [PATCH 09/10] ruff --- docs/conf.py | 2 +- sunkit_magex/pfss/interpolator.py | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 385959d..d51d86b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,7 +45,7 @@ "sphinx.ext.doctest", "sphinx.ext.mathjax", "sphinx_automodapi.automodapi", - "sphinx_automodapi.smart_resolver", + "sphinx_automodapi.smart_resolver", "sphinx_changelog", "sphinx_gallery.gen_gallery", ] diff --git a/sunkit_magex/pfss/interpolator.py b/sunkit_magex/pfss/interpolator.py index e4982d7..89aa02e 100644 --- a/sunkit_magex/pfss/interpolator.py +++ b/sunkit_magex/pfss/interpolator.py @@ -41,8 +41,8 @@ def __init__(self, points, values): values = np.asarray(values) if len(points) > values.ndim: - raise ValueError("There are %d point arrays, but values has %d " - "dimensions" % (len(points), values.ndim)) + raise ValueError(f"There are {len(points)} point arrays, but " + "values has {values.ndim} dimensions") if hasattr(values, 'dtype') and hasattr(values, 'astype'): if not np.issubdtype(values.dtype, np.inexact): @@ -52,14 +52,14 @@ def __init__(self, points, values): for i, p in enumerate(points): if not np.all(np.diff(p) > 0.): - raise ValueError("The points in dimension %d must be strictly " - "ascending" % i) + raise ValueError(f"The points in dimension {i} must be strictly " + "ascending") if not np.asarray(p).ndim == 1: - raise ValueError("The points in dimension %d must be " - "1-dimensional" % i) + raise ValueError(f"The points in dimension {i} must be " + "1-dimensional") if not values.shape[i] == len(p): - raise ValueError("There are %d points and %d values in " - "dimension %d" % (len(p), values.shape[i], i)) + raise ValueError(f"There are {len(p)} points and {values.shape[i]} " + "values in dimension {i}") self.grid = tuple([np.asarray(p) for p in points]) self.values = values @@ -75,8 +75,8 @@ def __call__(self, xi): xi = _ndim_coords_from_arrays(xi, ndim=ndim) if xi.shape[-1] != len(self.grid): raise ValueError("The requested sample points xi have dimension " - "%d, but this RegularGridInterpolator has " - "dimension %d" % (xi.shape[1], ndim)) + f"{xi.shape[1]}, but this RegularGridInterpolator has " + f"dimension {ndim}") xi_shape = xi.shape xi = xi.reshape(-1, xi_shape[-1]) From 5fdcd32dba4650fbcbaf44b9736241655d045685 Mon Sep 17 00:00:00 2001 From: Cadair <1391051+Cadair@users.noreply.github.com> Date: Mon, 30 Dec 2024 07:05:48 +0000 Subject: [PATCH 10/10] Automatic package template update --- .cruft.json | 5 +++-- .pre-commit-config.yaml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.cruft.json b/.cruft.json index 791dc83..1c9dd23 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "c60ccf2ddc71d3cf126cea15132a15da307864f7", + "commit": "f14be4e69db1678316566c128153764c0e77aed2", "checkout": null, "context": { "cookiecutter": { @@ -31,7 +31,8 @@ "docs/_static", ".github/workflows/sub_package_update.yml" ], - "_template": "https://github.com/sunpy/package-template" + "_template": "https://github.com/sunpy/package-template", + "_commit": "f14be4e69db1678316566c128153764c0e77aed2" } }, "directory": null diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7c49ac..a336302 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # This should be before any formatting hooks like isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.8.3" + rev: "v0.8.4" hooks: - id: ruff args: ["--fix"]