diff --git a/.cruft.json b/.cruft.json index 1457902..2e9225e 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 c34792c..c05a713 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable'] exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|docs/conf.py)$" - 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 9b1a2a7..63a5d85 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,15 +8,26 @@ import datetime from pathlib import Path +from packaging.version import Version from sunpy_sphinx_theme import PNG_ICON +# -- Project information ----------------------------------------------------- +# The full version, including alpha/beta/rc tags from sunpy_soar 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-soar" copyright = f"{datetime.datetime.now().year}, The SunPy Community" # NOQA: A001, DTZ005 author = "The SunPy Community" -release = __version__ -is_development = ".dev" in __version__ # -- General configuration --------------------------------------------------- extensions = [ diff --git a/pyproject.toml b/pyproject.toml index 46d7ba4..bd47033 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,12 +33,13 @@ tests = [ "sunpy[map,net]>=6.0.0", ] docs = [ - "matplotlib", + "sphinx", "sphinx-automodapi", + "packaging", + "matplotlib", "sphinx-changelog", "sphinx-copybutton", "sphinx-gallery", - "sphinx", "sphinxext-opengraph", "sunpy-sphinx-theme", ]