Skip to content

Commit

Permalink
STYLE: Make documentation module consistent with Sphinx conventions
Browse files Browse the repository at this point in the history
Make the documentation module consistent with Sphinx conventions:
- Rename the module to `docs`.
- Host the configuration file and index file in `docs/sources`. Change
  the makefile `SOURCEDIR` variable accordingly.
- Change accordingly the `sphinx-apidoc` command output path argument,
  and the configuration file location in the `.readthedocs.yaml` config
  file.
- Change the relative paths to the files in the `_static` folder.
- Move the Markdown bundle naming and tutorial files and the associated
  screenshots to the `docs/sources` folder so that all files can be
  recursively included from the source directory.
  • Loading branch information
jhlegarreta committed Dec 1, 2023
1 parent baa171e commit 09682e7
Show file tree
Hide file tree
Showing 24 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ build:
jobs:
pre_build:
- pip install --upgrade myst-parser furo
- sphinx-apidoc -f -o doc .
- sphinx-apidoc -f -o docs/source .

# Build documentation in the doc/ directory with Sphinx
sphinx:
configuration: doc/conf.py
configuration: docs/source/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile → docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = doc
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions doc/conf.py → docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# Load the release info into a dict by explicit execution
info = {}
with open(os.path.abspath(os.path.join(
os.path.dirname(__file__), "..", "setup.py")), "r") as f:
os.path.dirname(__file__), "../..", "setup.py")), "r") as f:
for line in f:
if line.startswith(name_setup_str):
project = (
Expand Down Expand Up @@ -93,8 +93,8 @@
#
html_theme = "furo"

html_favicon = "_static/icon/favicon.ico"
html_logo = "_static/wma_small_alpha.png"
html_favicon = "../_static/icon/favicon.ico"
html_logo = "../_static/wma_small_alpha.png"

# 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,
Expand Down
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
File renamed without changes
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
version='0.3.0',
author='Fan Zhang and Lauren O\'Donnell',
author_email='[email protected]',
packages=find_packages(exclude=["doc"]),
packages=find_packages(exclude=["docs"]),
license='LICENSE.txt',
description='Processing of whole-brain streamline tractography.',
long_description=open('README.md').read(),
Expand Down

0 comments on commit 09682e7

Please sign in to comment.