Skip to content
Permalink
Browse files

remove extra spaces in all files

  • Loading branch information...
sdpython committed Nov 8, 2014
1 parent 468370a commit b2581a0a4952306e93acc8d8c846acadb7aeb9a5
Showing with 1,971 additions and 2,009 deletions.
  1. +5 −5 README.rst
  2. +21 −22 _doc/sphinxdoc/source/conf.py
  3. +3 −3 _doc/sphinxdoc/source/confr_pyp.rst
  4. +8 −9 _doc/sphinxdoc/source/doctestunit.rst
  5. +8 −8 _doc/sphinxdoc/source/generatedoc.rst
  6. +6 −6 _doc/sphinxdoc/source/generatesetup.rst
  7. +2 −4 _doc/sphinxdoc/source/glossary.rst
  8. +5 −5 _doc/sphinxdoc/source/index.rst
  9. +7 −10 _doc/sphinxdoc/source/installation.rst
  10. +1 −1 _doc/sphinxdoc/source/license.rst
  11. +3 −3 _unittests/run_unittests.py
  12. +5 −5 _unittests/ut_funcwin/test_fonction_helper.py
  13. +6 −6 _unittests/ut_funcwin/test_make_window.py
  14. +5 −5 _unittests/ut_funcwin/test_make_window2.py
  15. +1 −1 _unittests/ut_helpgen/data/divabsolute.rst
  16. +5 −5 _unittests/ut_helpgen/data/session1.py
  17. +15 −15 _unittests/ut_helpgen/data/td1a_cenonce_session_10.rst
  18. +6 −6 _unittests/ut_helpgen/test_changes.py
  19. +6 −6 _unittests/ut_helpgen/test_doxy.py
  20. +17 −17 _unittests/ut_helpgen/test_notebooks.py
  21. +5 −5 _unittests/ut_helpgen/test_rst.py
  22. +5 −5 _unittests/ut_helpgen/test_small_functions.py
  23. +21 −21 _unittests/ut_helpgen/test_utils_sphinxdoc.py
  24. +17 −17 _unittests/ut_helpgen/test_utils_sphinxdoc2.py
  25. +13 −13 _unittests/ut_helpgen/test_utils_sphinxdoc2_issues.py
  26. +26 −26 _unittests/ut_helpgen/test_utils_sphinxdoc_full.py
  27. +6 −6 _unittests/ut_helpgen/test_utils_sphinxdocmain.py
  28. +5 −6 _unittests/ut_ipythonhelper/test_ipythonhelper.py
  29. +12 −12 _unittests/ut_loghelper/test_log.py
  30. +3 −3 _unittests/ut_loghelper/test_log_cmd.py
  31. +1 −1 _unittests/ut_loghelper/test_pysvn_helper.py
  32. +9 −9 _unittests/ut_loghelper/test_syncho.py
  33. +3 −3 _unittests/ut_module/test_version.py
  34. +2 −3 _unittests/ut_pandashelper/test_pandashelper.py
  35. +4 −4 _unittests/ut_pycode/test_code_helper.py
  36. +8 −10 _unittests/ut_serverdoc/test_documentation_server.py
  37. +19 −19 _unittests/ut_sync/test_folder.py
  38. +3 −3 _unittests/ut_sync/test_jsdifflib.py
  39. +15 −15 _unittests/ut_sync/test_syncho.py
  40. +9 −9 _unittests/ut_sync/test_syncho_bug.py
  41. +21 −21 _unittests/ut_sync/test_syncho_hash.py
  42. +2 −3 clean_pyd.py
  43. +29 −29 setup.py
  44. +3 −3 src/pyquickhelper/__init__.py
  45. +2 −3 src/pyquickhelper/funcwin/__init__.py
  46. +23 −24 src/pyquickhelper/funcwin/default_functions.py
  47. +83 −85 src/pyquickhelper/funcwin/frame_function.py
  48. +54 −54 src/pyquickhelper/funcwin/frame_params.py
  49. +25 −26 src/pyquickhelper/funcwin/function_helper.py
  50. +49 −50 src/pyquickhelper/funcwin/main_window.py
  51. +20 −21 src/pyquickhelper/funcwin/storing_functions.py
  52. +3 −3 src/pyquickhelper/helpgen/__init__.py
  53. +83 −84 src/pyquickhelper/helpgen/_my_doxypy.py
  54. +176 −176 src/pyquickhelper/helpgen/sphinx_main.py
  55. +2 −3 src/pyquickhelper/helpgen/utils_pywin32.py
  56. +4 −4 src/pyquickhelper/helpgen/utils_sphinx_config.py
  57. +284 −284 src/pyquickhelper/helpgen/utils_sphinx_doc.py
  58. +94 −95 src/pyquickhelper/helpgen/utils_sphinx_doc_helpers.py
  59. +22 −22 src/pyquickhelper/ipythonhelper/kindofcompletion.py
  60. +4 −5 src/pyquickhelper/loghelper/convert_helper.py
  61. +172 −175 src/pyquickhelper/loghelper/flog.py
  62. +1 −1 src/pyquickhelper/loghelper/pqh_exception.py
  63. +13 −14 src/pyquickhelper/loghelper/pyrepo_helper.py
  64. +62 −62 src/pyquickhelper/loghelper/repositories/pygit_helper.py
  65. +42 −43 src/pyquickhelper/loghelper/repositories/pysvn_helper.py
  66. +1 −1 src/pyquickhelper/loghelper/url_helper.py
  67. +3 −3 src/pyquickhelper/pandashelper/readh.py
  68. +18 −20 src/pyquickhelper/pandashelper/tblformat.py
  69. +5 −6 src/pyquickhelper/pandashelper/tblfunction.py
  70. +100 −101 src/pyquickhelper/serverdoc/documentation_server.py
  71. +1 −2 src/pyquickhelper/sync/__init__.py
  72. +75 −76 src/pyquickhelper/sync/file_tree_node.py
  73. +41 −42 src/pyquickhelper/sync/file_tree_status.py
  74. +66 −67 src/pyquickhelper/sync/synchelper.py
  75. +15 −16 src/pyquickhelper/sync/visual_sync.py
  76. +52 −53 src/pyquickhelper/unittests/utils_tests.py
@@ -3,8 +3,8 @@
README
======



**Links:**
* `pypi/pyquickhelper <https://pypi.python.org/pypi/pyquickhelper/>`_
* `GitHub/pyquickhelper <https://github.com/sdpython/pyquickhelper>`_
@@ -19,7 +19,7 @@ This extension gathers three functionalities:
* a function to synchronize two folders: :func:`synchronize_folder <pyquickhelper.sync.synchelper.synchronize_folder>`
* a function to generate a copy of a module, converting doxygen documentation in rst format: :func:`generate_help_sphinx <pyquickhelper.helpgen.sphinx_main.generate_help_sphinx>` (see also :func:`prepare_file_for_sphinx_help_generation <pyquickhelper.helpgen.utils_sphinx_doc.prepare_file_for_sphinx_help_generation>`),
it requires the module is designed as this one (`src`, `_doc` folders).

The module is available on `pypi/pyquickhelper <https://pypi.python.org/pypi/pyquickhelper/>`_ and
on `GitHub/pyquickhelper <https://github.com/sdpython/pyquickhelper>`_.

@@ -42,7 +42,7 @@ This project contains various helper about logging functions, unit tests and hel
* a _doc folder: ``_doc``, it will contain the documentation
* a file ``setup.py`` to build and to install the module
* a file ``make_help.py`` to build the sphinx documentation

Versions
--------

@@ -62,4 +62,4 @@ Versions
* **change:** the documentation compiles under linux (the latex part was not tested and removed from the script ``build_setup_help_on_linux.sh``)
* **0.6 - 2014/08/24**
* **change:** minor fixes for the documentation generation
* **add:** add code to handle conversion of notebooks in docx format
* **add:** add code to handle conversion of notebooks in docx format
@@ -44,18 +44,18 @@ def extract_version_from_setup():

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [ 'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.pngmath',
'sphinx.ext.ifconfig',
extensions = [ 'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.pngmath',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinxcontrib.fancybox',
'sphinx.ext.autosummary',
'sphinx.ext.graphviz',
'sphinx.ext.inheritance_diagram',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['phdoc_templates']

@@ -117,11 +117,11 @@ def extract_version_from_setup():
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
# A list of prefixes that are ignored for sorting the Python module index (e.g., if this is set to ['foo.'], then foo.bar is shown under B, not F).
# This can be handy if you document a project that consists of a single package.
# A list of prefixes that are ignored for sorting the Python module index (e.g., if this is set to ['foo.'], then foo.bar is shown under B, not F).
# This can be handy if you document a project that consists of a single package.
# Works only for the HTML builder currently. Default is [].
modindex_common_prefix = [
project_var_name + ".",
modindex_common_prefix = [
project_var_name + ".",
]

# -- Options for HTML output ---------------------------------------------------
@@ -221,10 +221,10 @@ def extract_version_from_setup():
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
( 'index',
'%s_doc.tex' % project_var_name,
( 'index',
'%s_doc.tex' % project_var_name,
'%s Documentation' % project_var_name,
author,
author,
'manual'),
]

@@ -254,10 +254,10 @@ def extract_version_from_setup():
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
( 'index',
'%s_doc' % project_var_name,
( 'index',
'%s_doc' % project_var_name,
'%s Documentation' % project_var_name,
[author],
[author],
1)
]

@@ -272,7 +272,7 @@ def extract_version_from_setup():
# dir menu entry, description, category)
texinfo_documents = [
('index', '%s_documentation' % project_var_name, '%s Documentation' % project_var_name,
author, '%s documentation' % project_var_name,
author, '%s documentation' % project_var_name,
'One line description of project.',
'Miscellaneous'),
]
@@ -299,11 +299,11 @@ def extract_version_from_setup():
if sys.platform.startswith("win") :
if not os.path.exists(graphviz_dot):
raise FileNotFoundError(graphviz_dot)

def skip(app, what, name, obj, skip, options):
if name.startswith("_") and name not in \
[ "__qualname__",
"__module__",
[ "__qualname__",
"__module__",
"__dict__",
"__doc__",
"__weakref__",
@@ -313,5 +313,4 @@ def skip(app, what, name, obj, skip, options):

def setup(app):
app.connect("autodoc-skip-member", skip)
app.add_config_value('author', 'Xavier Dupré', True)

app.add_config_value('author', 'Xavier Dupré', True)
@@ -7,6 +7,6 @@ conf.py
.. automodule:: conf
:members:
:undoc-members:
.. literalinclude:: conf.py


.. literalinclude:: conf.py
@@ -5,14 +5,14 @@ Documentation, unit tests, setup




Unit tests
----------

The project includes an easy to write and run unit tests:
* the file ``_unittests/run_unittests.py`` runs all of them.
* you can add a new one in a folder: ``_unittests/<subfolder>/test_<filename>.py``.

This test file must begin by ``test_`` and must look like the following::

"""
@@ -33,20 +33,19 @@ This test file must begin by ``test_`` and must look like the following::
import src

from pyquickhelper import fLOG
# import the file you want to test

# import the file you want to test
from src.project_name.subproject.myexample import myclass

class TestExample (unittest.TestCase):

def test_split_cmp_command(self) :

# to log information
fLOG (__file__, self._testMethodName, OutputPrint = __name__ == "__main__")

# you test content
# it must raises an exception if a test fails.

if __name__ == "__main__" :
unittest.main ()

unittest.main ()
@@ -6,23 +6,23 @@ Generate this documentation
The documentation can be written using `RST <http://sphinx-doc.org/rest.html>`_ format
or `javadoc <http://en.wikipedia.org/wiki/Javadoc>`_ format.
The program ``make_help.py`` without any required change except mention in the introduction.
The program ``make_help.py`` without any required change except mention in the introduction.
Just run it. It will go through the following steps:

* it will copy all files found in ``src`` in folder ``_doc/sphinxdoc/source/[project_name]``
* it will replace all relative import by absolute import (by adding proper
* it will replace all relative import by absolute import (by adding proper
* it will generates a file .rst for each python file in ``_doc/sphinxdoc/source/[project_name]``
* it will run the generation of the documentation using Sphinx.
* notebooks can be placed in ``_doc/notebooks``, they will be added to the documentation

The results are stored in folder ``_doc/sphinxdoc/build``. On Windows,
the batch file ``build_setup_help_on_windows.bat`` copies all files
into ``dist/html``.


Configuration:
* :ref:`l-confpy`

Design
++++++

@@ -33,18 +33,18 @@ The module is organized as follows:
* ``pyquickhelper/_unittests/_doc/notebooks``: contains the notebooks included in the documentation
* ``pyquickhelper/_unittests/_doc/sphinxdoc/source``: contains the sphinx documentation

When the documentation is being generated (by script ``pyquickhelper/make_help.py``,
When the documentation is being generated (by script ``pyquickhelper/make_help.py``,
the sources are copied into ``pyquickhelper/_unittests/_doc/sphinxdoc/source/pyquickhelper``.
The documentation in `javadoc <http://en.wikipedia.org/wiki/Javadoc>`_ format is replaced by the RST syntax. Various
files are automatically generated (indexes, examples, FAQ).
Then `sphinx <http://sphinx-doc.org/>`_ is run.

After the documentation is generated, everything is copied into folder
``pyquickhelper/dist``.


Extensions to install
+++++++++++++++++++++

* `Sphinx <http://sphinx-doc.org/>`_
* `fancybox <http://spinus.github.io/sphinxcontrib-fancybox/>`_
* `fancybox <http://spinus.github.io/sphinxcontrib-fancybox/>`_
@@ -5,18 +5,18 @@ Unless you add an extension or some data to your module (images, text files),
no modification are required. To generate a zip or gz setup::

%pythonexe% setup.py sdist --formats=gztar,zip

To generate an executable setup on Windows::

%pythonexe% clean_pyd.py
%pythonexe% setup.py bdist_wininst

To generate a file *.msi* on Windows::

%pythonexe% clean_pyd.py
%pythonexe% setup.py bdist_msi
The first script removes all files ``.pyd`` which might cause some

The first script removes all files ``.pyd`` which might cause some
issues if a setup for a different platform was generated.
To generate the setup for 64bit (it also works for the file *.msi*)::

@@ -26,4 +26,4 @@ To generate the setup for 64bit (it also works for the file *.msi*)::
On Windows, the file ``build_setup_help_on_windows.bat`` does everything for you.
It also copies the documentation in folder ``dist``.
`setuptools <https://pythonhosted.org/setuptools/>`_ is the only needed module
to generate the setup.
to generate the setup.
@@ -2,8 +2,6 @@ Glossary
========

.. glossary::

pyquickhelper
this module


pyquickhelper
this module
@@ -6,8 +6,8 @@
pyquickhelper documentation
===========================



**Links:**
* `pypi/pyquickhelper <https://pypi.python.org/pypi/pyquickhelper/>`_
* `GitHub/pyquickhelper <https://github.com/sdpython/pyquickhelper>`_
@@ -22,7 +22,7 @@ This extension gathers three functionalities:
* a logging function: :func:`fLOG <pyquickhelper.loghelper.flog.fLOG>`
* a function to synchronize two folders: :func:`pyquickhelper.synchronize_folder <pyquickhelper.sync.synchelper.synchronize_folder>`
* a function to generate a copy of a module, converting doxygen documentation in rst format: :func:`generate_help_sphinx <pyquickhelper.helpgen.sphinx_main.generate_help_sphinx>` (see also :func:`prepare_file_for_sphinx_help_generation <pyquickhelper.helpgen.utils_sphinx_doc.prepare_file_for_sphinx_help_generation>`)

The module is available on `pypi/pyquickhelper <https://pypi.python.org/pypi/pyquickhelper/>`_ and
on `GitHub/pyquickhelper <https://github.com/sdpython/pyquickhelper>`_.

@@ -46,7 +46,7 @@ Indices and tables
+------------------+---------------------+---------------------+------------------+------------------------+------------------------------------------------+
| :ref:`l-example` | :ref:`l-FAQ` | :ref:`l-notebooks` | | | `Unit Test Coverage <coverage/index.html>`_ |
+------------------+---------------------+---------------------+------------------+------------------------+------------------------------------------------+

Navigation
==========

@@ -66,4 +66,4 @@ Navigation
license
filechanges
README
all_indexes
all_indexes
@@ -2,31 +2,28 @@ Installation
============


* Windows installation:
* Windows installation:
* run the setup ``pyquickhelper*.win32.exe``
* Windows installation with source:
* download the file ``pyquickhelper*.tar.gz`` and unzip it
* type the following commands::

set PATH=%PATH%;c:\Python33
python.exe setup.py install
python.exe setup.py install

* Linux installation:
* download the file ``pyquickhelper*.tar.gz``
* type the following commands::

tar xf pyquickhelper-py3.3.tar.gz
sudo su
python3.3 setup.py install

* Using pip::

pip install pyquickhelper

If you install on `WinPython <http://winpython.sourceforge.net/>`_ distribution,
you will need to add ``--pre`` to force the installation::

pip install pyquickhelper --pre

pip install pyquickhelper --pre
@@ -4,4 +4,4 @@ License
=======

.. include:: LICENSE.txt
:literal:
:literal:
@@ -14,10 +14,10 @@ def main():

import pyquickhelper
from pyquickhelper import fLOG, run_cmd
from pyquickhelper.unittests.utils_tests import main
from pyquickhelper.unittests.utils_tests import main

fLOG(OutputPrint = True)

runner = unittest.TextTestRunner(verbosity=0, stream = io.StringIO ())
path = os.path.abspath(os.path.join(os.path.split(__file__) [0]))
res = main(runner, path_test = path, skip = -1)
@@ -27,4 +27,4 @@ def main():
print ("*", r[1], r[0])

if __name__ == "__main__" :
main()
main()

0 comments on commit b2581a0

Please sign in to comment.
You can’t perform that action at this time.