From 086747ec67da10c95ae876100d0866053e697e6b Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Mon, 20 Feb 2023 21:57:43 -0500 Subject: [PATCH] debug to build docs --- docs/source/conf.py | 39 ++++++++++++++------------- docs/source/modelref.py | 58 ----------------------------------------- 2 files changed, 19 insertions(+), 78 deletions(-) delete mode 100644 docs/source/modelref.py diff --git a/docs/source/conf.py b/docs/source/conf.py index cd74f6f..6015ca7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -66,19 +66,18 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = 'ANDES' -copyright = '2021, Hantao Cui' -author = 'Hantao Cui' +project = 'powerSAS.m' +copyright = '' +author = '' # 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. -import andes # The short X.Y version. -version = andes.__version__ +version = 1.0 # The full version, including alpha/beta/rc tags. -release = andes.__version__ +release = 1.0 # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -135,7 +134,7 @@ html_sidebars = { # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. -htmlhelp_basename = 'andes' +htmlhelp_basename = 'powerSAS.m' # -- Options for LaTeX output --------------------------------------------- @@ -162,20 +161,20 @@ latex_elements = { # 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, 'andes.tex', 'ANDES Manual', - 'Hantao Cui', 'manual'), -] +# latex_documents = [ +# (master_doc, 'andes.tex', 'ANDES Manual', +# 'Hantao Cui', 'manual'), +# ] # -- 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, 'andes', 'ANDES Manual', - [author], 1) -] +# man_pages = [ +# (master_doc, 'andes', 'ANDES Manual', +# [author], 1) +# ] # -- Options for Texinfo output ------------------------------------------- @@ -183,11 +182,11 @@ man_pages = [ # 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, 'andes', 'ANDES Manual', - author, 'andes', 'Python Software for Symbolic Power System Modeling and Numerical Analysis', - 'Miscellaneous'), -] +# texinfo_documents = [ +# (master_doc, 'andes', 'ANDES Manual', +# author, 'andes', 'Python Software for Symbolic Power System Modeling and Numerical Analysis', +# 'Miscellaneous'), +# ] # Example configuration for intersphinx: refer to the Python standard library. diff --git a/docs/source/modelref.py b/docs/source/modelref.py deleted file mode 100644 index ce7f175..0000000 --- a/docs/source/modelref.py +++ /dev/null @@ -1,58 +0,0 @@ -""" -This file is used to generate reStructuredText tables for Group and Model references. -""" -import os -import andes - -if not (os.path.isfile('modelref.rst') and os.path.isfile('configref.rst')): - - ss = andes.prepare(nomp=True) - - # write the top-level index file - - out = '' - out += '.. _modelref:\n\n' - out += '****************\n' - out += 'Model References\n' - out += '****************\n' - out += '\n' - - out += ss.supported_models(export='rest') - - out += '\n' - out += '.. toctree ::\n' - out += ' :maxdepth: 2\n' - out += '\n' - - file_tpl = ' groupdoc/{}\n' - - for group in ss.groups.values(): - out += file_tpl.format(group.class_name) - - with open('modelref.rst', 'w') as f: - f.write(out) - - # write individual files - - os.makedirs('groupdoc', exist_ok=True) - - for group in ss.groups.values(): - with open(f'groupdoc/{group.class_name}.rst', 'w') as f: - f.write(group.doc_all(export='rest')) - - # Config Reference Section - - out = '' - out += '.. _configref:\n\n' - out += '*****************\n' - out += 'Config References\n' - out += '*****************\n' - out += '\n' - - out += ss.config.doc(export='rest', target=True, symbol=False) - - for r in ss.routines.values(): - out += r.config.doc(export='rest', target=True, symbol=False) - - with open('configref.rst', 'w') as f: - f.write(out)