diff --git a/.gitignore b/.gitignore index 5f246bd..f6a5187 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,4 @@ tests/profiler.py scratchpad.py .venv +.vscode diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..adb9f5e --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,28 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-20.04 + tools: + python: "3.9" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + builder: html +# If using Sphinx, optionally build your docs in additional formats such as PDF +# formats: +# - pdf + +# Optionally declare the Python requirements required to build your docs +python: + install: + - requirements: docs/requirements.txt + - requirements: requirements.txt + - method: pip + path: . diff --git a/docs/conf.py b/docs/conf.py index 4671278..c3b7224 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,42 +25,44 @@ # If your documentation needs a minimal Sphinx version, state it here. # -# needs_sphinx = '1.0' +needs_sphinx = "4.2.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.intersphinx', - 'sphinx.ext.coverage', - 'sphinx.ext.imgmath', - 'sphinx.ext.viewcode'] +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.intersphinx", + "sphinx.ext.coverage", + "sphinx.ext.imgmath", + "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' +source_suffix = ".rst" # The master toctree document. -master_doc = 'index' +master_doc = "index" # General information about the project. -project = u'libfv' -copyright = u'2018, Christopher Simpkins. CC BY 4.0' -author = u'Christopher Simpkins' +project = u"libfv" +copyright = u"2018, Christopher Simpkins. CC BY 4.0" +author = u"Christopher Simpkins" # 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 = u'v0.7.0' +version = u"v2.0.0" # The full version, including alpha/beta/rc tags. -release = u'v0.7.0' +release = u"v2.0.0" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -72,23 +74,23 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False -autodoc_member_order = 'bysource' +autodoc_member_order = "bysource" # -- 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 = 'sphinx_rtd_theme' +html_theme = "sphinx_rtd_theme" # 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 @@ -99,7 +101,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. @@ -107,9 +109,9 @@ # This is required for the alabaster theme # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars html_sidebars = { - '**': [ - 'relations.html', # needs 'show_related': True theme option to display - 'searchbox.html', + "**": [ + "relations.html", # needs 'show_related': True theme option to display + "searchbox.html", ] } @@ -117,7 +119,7 @@ # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. -htmlhelp_basename = 'libfvdoc' +htmlhelp_basename = "libfvdoc" # -- Options for LaTeX output --------------------------------------------- @@ -126,15 +128,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', @@ -144,8 +143,7 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'libfv.tex', u'libfv Documentation', - u'Christopher Simpkins', 'manual'), + (master_doc, "libfv.tex", u"libfv Documentation", u"Christopher Simpkins", "manual"), ] @@ -153,10 +151,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'libfv', u'libfv Documentation', - [author], 1) -] +man_pages = [(master_doc, "libfv", u"libfv Documentation", [author], 1)] # -- Options for Texinfo output ------------------------------------------- @@ -165,13 +160,18 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'libfv', u'libfv Documentation', - author, 'font-v', 'One line description of project.', - 'Miscellaneous'), + ( + master_doc, + "libfv", + u"libfv Documentation", + author, + "font-v", + "One line description of project.", + "Miscellaneous", + ), ] - # -- Options for Epub output ---------------------------------------------- # Bibliographic Dublin Core info. @@ -190,9 +190,8 @@ # 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"] # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} +intersphinx_mapping = {"https://docs.python.org/": None} diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..cb058b0 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +sphinx==4.2.0 \ No newline at end of file