Skip to content

Commit 10f6ece

Browse files
authored
Fix ReadTheDocs Builds (#271)
* create .readthedocs.yaml * add newline * update specs.rst addressing https://stackoverflow.com/a/56469300 (sphinx >=1.3) * update sys path addressing https://stackoverflow.com/a/44980548 * fix: lint * update sys path * temp: add docs/requirements.txt * temp: autodoc_mock_imports * remove docs/requirements.txt * Update conf.py * update autodoc_mock_imports * temp: disable sys path this should fail the readthedocs build: https://readthedocs.org/projects/python-driver-for-arangodb/builds/ * revert last commit * attempt: undo specs.rst changes (the less changes the better) * temp: remove `requests` & `urlib3` from autodoc_mock_imports * temp: remove `requests_toolbelt` from `autodoc_mock_imports` * reintroduce docs/requirements.txt * temp: disable `autodoc_mock_imports` * new: `importlib_metadata` in docs/requirements.txt * new: `jwt` in `docs/requirements.txt` * remove: `autodoc_mock_imports`
1 parent fc5ed39 commit 10f6ece

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

.readthedocs.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.11"
12+
13+
# Build documentation in the "docs/" directory with Sphinx
14+
sphinx:
15+
configuration: docs/conf.py
16+
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
17+
# builder: "dirhtml"
18+
# Fail on all warnings to avoid broken references
19+
fail_on_warning: true
20+
21+
# Optionally build your docs in additional formats such as PDF and ePub
22+
# formats:
23+
# - pdf
24+
# - epub
25+
26+
# Optional but recommended, declare the Python requirements required
27+
# to build your documentation
28+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
29+
python:
30+
install:
31+
- requirements: docs/requirements.txt

docs/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import os
2+
import sys
3+
4+
sys.path.insert(0, os.path.abspath(".."))
5+
16
project = "python-arango"
27
copyright = "2016-2022, Joohwan Oh"
38
author = "Joohwan Oh"

docs/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
requests_toolbelt
2+
importlib_metadata
3+
jwt

0 commit comments

Comments
 (0)