Skip to content

Commit

Permalink
Merge pull request #1103 from openforcefield/rtd-fail-on-warn
Browse files Browse the repository at this point in the history
Fix RTD build
  • Loading branch information
mattwthompson authored Nov 13, 2024
2 parents 48a65a6 + 6c1936c commit 92f6b9d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
9 changes: 8 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ build:

sphinx:
configuration: docs/conf.py
fail_on_warning: false
# Interchange's docs should not produce warnings; if they start,
# something is broken (most likely automatic API doc generation)
fail_on_warning: true

conda:
environment: devtools/conda-envs/docs_env.yaml

python:
install:
- method: pip
path: .
20 changes: 11 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,8 @@
# Incase the project was not installed
import importlib
import os
import sys

try:
from openff.interchange import __version__
except ModuleNotFoundError:
__version__ = "0.0.0"

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

from openff.interchange import __version__

# -- Project information -----------------------------------------------------

Expand Down Expand Up @@ -290,4 +283,13 @@
]


# -- Extension configuration -------------------------------------------------
# -- ReadTheDocs configuration -------------------------------------------------

if os.environ.get("READTHEDOCS", "") == "True":
# Define the canonical URL if you are using a custom domain on Read the Docs
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

# Tell Jinja2 templates the build is running on Read the Docs
if "html_context" not in globals():
html_context = {}
html_context["READTHEDOCS"] = True
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
build-backend = "setuptools.build_meta"

[project]
name="Interchange"
name="openff-interchange"
description = "A project (and object) for storing, manipulating, and converting molecular mechanics data."
readme = "README.md"
authors = [{name = "Open Force Field Initiative", email = "[email protected]"}]
Expand Down

0 comments on commit 92f6b9d

Please sign in to comment.