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

Cruft update #444

Merged
merged 1 commit into from
Oct 1, 2024
Merged
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": "67ea3b3815de57668e92dbe1fa2c3d033758d8f0",
"commit": "b5bbed7f845b4acf95f303ea6e4ae6edf731eced",
"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
@@ -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.3"
rev: "v0.6.7"
hooks:
- id: ruff
args: ["--fix"]
Expand Down
43 changes: 25 additions & 18 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
Configuration file for the Sphinx documentation builder.
"""
# -- stdlib imports ------------------------------------------------------------

import datetime
import os
import sys
import warnings

from packaging.version import Version
from pkg_resources import get_distribution

# -- Check for dependencies ----------------------------------------------------

doc_requires = get_distribution("dkist").requires(extras=("docs",))
missing_requirements = []
for requirement in doc_requires:
Expand All @@ -26,7 +27,7 @@
sys.exit(1)

# -- Read the Docs Specific Configuration --------------------------------------
# This needs to be done before sunpy is imported

on_rtd = os.environ.get("READTHEDOCS", None) == "True"
if on_rtd:
os.environ["SUNPY_CONFIGDIR"] = "/home/docs/"
Expand All @@ -36,22 +37,30 @@
os.environ["HIDE_PARFIVE_PROGESS"] = "True"

# -- Non stdlib imports --------------------------------------------------------

import dkist # noqa
from dkist import __version__

# -- Project information -------------------------------------------------------
# -- Project information -----------------------------------------------------

# The full version, including alpha/beta/rc tags

_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)

project = "DKIST"
author = "NSO / AURA"
copyright = f"{datetime.datetime.now().year}, {author}"

# 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)

# We want to ignore all warnings in a release version.
if is_release:
warnings.simplefilter("ignore")
# -- General configuration ---------------------------------------------------

# Suppress warnings about overriding directives as we overload some of the
# doctest extensions.
Expand Down Expand Up @@ -87,10 +96,6 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied

exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "jupyter_execute", "**/*_NOTES.md"]

# The suffix(es) of source filenames.
Expand All @@ -102,9 +107,8 @@
# The master toctree document.
master_doc = "index"

# The reST default role (used for this markup: `text`) to use for all
# documents. Set to the "smart" one.
default_role = "obj"
# Treat everything in single ` as a Python reference.
default_role = "py:obj"

napoleon_use_rtype = False

Expand All @@ -120,6 +124,7 @@
typehints_defaults = "comma"

# -- Options for intersphinx extension -----------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
Expand All @@ -137,6 +142,7 @@
}

# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.

Expand All @@ -163,6 +169,7 @@
pygments_style = "github-light"

# -- MyST_NB -------------------------------------------------------------------

nb_execution_allow_errors = False
nb_execution_in_temp = True
nb_execution_mode = "auto"
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ tests = [
]
docs = [
"sphinx",
"sphinx-automodapi",
"packaging",
"sphinx-astropy",
"sphinx-gallery",
"sphinx-changelog",
Expand Down