Skip to content

Commit 3199e34

Browse files
authored
Merge pull request #1849 from cuthbertLab/readthedocs-elsewhere
Host our own docs alone
2 parents 4a3ee03 + 136dcff commit 3199e34

4 files changed

Lines changed: 20 additions & 33 deletions

File tree

.readthedocs.yaml

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

documentation/docbuild_requirements.txt

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

documentation/nbvalNotebook.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,30 @@
1212
import subprocess
1313

1414
# noinspection PyPackageRequirements
15-
import pytest # pylint: disable=unused-import # noqa
15+
try:
16+
import pytest
17+
except ImportError: # pragma: no cover
18+
# fail here to get a better message than file-not-found below.
19+
raise ImportError(
20+
'Please install pytest -- in the music21 directory run "pip install ".[dev]"'
21+
)
22+
1623
# noinspection PyPackageRequirements
17-
import nbval # pylint: disable=unused-import # noqa
24+
try:
25+
import nbval
26+
except ImportError: # pragma: no cover
27+
raise ImportError(
28+
'Please install nbval -- in the music21 directory run "pip install ".[dev]"'
29+
)
1830

1931
from music21 import environment
2032
from music21 import common
2133

34+
if pytest is None or nbval is None: # pragma: no cover
35+
# this will never run, but it's important to use pytest and nbval variables
36+
# or some modern code linters will remove the import pytest, import nbval lines.
37+
raise ImportError('Please install pytest and nbval')
38+
2239
# pytest --nbval usersGuide_15_key.ipynb --nbval-sanitize-with ../../nbval-sanitize.cfg -q
2340
skip = ['installJupyter.ipynb']
2441

documentation/source/readthedocs_conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Configuration file for readthedocs
1+
# Configuration file for docs
22
# builds everything before sphinx
33

44
import os

0 commit comments

Comments
 (0)