Skip to content

Commit d840c32

Browse files
github-actions[bot]majorgreysemmettbutler
authored
ci: fix readthedocs [backport 1.20] (#6986)
Backport 683489d from #6963 to 1.20. This change makes our readthedocs match the docs builds in CI. In order to make this change, we had to change a few things about how the hatch docs env was configured and skip installing system packages in readthedocs that we don't need. Build preview: https://ddtrace.readthedocs.io/en/majorgreys-readthedocs-hatch/integrations.html Fixes #6897. ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. Co-authored-by: Tahir H. Butt <[email protected]> Co-authored-by: Emmett Butler <[email protected]>
1 parent 3bbaabd commit d840c32

File tree

4 files changed

+11
-33
lines changed

4 files changed

+11
-33
lines changed

.readthedocs.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
11
version: 2
2-
3-
sphinx:
4-
builder: html
5-
configuration: docs/conf.py
6-
fail_on_warning: false
7-
82
build:
93
os: ubuntu-22.04
104
tools:
11-
python: "3.8"
12-
jobs:
13-
post_checkout:
14-
- git fetch --unshallow || true
15-
16-
python:
17-
install:
18-
- requirements: docs/requirements.txt
19-
- method: pip
20-
path: .
5+
python: "3.10"
6+
commands:
7+
- git fetch --unshallow || true
8+
- pip install hatch==1.7.0 hatch-containers==0.7.0
9+
- hatch -v run docs:sphinx-build -W -b html docs docs/_build/html
10+
- mv docs/_build $READTHEDOCS_OUTPUT

docs/requirements.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

hatch.toml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ fmt = [
6060
]
6161

6262
[envs.docs]
63-
type = "container"
6463
template = "docs"
6564
dev-mode = false
6665
python = "3.10"
@@ -84,12 +83,8 @@ build = [
8483
]
8584

8685
[envs.docs.overrides]
87-
# CircleCI executor is an image already set up for docs
88-
# We skip the pre-install as well
89-
env.CIRCLECI.type = [
90-
{ value = "virtual", if = ["true"] },
91-
]
92-
86+
# Local MacOS development requires Docker containers
87+
platform.macos.type = { value = "container" }
9388

9489
[envs.slotscheck]
9590
template = "slotscheck"

scripts/docs/install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -ex
44

55
if [[ "${CIRCLECI}" = "true" ]]; then
66
echo "Skipping install"
7+
elif [[ "${READTHEDOCS}" = "True" ]]; then
8+
# We skip here because we do not check spelling in RTD
9+
echo "Skipping install"
710
else
811
export DEBIAN_FRONTEND="noninteractive"
912
export DEBCONF_NOWARNINGS="yes"

0 commit comments

Comments
 (0)