Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
docs: Add doc building targets for local testing.
Browse files Browse the repository at this point in the history
Move ReadTheDocs config to the `.readthedocs.yml` file.
  • Loading branch information
feanil committed Aug 11, 2021
1 parent a6a13da commit 299a3f2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required: the version of this file's schema.
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/en_us/dashboard/source/conf.py
fail_on_warning: true

# Optionally set the version of Python and requirements required to build your docs
python:
version: "3.8"
install:
- requirements: requirements/doc.txt
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DJANGO_VERSION=django22

DJANGO_SETTINGS_MODULE ?= "analytics_dashboard.settings.local"

.PHONY: requirements clean
.PHONY: requirements clean docs

requirements: requirements.py requirements.js

Expand Down Expand Up @@ -158,3 +158,5 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy
sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
mv requirements/test.tmp requirements/test.txt

docs:
tox -e docs
16 changes: 14 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ envlist = py38-django{22,30,31}-{a11y,accept,check_isort,create_acceptance_test_
DJANGO_SETTINGS_MODULE = analytics_dashboard.settings.test

[testenv]
envdir =
py38: {toxworkdir}/py38
passenv =
API_SERVER_URL
API_AUTH_TOKEN
Expand Down Expand Up @@ -64,3 +62,17 @@ commands =
accept: pytest -v acceptance_tests --ignore=acceptance_tests/course_validation
a11y: pytest -v a11y_tests -k 'not NUM_PROCESSES==1' --ignore=acceptance_tests/course_validation

[testenv:docs]
deps =
-r{toxinidir}/requirements/doc.txt
allowlist_externals =
make
env
setenv =
# -W will treat warnings as errors.
SPHINXOPTS = -W
commands =
# -e allows for overriding setting from the environment.
# -C changes the directory to `docs` before running the command.
make -e -C docs/en_us/dashboard clean
make -e -C docs/en_us/dashboard html

0 comments on commit 299a3f2

Please sign in to comment.