From 5bceaf7ab72764d714cf413cd485606c6b741767 Mon Sep 17 00:00:00 2001 From: Adam Reeve Date: Tue, 12 Sep 2023 10:01:47 +1200 Subject: [PATCH 1/5] Update .readthedocs.yaml --- .readthedocs.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 404510d..a634975 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,11 +1,13 @@ version: 2 -# Build from the docs/ directory with Sphinx +build: + os: "ubuntu-22.04" + tools: + python: "3.11" + sphinx: configuration: docs/conf.py -# Explicitly set the version of Python and its requirements python: - version: 3.8 install: - requirements: docs/requirements.txt From 92d1a741aab6cf3fd58711149164315b836ddda8 Mon Sep 17 00:00:00 2001 From: Adam Reeve Date: Tue, 12 Sep 2023 10:38:08 +1200 Subject: [PATCH 2/5] Remove year from docs copyright --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index dccd495..4339ef7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,7 +45,7 @@ # 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 From 2146cdc0fd1bbde67a913228fbd3a34436ee3f15 Mon Sep 17 00:00:00 2001 From: Adam Reeve Date: Tue, 12 Sep 2023 10:34:12 +1200 Subject: [PATCH 3/5] Fix setting sys.path when building docs --- docs/conf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 4339ef7..11d26e2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 ----------------------------------------------------- @@ -52,7 +52,7 @@ # 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. From b49e04ad611fae38d584a2d5f6c81d76a5fcff86 Mon Sep 17 00:00:00 2001 From: Adam Reeve Date: Tue, 12 Sep 2023 10:48:34 +1200 Subject: [PATCH 4/5] Try installing nptdms from root directory for docs build --- .readthedocs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a634975..9cbc36a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -11,3 +11,5 @@ sphinx: python: install: - requirements: docs/requirements.txt + - method: pip + path: . From ecf9d27bcec2b178b145396a79068acda4167ae8 Mon Sep 17 00:00:00 2001 From: Adam Reeve Date: Tue, 12 Sep 2023 10:51:56 +1200 Subject: [PATCH 5/5] Fail on warning --- .readthedocs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 9cbc36a..b5c4be8 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,6 +7,7 @@ build: sphinx: configuration: docs/conf.py + fail_on_warning: true python: install: