diff --git a/docs/conf.py b/docs/conf.py index 15a8bcb..c7aa519 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,21 +16,21 @@ import os import sys -sys.path.insert(0, os.path.abspath(r'..')) +sys.path.insert(0, os.path.abspath(r"..")) from isogeotoxlsx.__about__ import __title__, __version__ as VERSION from isogeotoxlsx import * # -- Build environment ----------------------------------------------------- -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +on_rtd = os.environ.get("READTHEDOCS", None) == "True" # -- Project information ----------------------------------------------------- project = __title__ -author = 'Isogeo' -copyright = u'2019 - {0}, {1}'.format(date.today().year, author) +author = "Isogeo" +copyright = "2019 - {0}, {1}".format(date.today().year, author) # The short X.Y version version = VERSION @@ -47,22 +47,19 @@ # 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.viewcode', -] +extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"] # 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", ".md"] # The master toctree document. -master_doc = 'index' +master_doc = "index" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -74,11 +71,21 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ["_build", "*.csv", "samples/*", "Thumbs.db", ".DS_Store", - "*env*", "libs/*", "*.xml", "input/*", "output/*"] +exclude_patterns = [ + "_build", + "*.csv", + "samples/*", + "Thumbs.db", + ".DS_Store", + "*env*", + "libs/*", + "*.xml", + "input/*", + "output/*", +] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" # -- Options for HTML output ------------------------------------------------- @@ -86,7 +93,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'default' +html_theme = "default" # 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 @@ -97,7 +104,7 @@ # 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'] +html_static_path = ["_static"] # Custom sidebar templates, must be a dictionary that maps document names # to template names. @@ -113,7 +120,7 @@ # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = 'IsogeoXlsxExporterdoc' +htmlhelp_basename = "IsogeoXlsxExporterdoc" # -- Options for LaTeX output ------------------------------------------------ @@ -122,15 +129,12 @@ # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. # # 'preamble': '', - # Latex figure (float) alignment # # 'figure_align': 'htbp', @@ -140,8 +144,13 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'Isogeo-XlsxExporter.tex', 'Isogeo - XLSX Exporter Documentation', - 'Isogeo', 'manual'), + ( + master_doc, + "Isogeo-XlsxExporter.tex", + "Isogeo - XLSX Exporter Documentation", + "Isogeo", + "manual", + ) ] @@ -150,8 +159,13 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'isogeo-xmltoolbelt', 'Isogeo - XLSX Exporter Documentation', - [author], 1) + ( + master_doc, + "isogeo-export-xlsx", + "Isogeo - XLSX Exporter Documentation", + [author], + 1, + ) ] @@ -161,9 +175,15 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'Isogeo-XlsxExporter', 'Isogeo - XLSX Exporter Documentation', - author, 'Isogeo-XlsxExporter', 'Scripting toolbox to handle import of external geographic metadata', - 'Miscellaneous'), + ( + master_doc, + "Isogeo-XlsxExporter", + "Isogeo - XLSX Exporter Documentation", + author, + "Isogeo-XlsxExporter", + "Scripting toolbox to handle import of external geographic metadata", + "Miscellaneous", + ) ] @@ -182,7 +202,7 @@ # epub_uid = '' # A list of files that should not be packed into the epub file. -epub_exclude_files = ['search.html'] +epub_exclude_files = ["search.html"] # -- Extension configuration ------------------------------------------------- @@ -192,21 +212,20 @@ # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True + # -- Options for Sphinx API doc ---------------------------------------------- # run api doc def run_apidoc(_): from sphinx.ext.apidoc import main cur_dir = os.path.normpath(os.path.dirname(__file__)) - output_path = os.path.join(cur_dir, '_apidoc') + output_path = os.path.join(cur_dir, "_apidoc") modules = os.path.normpath(os.path.join(cur_dir, "../isogeotoxlsx/")) - exclusions = [ - '../input', - '../output', - '/tests', - ] - main(['-e', '-f', '-M', '-o', output_path, modules] + exclusions) + exclusions = ["../input", "../output", "/tests"] + main(["-e", "-f", "-M", "-o", output_path, modules] + exclusions) + # launch setup def setup(app): - app.connect('builder-inited', run_apidoc) + app.connect("builder-inited", run_apidoc) + diff --git a/isogeotoxlsx/__init__.py b/isogeotoxlsx/__init__.py index 126b08c..e3e2fe9 100644 --- a/isogeotoxlsx/__init__.py +++ b/isogeotoxlsx/__init__.py @@ -2,7 +2,7 @@ #! python3 """ - This package is used to export Isogeo metadata into Excel workbooks usng the Isogeo Python SDK and OpenPyXl. + This package is used to export Isogeo metadata into Excel workbooks using the Isogeo Python SDK and OpenPyXl. """ # submodules @@ -10,7 +10,7 @@ from .isogeo2xlsx import Isogeo2xlsx # noqa: F401 # subpackages -from .matrix import * # noqa: F401 -from .utils import * # noqa: F401 +from .matrix import * # noqa: F401,F403 +from .utils import * # noqa: F401,F403 VERSION = __version__