From f4989fc6fb05f52340b0986015f76c4081089c69 Mon Sep 17 00:00:00 2001 From: Cadair <1391051+Cadair@users.noreply.github.com> Date: Mon, 21 Oct 2024 07:06:03 +0000 Subject: [PATCH 1/4] Automatic package template update --- .cruft.json | 2 +- docs/conf.py | 18 ++++++++++++++++++ ndcube/_dev/__init__.py | 4 ++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.cruft.json b/.cruft.json index d78567ebe..373ecde13 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "dd830771f0bb01d5313912e0082f3434715e474a", + "commit": "7b0225e0a206b7b6249752991334dea7e9ffcfd4", "checkout": null, "context": { "cookiecutter": { diff --git a/docs/conf.py b/docs/conf.py index 28c956ce1..7771378ec 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -83,6 +83,24 @@ target = target.strip() nitpick_ignore.append((dtype, target)) +<<<<<<< +======= +# 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", +] + +# 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". +>>>>>>> # -- Options for intersphinx extension intersphinx_mapping = { 'python': ('https://docs.python.org/3/', diff --git a/ndcube/_dev/__init__.py b/ndcube/_dev/__init__.py index 47cce3cbf..3e9aebe51 100644 --- a/ndcube/_dev/__init__.py +++ b/ndcube/_dev/__init__.py @@ -1,5 +1,9 @@ """ +<<<<<<< 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 From d5af135f83e5c239743e73daa4dfe28b17193432 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 21 Oct 2024 08:35:49 +0100 Subject: [PATCH 2/4] Update __init__.py --- ndcube/_dev/__init__.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ndcube/_dev/__init__.py b/ndcube/_dev/__init__.py index 3e9aebe51..73872a169 100644 --- a/ndcube/_dev/__init__.py +++ b/ndcube/_dev/__init__.py @@ -1,9 +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 From 2ecfa2a7c586aadfefbbe5198e3a426a549c3ec2 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 21 Oct 2024 08:39:23 +0100 Subject: [PATCH 3/4] Update conf.py --- docs/conf.py | 126 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 74 insertions(+), 52 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 7771378ec..bcb01c0af 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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' @@ -57,51 +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 = [ - '', -] -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)) -<<<<<<< -======= -# Render inheritance diagrams in SVG -graphviz_output_format = "svg" +# -- Options for intersphinx extension --------------------------------------- -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", -] - -# 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". ->>>>>>> -# -- Options for intersphinx extension intersphinx_mapping = { 'python': ('https://docs.python.org/3/', (None, 'http://data.astropy.org/intersphinx/python3.inv')), @@ -116,22 +91,60 @@ 'reproject': ("https://reproject.readthedocs.io/en/stable/", None) } -# -- Options for HTML output -html_theme = "sunpy" +# -- 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 = "{{ cookiecutter._sphinx_theme }}" + 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_).)*$', @@ -146,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 = [ + '', +] From 1dc08121633b90326da186c973ee2c5a7304ae0a Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 21 Oct 2024 09:42:01 +0100 Subject: [PATCH 4/4] Update conf.py --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index bcb01c0af..30b2b3b05 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -95,7 +95,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = "{{ cookiecutter._sphinx_theme }}" +html_theme = "sunpy" html_logo = png_icon = 'logo/ndcube.png'