Skip to content

Commit 136dcff

Browse files
committed
Host our own docs alone
The project tried for over 10 years to get its docs built on readthedocs.org -- but the doc files are just too big and have too much going on with Musescore etc. to have hope that they will ever be build there. So we'll have people read the docs at music21.org/music21docs/
1 parent 4a3ee03 commit 136dcff

File tree

4 files changed

+20
-33
lines changed

4 files changed

+20
-33
lines changed

.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)