From f44804bdc67c8e411a145eafcc4f2b9f05f22bcc Mon Sep 17 00:00:00 2001 From: Cadair <1391051+Cadair@users.noreply.github.com> Date: Mon, 30 Sep 2024 07:04:17 +0000 Subject: [PATCH 1/3] Automatic package template update --- .cruft.json | 2 +- .pre-commit-config.yaml | 2 +- docs/conf.py | 12 +++++++++++- pyproject.toml | 7 +++++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.cruft.json b/.cruft.json index 6feabd7..6ef4d3c 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "147c523135c0c612de0054897c87f8b4454dcd7a", + "commit": "17602ec8f8d4a4c5722bca00e255e480683f5096", "checkout": null, "context": { "cookiecutter": { diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54abb8f..2abbec0 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.6.4" + rev: "v0.6.7" hooks: - id: ruff args: ["--fix"] diff --git a/docs/conf.py b/docs/conf.py index e412446..004d4b6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,12 +6,22 @@ import datetime +from packaging.version import Version + # -- Project information ----------------------------------------------------- # The full version, including alpha/beta/rc tags from streamtracer import __version__ -release = __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 = "streamtracer" author = "The SunPy Developers, David Stansby" diff --git a/pyproject.toml b/pyproject.toml index 4dfc5a6..a1dfb3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,13 @@ tests = [ docs = [ "sphinx", "sphinx-automodapi", +<<<<<<< +======= + "packaging", +] +[project.urls] +repository = "https://github.com/sunpy/streamtracer" +>>>>>>> "jupyter-sphinx", "sunpy-sphinx-theme", "sphinx-changelog", From 2170f4e0fba660f72a8f48c8af88d79ac091acf0 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 30 Sep 2024 11:52:24 +0100 Subject: [PATCH 2/3] Update pyproject.toml --- pyproject.toml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a1dfb3c..ad67b11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,10 +4,6 @@ requires = [ ] build-backend = "maturin" -[tool.maturin] -python-source = "python" -module-name = "streamtracer._streamtracer_rust" - [project] name = "streamtracer" description = "Python library to calculate streamlines" @@ -38,11 +34,6 @@ dependencies = [ "packaging>=21.3", ] -[project.urls] -Homepage = "https://docs.sunpy.org/projects/streamtracer" -Documentation = "https://docs.sunpy.org/projects/streamtracer" -Repository = "https://github.com/sunpy/streamtracer" - [project.optional-dependencies] tests = [ "pytest", @@ -53,18 +44,21 @@ tests = [ docs = [ "sphinx", "sphinx-automodapi", -<<<<<<< -======= "packaging", -] -[project.urls] -repository = "https://github.com/sunpy/streamtracer" ->>>>>>> "jupyter-sphinx", "sunpy-sphinx-theme", "sphinx-changelog", ] +[project.urls] +Homepage = "https://docs.sunpy.org/projects/streamtracer" +Documentation = "https://docs.sunpy.org/projects/streamtracer" +Repository = "https://github.com/sunpy/streamtracer" + +[tool.maturin] +python-source = "python" +module-name = "streamtracer._streamtracer_rust" + [tool.cibuildwheel] before-build = "rustup show" environment = {"PATH" = "$PATH:$HOME/.cargo/bin"} From f721265504eb393bc0ab3ea9898162ba349bcc44 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:53:38 +0000 Subject: [PATCH 3/3] [pre-commit.ci lite] apply automatic fixes --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 004d4b6..4d60703 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ 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}' + version = release = f"{_version.base_version}.dev{_version.dev}" is_development = _version.is_devrelease project = "streamtracer"