diff --git a/.cruft.json b/.cruft.json index 9a43358..be3d231 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "cd21e0d710513a891ed03f29e8afd6e0b9217f04", + "commit": "3737aa309d2a695ada046c7868c5683213003f3d", "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": "sunpy/drms", + "sourcecode_url": "https://github.com/sunpy/drms", + "download_url": "https://pypi.org/project/drms", + "documentation_url": "https://docs.sunpy.org/projects/drms", + "changelog_url": "https://docs.sunpy.org/projects/drms/en/stable/whatsnew/changelog.html", + "issue_tracker_url": "https://github.com/sunpy/drms/issues", "license": "BSD 2-Clause", "minimum_python_version": "3.10", "use_compiled_extensions": "n", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e755edb..11e0bed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +# Main CI Workflow name: CI on: @@ -28,7 +29,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 @@ -53,7 +54,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 @@ -68,7 +69,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 @@ -81,7 +82,7 @@ jobs: - linux: build_docs online: - 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 @@ -104,7 +105,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/.pre-commit-config.yaml b/.pre-commit-config.yaml index a5844a3..d50d46e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.4" + rev: "v0.8.1" hooks: - id: ruff args: ['--fix', '--unsafe-fixes'] diff --git a/.ruff.toml b/.ruff.toml index 8134d7f..b04c5ef 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -38,7 +38,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/docs/conf.py b/docs/conf.py index 7a84090..3a011b4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,19 +40,19 @@ extensions = [ "hoverxref.extension", "sphinx_copybutton", - "sphinx_automodapi.automodapi", - "sphinx_automodapi.smart_resolver", - "sphinx_changelog", "sphinx_gallery.gen_gallery", "sphinx.ext.autodoc", "sphinx.ext.coverage", "sphinx.ext.doctest", "sphinx.ext.inheritance_diagram", "sphinx.ext.intersphinx", - "sphinx.ext.mathjax", "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", + "sphinx.ext.mathjax", + "sphinx_automodapi.automodapi", + "sphinx_automodapi.smart_resolver", + "sphinx_changelog", ] # Add any paths that contain templates here, relative to this directory. diff --git a/drms/__init__.py b/drms/__init__.py index 594c830..92bb12e 100644 --- a/drms/__init__.py +++ b/drms/__init__.py @@ -46,9 +46,6 @@ def _get_bibtex(): __citation__ = __bibtex__ = _get_bibtex() __all__ = [ - "__bibtex__", - "__citation__", - "__version__", "Client", "DrmsError", "DrmsExportError", @@ -58,9 +55,12 @@ def _get_bibtex(): "HttpJsonClient", "HttpJsonRequest", "JsocInfoConstants", - "register_server", "SeriesInfo", "ServerConfig", - "to_datetime", + "__bibtex__", + "__citation__", + "__version__", "logger", + "register_server", + "to_datetime", ] diff --git a/drms/client.py b/drms/client.py index d19a353..45e4d4b 100644 --- a/drms/client.py +++ b/drms/client.py @@ -15,7 +15,7 @@ from .json import HttpJsonClient from .utils import _extract_series_name, _pd_to_numeric_coerce, _split_arg -__all__ = ["SeriesInfo", "ExportRequest", "Client"] +__all__ = ["Client", "ExportRequest", "SeriesInfo"] class SeriesInfo: diff --git a/drms/exceptions.py b/drms/exceptions.py index b90673f..27120d5 100644 --- a/drms/exceptions.py +++ b/drms/exceptions.py @@ -1,8 +1,8 @@ __all__ = [ "DrmsError", - "DrmsQueryError", "DrmsExportError", "DrmsOperationNotSupported", + "DrmsQueryError", ] diff --git a/drms/json.py b/drms/json.py index 852ef32..e5cf74c 100644 --- a/drms/json.py +++ b/drms/json.py @@ -7,7 +7,7 @@ from .config import ServerConfig, _server_configs from .utils import _split_arg -__all__ = ["JsocInfoConstants", "HttpJsonRequest", "HttpJsonClient"] +__all__ = ["HttpJsonClient", "HttpJsonRequest", "JsocInfoConstants"] # TODO: When we support 3.11, we can use StrEnum instead of Enum diff --git a/pyproject.toml b/pyproject.toml index b1c740e..16c75c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,8 +44,14 @@ docs = [ "sphinx-hoverxref", "sphinxext-opengraph", ] + [project.urls] -repository = "https://sunpy.org" +Homepage = "https://sunpy.org" +"Source Code" = "https://github.com/sunpy/drms" +Download = "https://pypi.org/project/sunpy" +Documentation = "https://docs.sunpy.org/projects/drms" +Changelog = "https://docs.sunpy.org/projects/drms/en/stable/whatsnew/changelog.html" +"Issue Tracker" = "https://github.com/sunpy/drms/issues" [tool.setuptools] zip-safe = false @@ -58,62 +64,62 @@ exclude = ["drms._dev*"] [tool.setuptools_scm] write_to = "drms/_version.py" -[ tool.gilesbot ] - [ tool.gilesbot.pull_requests ] - enabled = true +[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/sunpy/drms/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/drms/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/drms/blob/main/changelog/README.rst)" - [ tool.gilesbot.towncrier_changelog ] - enabled = true - verify_pr_number = true - changelog_skip_label = "No Changelog Entry Needed" - help_url = "https://github.com/sunpy/drms/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/drms/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/drms/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." + 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 = "drms" - filename = "CHANGELOG.rst" - directory = "changelog/" - issue_format = "`#{issue} `__" - title_format = "{version} ({project_date})" - - [[tool.towncrier.type]] - directory = "breaking" - name = "Backwards Incompatible Changes" - showcontent = true - - [[tool.towncrier.type]] - directory = "api" - name = "API Changes" - showcontent = true - - [[tool.towncrier.type]] - directory = "removal" - name = "Deprecations and Removals" - showcontent = true - - [[tool.towncrier.type]] - directory = "feature" - name = "Features" - showcontent = true - - [[tool.towncrier.type]] - directory = "bugfix" - name = "Bug Fixes" - showcontent = true - - [[tool.towncrier.type]] - directory = "doc" - name = "Added/Improved Documentation" - showcontent = true - - [[tool.towncrier.type]] - directory = "docfix" - name = "Documentation Fixes" - showcontent = true - - [[tool.towncrier.type]] - directory = "trivial" - name = "Trivial/Internal Changes" - showcontent = true + package = "drms" + 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