Skip to content

Commit

Permalink
Merge pull request #769 from sunpy/cruft/update-1729494363
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair authored Oct 21, 2024
2 parents 84f6f62 + 1dc0812 commit 13bfa98
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 36 deletions.
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": "dd830771f0bb01d5313912e0082f3434715e474a",
"commit": "7b0225e0a206b7b6249752991334dea7e9ffcfd4",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
108 changes: 74 additions & 34 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from matplotlib import MatplotlibDeprecationWarning
from packaging.version import Version

# -- Read the Docs Specific Configuration
# -- Read the Docs Specific Configuration ------------------------------------
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if on_rtd:
os.environ['HIDE_PARFIVE_PROGESS'] = 'True'
Expand Down Expand Up @@ -57,33 +57,26 @@
"sphinxext.opengraph",
]

# -- Sphinxext Opengraph
ogp_image = "https://github.com/sunpy/ndcube/raw/main/docs/logo/ndcube.png"
ogp_use_first_image = True
ogp_description_length = 160
ogp_custom_meta_tags = [
'<meta property="og:ignore_canonical" content="true" />',
]
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
source_suffix = '.rst'
master_doc = 'index'
# Add any paths that contain templates here, relative to this directory.
# templates_path = ["_templates"] # NOQA: ERA001

# 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.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
source_suffix = ".rst"

# The master toctree document.
master_doc = "index"

# Treat everything in single ` as a Python reference.
default_role = "py:obj"
napoleon_use_rtype = False
napoleon_google_docstring = False
napoleon_use_param = False
# TODO: Enable this in future.
nitpicky = True
# This is not used. See docs/nitpick-exceptions file for the actual listing.
nitpick_ignore = []
for line in open('nitpick-exceptions'):
if line.strip() == "" or line.startswith("#"):
continue
dtype, target = line.split(None, 1)
target = target.strip()
nitpick_ignore.append((dtype, target))

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

intersphinx_mapping = {
'python': ('https://docs.python.org/3/',
(None, 'http://data.astropy.org/intersphinx/python3.inv')),
Expand All @@ -98,22 +91,60 @@
'reproject': ("https://reproject.readthedocs.io/en/stable/", None)
}

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

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

html_logo = png_icon = 'logo/ndcube.png'

html_favicon = 'logo/favicon.png'
graphviz_output_format = 'svg'

# Render inheritance diagrams in SVG
graphviz_output_format = "svg"

graphviz_dot_args = [
'-Nfontsize=10',
'-Nfontname=Helvetica Neue, Helvetica, Arial, sans-serif',
'-Efontsize=10',
'-Efontname=Helvetica Neue, Helvetica, Arial, sans-serif',
'-Gfontsize=10',
'-Gfontname=Helvetica Neue, Helvetica, Arial, sans-serif'
"-Nfontsize=10",
"-Nfontname=Helvetica Neue, Helvetica, Arial, sans-serif",
"-Efontsize=10",
"-Efontname=Helvetica Neue, Helvetica, Arial, sans-serif",
"-Gfontsize=10",
"-Gfontname=Helvetica Neue, Helvetica, Arial, sans-serif",
]

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ["_static"] # NOQA: ERA001

# By default, when rendering docstrings for classes, sphinx.ext.autodoc will
# make docs with the class-level docstring and the class-method docstrings,
# but not the __init__ docstring, which often contains the parameters to
# class constructors across the scientific Python ecosystem. The option below
# will append the __init__ docstring to the class-level docstring when rendering
# the docs. For more options, see:
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autoclass_content
autoclass_content = "both"

# -- Other options ----------------------------------------------------------

napoleon_use_rtype = False
napoleon_google_docstring = False
napoleon_use_param = False

nitpicky = True
# This is not used. See docs/nitpick-exceptions file for the actual listing.
nitpick_ignore = []
for line in open('nitpick-exceptions'):
if line.strip() == "" or line.startswith("#"):
continue
dtype, target = line.split(None, 1)
target = target.strip()
nitpick_ignore.append((dtype, target))

# -- Sphinx Gallery ---------------------------------------------------------

# -- Sphinx Gallery
sphinx_gallery_conf = {
'backreferences_dir': os.path.join('generated', 'modules'),
'filename_pattern': '^((?!skip_).)*$',
Expand All @@ -128,3 +159,12 @@
'doc_module': ('ndcube'),
'only_warn_on_example_error': True,
}

# -- Sphinxext Opengraph ----------------------------------------------------

ogp_image = "https://github.com/sunpy/ndcube/raw/main/docs/logo/ndcube.png"
ogp_use_first_image = True
ogp_description_length = 160
ogp_custom_meta_tags = [
'<meta property="og:ignore_canonical" content="true" />',
]
2 changes: 1 addition & 1 deletion ndcube/_dev/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This package contains utilities that are only used when developing ndcube in a
This package contains utilities that are only used when developing in a
copy of the source repository.
These files are not installed, and should not be assumed to exist at
Expand Down

0 comments on commit 13bfa98

Please sign in to comment.