Skip to content

Commit bff9dca

Browse files
committed
Use sniffer for building docs
1 parent 54655b3 commit bff9dca

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

.tmuxp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"pane",
2828
"echo 'docs built to <http://0.0.0.0:8003/_build/html>'; python -m SimpleHTTPServer 8003",
29-
"watching_testrunner --basepath ./ --pattern=\"*.rst\" 'make html'"
29+
"sniffer"
3030
],
3131
"start_directory": "doc/",
3232
"layout": "main-horizontal",

.tmuxp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ windows:
2424
- focus: true
2525
- pane
2626
- echo 'docs built to <http://0.0.0.0:8003/_build/html>'; python -m SimpleHTTPServer 8003
27-
- watching_testrunner --basepath ./ --pattern="*.rst" 'make html'
27+
- sniffer

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Here you can find the recent changes to tmuxp.
77
CURRENT
88
-------
99

10+
- [internal] Remove ``package_metadata.py`` in favor of ``__about__.py``.
11+
- [docs] ``scent.py`` for building docs
1012
- [tests] testsuite for cli uses :py:func:`tempfile.mkdtemp()` instead
1113
``TMP_DIR`` (which resolved to ``.tmuxp`` in the testsuite directory.
1214
- [tests] replace `watchingtestrunner`_ with `sniffer`_ in examples.

bootstrap_env.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@ def main():
116116
[pip_bin, 'install', '-e', project_dir]
117117
)
118118

119-
if not os.path.isfile(os.path.join(env_dir, 'bin', 'watching_testrunner')):
120-
subprocess.check_call(
121-
[pip_bin, 'install', 'watching-testrunner']
122-
)
123-
124119
if not os.path.isfile(os.path.join(env_dir, 'bin', 'sniffer')):
125120
subprocess.check_call(
126121
[pip_bin, 'install', 'sniffer']

doc/scent.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import os
2+
3+
from sniffer.api import runnable, file_validator
4+
5+
6+
@file_validator
7+
def py_files(filename):
8+
return (filename.endswith('.rst') or filename.endswith('Makefile')) and not os.path.basename(filename).startswith('.')
9+
10+
11+
@runnable
12+
def execute_nose(*args):
13+
from subprocess import call
14+
if len(args) > 1:
15+
return call('make %s' % args[1], shell=True) == 0
16+
else:
17+
return call('make html', shell=True) == 0

0 commit comments

Comments
 (0)