From 8e1a589208fd8c82d31cf1b4762662c22988e07a Mon Sep 17 00:00:00 2001 From: SolarDrew <1914702+SolarDrew@users.noreply.github.com> Date: Mon, 14 Oct 2024 07:15:41 +0000 Subject: [PATCH] Automatic package template update --- .cruft.json | 2 +- .github/workflows/sub_package_update.yml | 2 +- .pre-commit-config.yaml | 4 +-- .readthedocs.yaml | 2 +- .rtd-environment.yml | 2 +- docs/conf.py | 31 ++++++++++++++++++++++++ pyproject.toml | 13 ++++++++-- 7 files changed, 48 insertions(+), 8 deletions(-) diff --git a/.cruft.json b/.cruft.json index 72ad7fdd..2272320a 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "112d7d4adf0fa168bbb9ddb1886ad4f1e595b8be", + "commit": "dd830771f0bb01d5313912e0082f3434715e474a", "checkout": null, "context": { "cookiecutter": { diff --git a/.github/workflows/sub_package_update.yml b/.github/workflows/sub_package_update.yml index 06779481..74558476 100644 --- a/.github/workflows/sub_package_update.yml +++ b/.github/workflows/sub_package_update.yml @@ -65,7 +65,7 @@ jobs: - name: Create pull request if: steps.check.outputs.has_changes == '1' - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.GITHUB_TOKEN }} add-paths: ${{ matrix.add-paths }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4b9954cf..4b7d0bae 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.5.2" + rev: "v0.6.9" hooks: - id: ruff args: ["--fix"] @@ -11,7 +11,7 @@ repos: - id: isort exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|extern.*|dkist/extern)$" - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-ast - id: check-case-conflict diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 419484ec..29475caa 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,7 +1,7 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-lts-latest tools: python: "mambaforge-latest" jobs: diff --git a/.rtd-environment.yml b/.rtd-environment.yml index f3d2fdbe..2dc187de 100644 --- a/.rtd-environment.yml +++ b/.rtd-environment.yml @@ -2,6 +2,6 @@ name: dkist channels: - conda-forge dependencies: - - python=3.10 + - python=3.12 - pip - graphviz!=2.42.*,!=2.43.* diff --git a/docs/conf.py b/docs/conf.py index 189f2927..6a241d7f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,10 +44,34 @@ author = "NSO / AURA" copyright = f"{datetime.datetime.now().year}, {author}" +<<<<<<< +======= +import datetime + +from packaging.version import Version + +# -- Project information ----------------------------------------------------- + +>>>>>>> # The full version, including alpha/beta/rc tags +<<<<<<< release = __version__ dkist_version = Version(__version__) is_release = not(dkist_version.is_prerelease or dkist_version.is_devrelease) +======= +from dkist 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 +is_release = not(_version.is_prerelease or _version.is_devrelease) +>>>>>>> # We want to ignore all warnings in a release version. if is_release: @@ -90,6 +114,13 @@ # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied +<<<<<<< +======= +master_doc = "index" + +# Treat everything in single ` as a Python reference. +default_role = "py:obj" +>>>>>>> exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "jupyter_execute", "**/*_NOTES.md"] diff --git a/pyproject.toml b/pyproject.toml index d8130fb8..324fdc4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,8 @@ requires = [ "setuptools>=62.1", "setuptools_scm[toml]>=6.2", - "wheel",] + "wheel", +] build-backend = "setuptools.build_meta" [project] @@ -10,7 +11,7 @@ name = "dkist" description = "DKIST User Tools" requires-python = ">=3.10" readme = { file = "README.rst", content-type = "text/x-rst" } -license = { file = "licenses/LICENSE.rst", content-type = "text/plain" } +license = { file = "licenses/LICENSE.rst" } authors = [ { name = "NSO / AURA", email = "stuart@cadair.com" }, ] @@ -71,6 +72,13 @@ docs = [ "ipywidgets", "accessible-pygments", "reproject[all]", +<<<<<<< +======= +docs = [ + "sphinx", + "sphinx-automodapi", + "packaging", +>>>>>>> ] [project.urls] @@ -85,6 +93,7 @@ zip-safe = false include-package-data = true [tool.setuptools.packages.find] +include = ["dkist*"] exclude = ["dkist._dev*"] [tool.setuptools_scm]