Skip to content
Snippets Groups Projects
Commit 65d21adb authored by Denis Arrivault's avatar Denis Arrivault
Browse files

Update doc and correct utf8 reading pb in setup.py

parent 0cfce5a7
No related branches found
No related tags found
No related merge requests found
Pipeline #
recursive-include doc *.rst *.py *.png *.bib
prune splearn/tests
#prune splearn/tests
include *.txt
include *.rst
include VERSION
......
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = scikit-splearn
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
\ No newline at end of file
automaton module
================
.. automodule:: automaton
:members:
:undoc-members:
:show-inheritance:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# scikit-splearn documentation build configuration file, created by
# sphinx-quickstart on Fri Nov 6 17:21:52 2015.
# Configuration file for the Sphinx documentation builder.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
import sys
import os
import shlex
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../splearn'))
#
import os
import sys
import shlex
# sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# -- Project information -----------------------------------------------------
project = 'scikit-splearn'
copyright = u'2018, François Denis, Remi Eyraud, Dominique Benielli, Denis Arrivault'
author = 'François Denis, Remi Eyraud, Dominique Benielli, Denis Arrivault'
# The short X.Y version.
import splearn
version = splearn.__version__
# The full version, including alpha/beta/rc tags.
release = version
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
#
# needs_sphinx = '1.0'
# 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.imgmath'
'sphinx.ext.imgmath',
'sphinx.ext.doctest',
'sphinx.ext.coverage',
]
# Add any paths that contain templates here, relative to this directory.
# templates_path = ['_templates']
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'scikit-splearn'
copyright = '2016, François Denis, Rémi Eyraud and Denis Arrivault and Dominique Benielli'
author = 'François Denis, Rémi Eyraud and Denis Arrivault and Dominique Benielli'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1'
# The full version, including alpha/beta/rc tags.
release = '0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
......@@ -70,220 +65,99 @@ release = '0'
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'splearn.tests*']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'alabaster'
#
html_theme = 'nature'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
html_static_path = ['_static']
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
#html_search_language = 'en'
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'scikit-splearndoc'
# -- Options for LaTeX output ---------------------------------------------
# -- Options for LaTeX output ------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#'figure_align': 'htbp',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'scikit-splearn.tex', 'scikit splearn Documentation',
'François Denis, Rémi Eyraud, Denis Arrivault and dominique Benielli',
'manual'),
(master_doc, 'scikit-splearn.tex', 'scikit-splearn Documentation',
'François Denis, Remi Eyraud, Dominique Benielli, Denis Arrivault', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'scikit-splearn', 'scikit splearn Documentation',
(master_doc, 'scikit-splearn', 'scikit-splearn Documentation',
[author], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'scikit-splearn', 'scikit splearn Documentation',
author, 'scikit-splearn', 'One line description of project.',
'Miscellaneous'),
(master_doc, 'scikit-splearn', 'scikit-splearn Documentation',
author, 'scikit-splearn', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
# -- Extension configuration -------------------------------------------------
\ No newline at end of file
hankel module
===============
.. automodule:: hankel
:members:
:undoc-members:
:show-inheritance:
.. scikit-splearn documentation master file, created by
sphinx-quickstart on Fri Nov 6 17:21:52 2015.
sphinx-quickstart on Fri Feb 16 11:42:36 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to scikit-splearn's documentation!
==========================================
Contents:
.. toctree::
:maxdepth: 3
:maxdepth: 2
:caption: Contents:
modules
Indices and tables
==================
......@@ -19,4 +18,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
......@@ -2,9 +2,6 @@ splearn
=======
.. toctree::
:maxdepth: 2
:maxdepth: 4
automaton
spectral
hankel
splearn.datasets
splearn
spectral module
===============
.. automodule:: spectral
:members: Learning, Spectral
:undoc-members:
:show-inheritance:
splearn.datasets
================
splearn.datasets package
========================
Submodules
----------
base
----
splearn.datasets.base module
----------------------------
.. automodule:: splearn.datasets.base
:members: load_data_sample
:members:
:undoc-members:
:show-inheritance:
data_sample
-----------
splearn.datasets.data\_sample module
------------------------------------
.. automodule:: splearn.datasets.data_sample
:members: DataSample , Splearn_array
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: splearn.datasets
:members:
:undoc-members:
:show-inheritance:
splearn package
===============
Subpackages
-----------
.. toctree::
splearn.datasets
Submodules
----------
splearn.automaton module
------------------------
.. automodule:: splearn.automaton
:members:
:undoc-members:
:show-inheritance:
splearn.hankel module
---------------------
.. automodule:: splearn.hankel
:members:
:undoc-members:
:show-inheritance:
splearn.serializer module
-------------------------
.. automodule:: splearn.serializer
:members:
:undoc-members:
:show-inheritance:
splearn.spectral module
-----------------------
.. automodule:: splearn.spectral
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: splearn
:members:
:undoc-members:
:show-inheritance:
splearn.tests.datasets package
==============================
Submodules
----------
splearn.tests.datasets.get\_dataset\_path module
------------------------------------------------
.. automodule:: splearn.tests.datasets.get_dataset_path
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: splearn.tests.datasets
:members:
:undoc-members:
:show-inheritance:
splearn.tests package
=====================
Submodules
----------
splearn.tests.test\_automaton module
------------------------------------
.. automodule:: splearn.tests.test_automaton
:members:
:undoc-members:
:show-inheritance:
splearn.tests.test\_base module
-------------------------------
.. automodule:: splearn.tests.test_base
:members:
:undoc-members:
:show-inheritance:
splearn.tests.test\_data\_sample module
---------------------------------------
.. automodule:: splearn.tests.test_data_sample
:members:
:undoc-members:
:show-inheritance:
splearn.tests.test\_hankel module
---------------------------------
.. automodule:: splearn.tests.test_hankel
:members:
:undoc-members:
:show-inheritance:
splearn.tests.test\_serializer module
-------------------------------------
.. automodule:: splearn.tests.test_serializer
:members:
:undoc-members:
:show-inheritance:
splearn.tests.test\_spectral module
-----------------------------------
.. automodule:: splearn.tests.test_spectral
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: splearn.tests
:members:
:undoc-members:
:show-inheritance:
......@@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y \
python3-scipy \
graphviz-dev
RUN pip3 install --upgrade pip
RUN pip3 install nose coverage sphinx sphinxcontrib-bibtex
RUN pip3 install pyyaml nose coverage sphinx sphinxcontrib-bibtex
# Copy the scikit-splearn sdist in the docker directory and uncomment the following line
# if you want to include grackelpy sources in the docker image :
......
......@@ -147,7 +147,8 @@ def setup_package():
long_description=(read('README.rst') + '\n\n' +
read('HISTORY.rst') + '\n\n' +
read('AUTHORS.rst')),
packages=["splearn", "splearn.datasets"],
packages=["splearn", "splearn.datasets", "splearn.tests", "splearn.tests.datasets"],
package_data={'splearn.tests.datasets': ['*.*']},
url="https://gitlab.lif.univ-mrs.fr/dominique.benielli/scikit-splearn.git",
license='new BSD',
author='François Denis and Rémi Eyraud and Denis Arrivault and Dominique Benielli',
......
......@@ -662,6 +662,7 @@ class Automaton(object):
def get_dot(self, threshold = 0., nb_dec = 2, title = "Weighted Automata"):
""" Return a string that contains the Automata into dot (graphviz) format
:Example:
>>> from splearn.datasets.base import load_data_sample
......@@ -681,7 +682,7 @@ class Automaton(object):
- Input:
:param Automaton self
:param float threshold for the value to keep. If |weight| < threshold, the
:param float threshold for the value to keep. If \|weight\| < threshold, the
corresponding transition is not kept as an edge in the final dot string.
:param int nb_dec is the number of decimals to keep for the weights.
:param string title corresponds to the top comment of the string
......
......@@ -45,7 +45,7 @@ class Hankel(object):
""" A Hankel instance , compute the list of Hankel matrices
:Example:
>>> from splearn import Learning, Hankel , Spectral
>>> train_file = '0.spice.train'
>>> pT = load_data_sample(adr=train_file)
......@@ -56,9 +56,9 @@ class Hankel(object):
>>> nbL=pT.nbL, nbEx=pT.nbEx,
>>> lrows=6, lcolumns=6, version="classic",
>>> partial=True, sparse=True, mode_quiet=True).lhankel
- Input:
:param dict sample_instance: sample dictionary
:param dict pref: prefix dictionary
:param dict suff: suffix dictionary
......@@ -81,7 +81,7 @@ class Hankel(object):
matrix is sparse
:param boolean mode_quiet: (default value = False) True for no
output message.
:param list of all Hankel matrices. At least one of the two parameters
:param list lhankel: list of all Hankel matrices. At least one of the two parameters
*sample_instance* or *lhankel* has to be not None. If *sample_instance* is given,
the **Hankel** instance is built directly from the sample dictionnary,
else it is deduced from the *lhankels* list of matrices.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment