From a9715ad0e5d13d83e7af1735861b8b9f9689a22f Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Fri, 16 Jan 2015 09:43:17 +0100 Subject: [PATCH] Doc: Clean-up conf.py - Remove path to sample wavfile - Restore default parameters for *html_domain_indices* . The previous command was preventing np-modindex to appear as a second module index. This seems to be covered by 'numpydoc_show_class_members = False'. (See https://github.com/matplotlib/matplotlib/issues/1837/) --- doc/source/conf.py | 11 +++-------- doc/source/intro.rst | 9 +++++---- doc/source/tutorial/quick_start.rst | 4 ++++ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 7c57960..afbc635 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -35,11 +35,6 @@ extensions = ['sphinx.ext.autodoc', 'matplotlib.sphinxext.plot_directive'] doctest_path = os.path.abspath('../../') -doctest_global_setup = ''' -import os -# os.getcwd() -> /doc -wav_file = os.path.join(os.getcwd(),'../tests/samples/sweep.mp3') -''' autodoc_default_flags = 'show-inheritance' autoclass_content = 'both' @@ -61,7 +56,7 @@ master_doc = 'index' # General information about the project. project = u'TimeSide' -copyright = u'2014, Guillaume Pellerin, Paul Brossier, Thomas Fillon' +copyright = u'2015, Guillaume Pellerin, Paul Brossier, Thomas Fillon' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -164,9 +159,9 @@ html_static_path = ['_static'] #html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +html_domain_indices = True # This is required to remove the superfluous np module index added by numpydoc -html_domain_indices = ['py-modindex'] +#html_domain_indices = ['py-modindex'] # If false, no index is generated. #html_use_index = True diff --git a/doc/source/intro.rst b/doc/source/intro.rst index 99913bf..f870163 100644 --- a/doc/source/intro.rst +++ b/doc/source/intro.rst @@ -62,10 +62,11 @@ To list all available plugins: .. testcleanup:: + import os os.remove('sweep.ogg') os.remove('waveform.png') -.. doctest:: +.. doctest:: >>> import timeside >>> timeside.core.list_processors() # doctest: +SKIP @@ -73,7 +74,7 @@ To list all available plugins: Define some processors: -.. doctest:: +.. doctest:: >>> from timeside.core import get_processor >>> from timeside.core.tools.test_samples import samples @@ -85,13 +86,13 @@ Define some processors: Then run the *magic* pipeline: -.. doctest:: +.. doctest:: >>> (decoder | grapher | analyzer | encoder).run() Render the grapher results: -.. doctest:: +.. doctest:: >>> grapher.render(output='waveform.png') diff --git a/doc/source/tutorial/quick_start.rst b/doc/source/tutorial/quick_start.rst index 2b46f1e..4b75de5 100644 --- a/doc/source/tutorial/quick_start.rst +++ b/doc/source/tutorial/quick_start.rst @@ -4,6 +4,10 @@ A most basic operation, transcoding, is easily performed with two processors: +.. testsetup:: * + + import os + .. testcleanup:: test_1 os.remove('sweep.ogg') -- 2.39.5