Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates from the package template #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/sunpy/package-template",
"commit": "c1efeecc741705d6a87ab17ca3662428df783a6d",
"commit": "17602ec8f8d4a4c5722bca00e255e480683f5096",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
24 changes: 24 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
author = 'The SunPy Community'
copyright = f'{datetime.datetime.now().year}, {author}'

<<<<<<<
# Register remote data option with doctest
import doctest

Expand All @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,17 @@ readme = { file = "README.rst", content-type = "text/x-rst" }
license = { file = "LICENSE.rst" }
authors = [
{ name = "The SunPy Community", email = "[email protected]" },
<<<<<<<
]
=======
docs = [
"sphinx",
"sphinx-automodapi",
"packaging",
]
[project.urls]
repository = "https://sunpy.org"
>>>>>>>
dependencies = [
"astropy>=5.3.0",
"numpy>=1.23.5",
Expand Down