diff --git a/doc/source/api/diffpy.srmise.rst b/doc/source/api/diffpy.srmise.rst index 98ea790..aa7f200 100644 --- a/doc/source/api/diffpy.srmise.rst +++ b/doc/source/api/diffpy.srmise.rst @@ -1,7 +1,9 @@ :tocdepth: -1 -diffpy.srmise package -===================== +|title| +======= + +.. |title| replace:: diffpy.srmise package .. automodule:: diffpy.srmise :members: diff --git a/doc/source/conf.py b/doc/source/conf.py index 65d3685..956f1a9 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -18,6 +18,12 @@ from importlib.metadata import version from pathlib import Path +# Attempt to import the version dynamically from GitHub tag. +try: + fullversion = version("diffpy.srmise") +except Exception: + fullversion = "No version found. The correct version will appear in the released version." + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use Path().resolve() to make it absolute, like shown here. @@ -26,7 +32,7 @@ sys.path.insert(0, str(Path("../../src").resolve())) # abbreviations -ab_authors = "Billinge Group members and community contributors" +ab_authors = "Simon Billinge, Billinge Group members" # -- General configuration ------------------------------------------------ @@ -43,6 +49,7 @@ "sphinx.ext.viewcode", "sphinx.ext.intersphinx", "sphinx_rtd_theme", + "sphinx_copybutton", "m2r", ] @@ -68,7 +75,6 @@ # |version| and |release|, also used in various other places throughout the # built documents. -fullversion = version(project) # The short X.Y version. version = "".join(fullversion.split(".post")[:1]) # The full version, including alpha/beta/rc tags. @@ -88,6 +94,11 @@ # substitute YEAR in the copyright string copyright = copyright.replace("%Y", year) +# For sphinx_copybutton extension. +# Do not copy "$" for shell commands in code-blocks. +copybutton_prompt_text = r"^\$ " +copybutton_prompt_is_regexp = True + # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ["build"] @@ -123,6 +134,14 @@ # html_theme = "sphinx_rtd_theme" +html_context = { + "display_github": True, + "github_user": "diffpy", + "github_repo": "diffpy.srmise", + "github_version": "main", + "conf_py_path": "/doc/source/", +} + # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. @@ -221,7 +240,13 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ("index", "diffpy.srmise.tex", "diffpy.srmise Documentation", ab_authors, "manual"), + ( + "index", + "diffpy.srmise.tex", + "diffpy.srmise Documentation", + ab_authors, + "manual", + ), ] # The name of an image file (relative to this directory) to place at the top of @@ -249,7 +274,15 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [("index", "diffpy.srmise", "diffpy.srmise Documentation", ab_authors, 1)] +man_pages = [ + ( + "index", + "diffpy.srmise", + "diffpy.srmise Documentation", + ab_authors, + 1, + ) +] # If true, show URL addresses after external links. # man_show_urls = False diff --git a/doc/source/index.rst b/doc/source/index.rst index 417085e..2e91dbe 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -4,19 +4,24 @@ .. |title| replace:: diffpy.srmise documentation -diffpy.srmise - Peak extraction and peak fitting tool for atomic pair distribution functions.. +``diffpy.srmise`` - Peak extraction and peak fitting tool for atomic pair distribution functions -| Software version |release|. +| Software version |release| | Last updated |today|. +=============== +Getting started +=============== + +Welcome to the ``diffpy.srmise`` documentation! + +To get started, please visit the :ref:`Getting started ` page. + ======= Authors ======= -diffpy.srmise is developed by Billinge Group -and its community contributors. - -For a detailed list of contributors see +``diffpy.srmise`` is developed by Simon Billinge, Billinge Group members. The maintainer for this project is Simon Billinge. For a detailed list of contributors see https://github.com/diffpy/diffpy.srmise/graphs/contributors. ============ @@ -26,6 +31,12 @@ Installation See the `README `_ file included with the distribution. +================ +Acknowledgements +================ + +``diffpy.srmise`` is built and maintained with `scikit-package `_. + ================= Table of contents ================= diff --git a/doc/source/license.rst b/doc/source/license.rst index 75f0bdd..65646b0 100644 --- a/doc/source/license.rst +++ b/doc/source/license.rst @@ -11,7 +11,7 @@ BSD 3-Clause License Copyright 2014-2015, Board of Trustees of Michigan State University -Copyright 2016-2024, The Trustees of Columbia University in the City of New York. +Copyright 2016-2025, The Trustees of Columbia University in the City of New York. All rights reserved. diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py index 1fd9c20..0163760 100644 --- a/src/diffpy/__init__.py +++ b/src/diffpy/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python ############################################################################## # -# (c) 2024 The Trustees of Columbia University in the City of New York. +# (c) 2025 The Trustees of Columbia University in the City of New York. # All rights reserved. # # File coded by: Billinge Group members and community contributors. diff --git a/src/diffpy/srmise/__init__.py b/src/diffpy/srmise/__init__.py index 52fd6a9..a4e8b2b 100644 --- a/src/diffpy/srmise/__init__.py +++ b/src/diffpy/srmise/__init__.py @@ -1,10 +1,10 @@ #!/usr/bin/env python ############################################################################## # -# (c) 2024 The Trustees of Columbia University in the City of New York. +# (c) 2025 The Trustees of Columbia University in the City of New York. # All rights reserved. # -# File coded by: Billinge Group members and community contributors. +# File coded by: Simon Billinge, Billinge Group members. # # See GitHub contributions for a more detailed list of contributors. # https://github.com/diffpy/diffpy.srmise/graphs/contributors @@ -15,6 +15,7 @@ """Peak extraction and peak fitting tool for atomic pair distribution functions.""" + # package version from diffpy.srmise.version import __version__ diff --git a/src/diffpy/srmise/version.py b/src/diffpy/srmise/version.py index 129ef83..1b97580 100644 --- a/src/diffpy/srmise/version.py +++ b/src/diffpy/srmise/version.py @@ -1,10 +1,10 @@ #!/usr/bin/env python ############################################################################## # -# (c) 2024 The Trustees of Columbia University in the City of New York. +# (c) 2025 The Trustees of Columbia University in the City of New York. # All rights reserved. # -# File coded by: Billinge Group members and community contributors. +# File coded by: Simon Billinge, Billinge Group members. # # See GitHub contributions for a more detailed list of contributors. # https://github.com/diffpy/diffpy.srmise/graphs/contributors