diff --git a/CHANGELOG b/CHANGELOG index 7a03d90..3e0a7c1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,20 +13,20 @@ The rules for this file: * accompany each entry with github issue/PR number (Issue #xyz) ------------------------------------------------------------------------------ -10/21/2023 IAlibay, orbeckst +10/21/2023 IAlibay, orbeckst, lilyminium * 1.0.2 Changes - * Python 3.12 is now supported - + * Python 3.12 is now supported (PR #128) + * Use new MDAnalysis docs theme (PR #127) Fixes * updated versioneer to be able to run under Python 3.12 (#124, PR #128) * replaced deprecated pkg_resources in tests with importlib (#130) - + 05/24/2022 IAlibay diff --git a/ci/environment.yaml b/ci/environment.yaml index b002ee0..9a3355f 100644 --- a/ci/environment.yaml +++ b/ci/environment.yaml @@ -6,7 +6,8 @@ dependencies: - numpy>=1.21 - scipy - mrcfile - - sphinx<7.0 + + # documentation + - mdanalysis-sphinx-theme >=1.0.1 - pip: - - sphinx-sitemap - - sphinx-rtd-theme + - sphinx_sitemap \ No newline at end of file diff --git a/doc/source/_static/custom.css b/doc/source/_static/custom.css deleted file mode 100644 index 480aa32..0000000 --- a/doc/source/_static/custom.css +++ /dev/null @@ -1,206 +0,0 @@ -/* override css for readable.css */ - -/* styles/fonts to match http://mdanalysis.org (see public/css) */ -/* MDAnalysis orange: #FF9200 */ -/* MDAnalysis gray: #808080 */ -/* MDAnalysis white: #FFFFFF */ -/* MDAnalysis black: #000000 */ -/* Darker orange: e76900 */ -/* Even darker orange: #a24900 */ -/* RTD dark grey: #343131 */ -/* RTD light grey: #e6e6e6 */ - -/* -- page layout --------------------------------------------------------- */ - -body { - font-family: 'PT Sans', Helvetica, Arial, 'sans-serif'; - font-size: 17px; -} - -div.body { - color: #000000; -} - -div.sphinxsidebar a:hover { - text-decoration: none !important; -} - -div.sphinxsidebar p { - color: #808080; -} - -/* Home MDAnalysis colour */ -.wy-side-nav-search > a { - color: #343131; -} - -/* Side MDAnalysis version colour */ -.wy-side-nav-search > div.version { - color: #808080; -} - -/* Menubar caption colour */ -div.wy-menu-vertical span.caption-text { - color: #FF9200; -} - -/* Mobile layout menubar option */ -nav.wy-nav-top { - background: #343131; -} - -/* Menu search bar outline (default blue) */ -.wy-side-nav-search input[type="text"] { - border-color: #808080; -} - - -/* -- body styles --------------------------------------------------------- */ - -/* Different coloured links for sidebar vs body) */ -div.rst-content a { - color: #FF9200; - text-decoration: none; -} - -div.rst-content a:visited { - color: #FF9200; -} - -a:hover { - color: #FF9200 !important; - text-decoration: underline; -} - - -pre, tt, code { - font-family: Menlo, Monaco, 'Courier New', monospace -} - - -div.body h1 { - font-weight: bolder; -} - -a.headerlink { - color: #808080; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #808080; - color: #fff; -} - -/* ------- admonition boxes ------- */ - -div.admonition { - margin: 10px 0px; - padding: 10px 10px; -} - -div.admonition p.admonition-title { - font-size: 100%; - font-weight: bolder; -} - -/* ----- Tables ----- */ - -/* override table width restrictions */ -/* wrap tables instead of scrolling */ -@media screen and (min-width: 767px) { - - .wy-table-responsive table td, .wy-table-responsive table th { - /* !important prevents the common CSS stylesheets from overriding - this as on RTD they are loaded after this stylesheet */ - white-space: normal !important; - } - - .wy-table-responsive { - overflow: visible !important; - max-width: 100% !important; - } - } - -/* ----- Field lists ------ */ - -.section > dl.field-list { - display: flex; - flex-wrap: wrap; - margin: 0; - padding: 0; -} - -dl.field-list > dt::after { - content: ":"; -} - -.rst-content dl:not(.docutils) dt { - background: none; - color: #000000; - border-top: none; -} - -.section > dl.field-list dt { - margin: 0; - padding: 0; - flex-basis: 20%; - display: block; -} - -.section > dl.field-list > dd { - flex-basis: 70%; - margin: 0; -} - -.section > dl.field-list > dd p { - margin: 0; -} - -/* ----- MDAnalysis coloured elements ------ */ - -.rst-content dl.class dt, .rst-content dl.function dt { - color: #ca6500; - background: #FFEBD0; - border-top: solid 3px #FF9200; -} - -.rst-content .viewcode-link, .rst-content .viewcode-back { - color: #808080; -} - -.rst-content .guilabel { - background: #efefef; - border: 1px solid #808080; -} - - -.rst-content .seealso p.admonition-title { - background: #808080; -} - -.rst-content .seealso { - background: #e3e3e3; -} - -.rst-content .error p.admonition-title, .rst-content .warning p.admonition-title { - background: #F45F4B; -} - -.rst-content .error, .rst-content .warning { - background: #FFEEED; -} - -.rst-content .caution p.admonition-title, .rst-content .note p.admonition-title, .rst-content .important p.admonition-title { - background: #FF9200; -} - -.rst-content .caution, .rst-content .note, .rst-content .important { - background: #FFEBD0; -} - -.rst-content code:not(.xref).literal { - color: #ca6500; -} \ No newline at end of file diff --git a/doc/source/_static/logos/mdanalysis-logo-200x150.png b/doc/source/_static/logos/mdanalysis-logo-200x150.png deleted file mode 100644 index 4246d67..0000000 Binary files a/doc/source/_static/logos/mdanalysis-logo-200x150.png and /dev/null differ diff --git a/doc/source/_static/logos/mdanalysis-logo.ico b/doc/source/_static/logos/mdanalysis-logo.ico deleted file mode 100644 index 3c102d0..0000000 Binary files a/doc/source/_static/logos/mdanalysis-logo.ico and /dev/null differ diff --git a/doc/source/_templates/footer.html b/doc/source/_templates/footer.html deleted file mode 100644 index 5fd6ad4..0000000 --- a/doc/source/_templates/footer.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "!footer.html" %} - -{% block extrafooter %} -{{ super() }} - -{% endblock %} diff --git a/doc/source/conf.py b/doc/source/conf.py index f282183..e4261dd 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -16,12 +16,11 @@ # 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 os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +# sys.path.insert(0, os.path.abspath('.')) # make sure sphinx always uses the current branch -sys.path.insert(0, os.path.abspath('../..')) +sys.path.insert(0, os.path.abspath("../..")) -import sphinx_rtd_theme # -- General configuration ----------------------------------------------------- @@ -32,82 +31,88 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', - 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', - 'sphinx.ext.napoleon', 'sphinx.ext.todo', - 'sphinx_sitemap', - ] +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", + "sphinx.ext.viewcode", + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "sphinx_sitemap", +] -mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML' +mathjax_path = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" # for sitemap with https://github.com/jdillard/sphinx-sitemap site_url = "https://www.mdanalysis.org/GridDataFormats/" sitemap_url_scheme = "{link}" # https://stackoverflow.com/questions/5599254/how-to-use-sphinxs-autodoc-to-document-a-classs-init-self-method -autoclass_content = 'both' +autoclass_content = "both" # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # The suffix of source filenames. -source_suffix = '.rst' +source_suffix = ".rst" # The encoding of source files. -#source_encoding = 'utf-8-sig' +# source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = 'index' +master_doc = "index" # General information about the project. -project = u'GridDataFormats' -authors = (u'Oliver Beckstein, Jan Domanski, Jesse Johnson, Max Linke, Tyler Luchko, ' - u'Dominik Mierzejewski, Giacomo Fiorin, Lily Wang, Josh Vermaas, ' - u'Irfan Alibay,Zhiyi Wu') -copyright = u'2007-2021, ' + authors +project = "GridDataFormats" +authors = ( + "Oliver Beckstein, Jan Domanski, Jesse Johnson, Max Linke, Tyler Luchko, " + "Dominik Mierzejewski, Giacomo Fiorin, Lily Wang, Josh Vermaas, " + "Irfan Alibay,Zhiyi Wu" +) +copyright = "2007-2023, " + authors # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The full version, including alpha/beta/rc tags. -release = __import__('gridData').__version__ +release = __import__("gridData").__version__ # The short X.Y version. -version = ".".join(release.split('.')[:2]) +version = ".".join(release.split(".")[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +# language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -#today = '' +# today = '' # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [] # The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None +# default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +# add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +# add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +# show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'default' +pygments_style = "default" # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +# modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------------- @@ -115,37 +120,17 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'sphinx_rtd_theme' +html_theme = "mdanalysis_sphinx_theme" -html_theme_path = [ - sphinx_rtd_theme.get_html_theme_path() -] +# html_theme_path = [] # 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. # -# styles/fonts to match https://userguide.mdanalysis.org -# -# /* MDAnalysis orange: #FF9200 */ -# /* MDAnalysis gray: #808080 */ -# /* MDAnalysis white: #FFFFFF */ -# /* MDAnalysis black: #000000 */ - -html_theme_options = { - 'canonical_url': '', - 'logo_only': True, - 'display_version': True, - 'prev_next_buttons_location': 'bottom', - 'style_external_links': False, - 'style_nav_header_background': 'white', - # Toc options - 'collapse_navigation': True, - 'sticky_navigation': True, - 'navigation_depth': 4, - 'includehidden': True, - 'titles_only': False, -} + + +html_theme_options = {"mda_official": True} # options common to RTD and MDAnalysis theme @@ -154,8 +139,8 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # For RTD theme: custom.css to override theme defaults. -html_static_path = ['_static'] -html_css_files = ['custom.css'] +html_static_path = ["_static"] +# html_css_files = [] # The name of an image file (relative to this directory) to place at the top @@ -165,91 +150,94 @@ # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -html_favicon = "_static/logos/mdanalysis-logo.ico" +# html_favicon = "_static/logos/mdanalysis-logo.ico" # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' +# html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -#html_use_smartypants = True +# html_use_smartypants = True # Additional templates that should be rendered to pages, maps page names to # template names. -#html_additional_pages = {} +# html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +# html_domain_indices = True # If false, no index is generated. -#html_use_index = True +# html_use_index = True # If true, the index is split into individual pages for each letter. -#html_split_index = False +# html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +# html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True +# html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True +# html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. -html_use_opensearch = 'https://www.mdanalysis.org/GridDataFormats' +html_use_opensearch = "https://www.mdanalysis.org/GridDataFormats" # This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None +# html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'GridDataFormatsDoc' +htmlhelp_basename = "GridDataFormatsDoc" # -- Options for LaTeX output -------------------------------------------------- latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', + # The paper size ('letterpaper' or 'a4paper'). + #'papersize': 'letterpaper', + # The font size ('10pt', '11pt' or '12pt'). + #'pointsize': '10pt', + # Additional stuff for the LaTeX preamble. + #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'gridDataFormats.tex', u'gridDataFormats Documentation', - authors, 'manual'), + ( + "index", + "gridDataFormats.tex", + "gridDataFormats Documentation", + authors, + "manual", + ), ] # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +# latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = False +# latex_use_parts = False # If true, show page references after internal links. -#latex_show_pagerefs = False +# latex_show_pagerefs = False # If true, show URL addresses after external links. -#latex_show_urls = False +# latex_show_urls = False # Documents to append as an appendix to all manuals. -#latex_appendices = [] +# latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True +# latex_domain_indices = True # -- Options for manual page output -------------------------------------------- @@ -257,12 +245,11 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'griddataformats', u'gridDataFormats Documentation', - authors.split(), 1) + ("index", "griddataformats", "gridDataFormats Documentation", authors.split(), 1) ] # If true, show URL addresses after external links. -#man_show_urls = False +# man_show_urls = False # -- Options for Texinfo output ------------------------------------------------ @@ -271,23 +258,30 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'gridDataFormats', u'gridDataFormats Documentation', - authors, 'gridDataFormats', 'Grid structure for regular data together with common format readers.', - 'Miscellaneous'), + ( + "index", + "gridDataFormats", + "gridDataFormats Documentation", + authors, + "gridDataFormats", + "Grid structure for regular data together with common format readers.", + "Miscellaneous", + ), ] # Documents to append as an appendix to all manuals. -#texinfo_appendices = [] +# texinfo_appendices = [] # If false, no module index is generated. -#texinfo_domain_indices = True +# texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' +# texinfo_show_urls = 'footnote' # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None, - 'https://docs.scipy.org/doc/numpy/': None, - 'https://docs.scipy.org/doc/scipy/reference/': None, - } +intersphinx_mapping = { + "python": ("https://docs.python.org/3/", None), + "numpy": ("https://numpy.org/doc/stable/", None), + "scipy": ("https://docs.scipy.org/doc/scipy/", None), +}