From 4085846cc588859d5a9c355c71d3cbd2c9680ed6 Mon Sep 17 00:00:00 2001 From: hayesla <4620298+hayesla@users.noreply.github.com> Date: Mon, 30 Sep 2024 07:13:19 +0000 Subject: [PATCH] Automatic package template update --- .cruft.json | 2 +- .pre-commit-config.yaml | 2 +- docs/conf.py | 24 ++++++++++++++++++++++++ pyproject.toml | 10 ++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/.cruft.json b/.cruft.json index 05e3aa473e..0712d6cfcc 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "c1efeecc741705d6a87ab17ca3662428df783a6d", + "commit": "17602ec8f8d4a4c5722bca00e255e480683f5096", "checkout": null, "context": { "cookiecutter": { diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 66695f81bc..153ee01f2b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ exclude: ".*(.csv|.fits|.fts|.fit|.header|.txt|tca.*|.json|.asdf)$|^CITATION.rst repos: # This should be before any formatting hooks like isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.6.5" + rev: "v0.6.7" hooks: - id: ruff args: ["--fix"] diff --git a/docs/conf.py b/docs/conf.py index e54357535a..29a2d21d48 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,6 +45,7 @@ author = 'The SunPy Community' copyright = f'{datetime.datetime.now().year}, {author}' +<<<<<<< # Register remote data option with doctest import doctest @@ -57,6 +58,29 @@ sunpy_version = Version(__version__) is_release = not(sunpy_version.is_prerelease or sunpy_version.is_devrelease) +======= +import datetime + +from packaging.version import Version + +# -- Project information ----------------------------------------------------- + +# The full version, including alpha/beta/rc tags +from sunpy import __version__ + +_version = Version(__version__) +version = release = str(_version) +# Avoid "post" appearing in version string in rendered docs +if _version.is_postrelease: + version = release = _version.base_version +# Avoid long githashes in rendered Sphinx docs +elif _version.is_devrelease: + version = release = f'{_version.base_version}.dev{_version.dev}' +is_development = _version.is_devrelease + +project = "sunpy" +author = "The SunPy Community" +>>>>>>> # We want to make sure all the following warnings fail the build warnings.filterwarnings("error", category=SunpyDeprecationWarning) warnings.filterwarnings("error", category=SunpyPendingDeprecationWarning) diff --git a/pyproject.toml b/pyproject.toml index c9e89fc293..448384336c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,17 @@ readme = { file = "README.rst", content-type = "text/x-rst" } license = { file = "LICENSE.rst" } authors = [ { name = "The SunPy Community", email = "sunpy@googlegroups.com" }, +<<<<<<< ] +======= +docs = [ + "sphinx", + "sphinx-automodapi", + "packaging", +] +[project.urls] +repository = "https://sunpy.org" +>>>>>>> dependencies = [ "astropy>=5.3.0", "numpy>=1.23.5",