Skip to content

Commit 612f73e

Browse files
committed
Faster docs build
1 parent 39faa74 commit 612f73e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/conf.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# serve to show the default.
1414

1515
import sys, os
16+
from datetime import datetime
1617

1718
# If extensions (or modules to document with autodoc) are in another directory,
1819
# add these directories to sys.path here. If the directory is relative to the
@@ -40,17 +41,15 @@
4041
html_context = {}
4142
html_context["READTHEDOCS"] = True
4243

43-
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
4444

45-
from django import setup
46-
setup()
47-
48-
check_call(f"cd {(Path(__file__).parent.parent).absolute()}; python -m pytest docs -q", shell=True)
45+
check_call(f"cd {(Path(__file__).parent.parent).absolute()}; python -m pytest docs -q -n 4", shell=True)
4946

5047

5148
def build_finished(app, exception):
5249
print('Running build_finished')
50+
start = datetime.now()
5351
check_call(f"cd {(Path(__file__).parent.parent).absolute()}; python insert_docs_links.py", shell=True)
52+
print(' ', (datetime.now() - start).total_seconds(), 'seconds')
5453

5554

5655
def setup(app):

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ gprof2dot
66
parso
77
pytest-django==4.8.0
88
pytest==8.1.1
9+
pytest-xdist
910
pytest_snapshot==0.9.0
1011
ruff==0.3.7
1112
time-machine==2.14.1

0 commit comments

Comments
 (0)