Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building the documentation on readthedocs #310

Merged
merged 5 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
version: 2

# Build from the docs/ directory with Sphinx
build:
os: "ubuntu-22.04"
tools:
python: "3.11"

sphinx:
configuration: docs/conf.py
fail_on_warning: true

# Explicitly set the version of Python and its requirements
python:
version: 3.8
install:
- requirements: docs/requirements.txt
- method: pip
path: .
14 changes: 7 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
import sys
import configparser
from pathlib import Path

# 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('..'))
# Allow importing nptdms from the parent directory for building API docs
repo_root = Path(__file__).parent.parent
sys.path.insert(0, str(repo_root))

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

Expand Down Expand Up @@ -45,14 +45,14 @@

# General information about the project.
project = u'npTDMS'
copyright = u'2012, Adam Reeve'
copyright = u'Adam Reeve'

# 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.
#
setup_cfg = configparser.ConfigParser()
setup_cfg.read('../setup.cfg')
setup_cfg.read(repo_root / 'setup.cfg')
# The short X.Y version.
version = '.'.join(setup_cfg['metadata']['version'].split('.')[:2])
# The full version, including alpha/beta/rc tags.
Expand Down
Loading