Skip to content

Commit

Permalink
Move notebooks.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Jan 17, 2024
1 parent 8e90140 commit 0d25423
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 48 deletions.
88 changes: 42 additions & 46 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,60 +16,61 @@
# 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.
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
from sphinx import __version__ as sphinxversion

sys.path.insert(0, os.path.abspath(".."))

import cubids
from packaging import version as pver # Avoid distutils.LooseVersion which is deprecated

# 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.append(os.path.abspath('sphinxext'))
sys.path.insert(0, os.path.abspath('../wrapper'))
sys.path.append(os.path.abspath("sphinxext"))
sys.path.insert(0, os.path.abspath("../wrapper"))

# -- General configuration ---------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
needs_sphinx = '1.5.3'
needs_sphinx = "1.5.3"

# 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.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinxarg.ext', # argparse extension
'sphinx.ext.viewcode'
"nbsphinx",
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinxarg.ext", # argparse extension
"sphinx.ext.viewcode",
"sphinx_gallery.load_style",
]

# Mock modules in autodoc:
autodoc_mock_imports = [
'numpy',
'nitime',
'matplotlib',
"numpy",
"nitime",
"matplotlib",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

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

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'CuBIDS'
project = "CuBIDS"
copyright = "2020, PennLINC"
author = "PennLINC"

Expand All @@ -87,15 +88,15 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -106,8 +107,10 @@
# 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_path = ["_themes", ]
html_theme = "sphinx_rtd_theme"
html_theme_path = [
"_themes",
]

# 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
Expand All @@ -118,13 +121,13 @@
# 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']
html_static_path = ["_static"]


# -- Options for HTMLHelp output ---------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'cubidsdoc'
htmlhelp_basename = "cubidsdoc"


# -- Options for LaTeX output ------------------------------------------
Expand All @@ -133,15 +136,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -151,21 +151,15 @@
# (source start file, target name, title, author, documentclass
# [howto, manual, or own class]).
latex_documents = [
(master_doc, 'cubids.tex',
'CuBIDS Documentation',
'PennLINC', 'manual'),
(master_doc, "cubids.tex", "CuBIDS Documentation", "PennLINC", "manual"),
]


# -- Options for manual page output ------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'cubids',
'CuBIDS Documentation',
[author], 1)
]
man_pages = [(master_doc, "cubids", "CuBIDS Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------
Expand All @@ -174,14 +168,16 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'cubids',
'CuBIDS Documentation',
author,
'cubids',
'One line description of project.',
'Miscellaneous'),
(
master_doc,
"cubids",
"CuBIDS Documentation",
author,
"cubids",
"One line description of project.",
"Miscellaneous",
),
]

# -- Fix automodule config
add_module_names = False

14 changes: 14 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Thumbnails gallery
==================

.. nbgallery::
notebooks/Fieldmaps
notebooks/FirstProofofConcept
notebooks/HTML_param_groups
notebooks/JSON_PoC_read_write
notebooks/Key_and_Param_Groups
notebooks/keyparamgrouptest
notebooks/metadata_image_param
notebooks/PofC_Key_Values2
notebooks/rename_files_work
notebooks/workwithtestdata
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ Paper = "https://doi.org/10.1016/j.neuroimage.2022.119609"
doc = [
"nbsphinx",
"packaging",
"recommonmark",
"sphinx >= 2.2",
"sphinx-argparse",
"sphinx_rtd_theme",
"sphinx_gallery",
"sphinx_markdown_tables",
"recommonmark",
"sphinx_rtd_theme",
]
tests = [
"codespell",
Expand Down

0 comments on commit 0d25423

Please sign in to comment.