mirror of
https://github.com/ANL-CEEESA/powersas.m.git
synced 2025-12-06 01:48:52 -06:00
debug to build docs
This commit is contained in:
@@ -66,19 +66,18 @@ source_suffix = '.rst'
|
|||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = 'ANDES'
|
project = 'powerSAS.m'
|
||||||
copyright = '2021, Hantao Cui'
|
copyright = ''
|
||||||
author = 'Hantao Cui'
|
author = ''
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
|
|
||||||
import andes
|
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = andes.__version__
|
version = 1.0
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = andes.__version__
|
release = 1.0
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
@@ -135,7 +134,7 @@ html_sidebars = {
|
|||||||
# -- Options for HTMLHelp output ------------------------------------------
|
# -- Options for HTMLHelp output ------------------------------------------
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
# Output file base name for HTML help builder.
|
||||||
htmlhelp_basename = 'andes'
|
htmlhelp_basename = 'powerSAS.m'
|
||||||
|
|
||||||
|
|
||||||
# -- Options for LaTeX output ---------------------------------------------
|
# -- Options for LaTeX output ---------------------------------------------
|
||||||
@@ -162,20 +161,20 @@ latex_elements = {
|
|||||||
# Grouping the document tree into LaTeX files. List of tuples
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
# latex_documents = [
|
||||||
(master_doc, 'andes.tex', 'ANDES Manual',
|
# (master_doc, 'andes.tex', 'ANDES Manual',
|
||||||
'Hantao Cui', 'manual'),
|
# 'Hantao Cui', 'manual'),
|
||||||
]
|
# ]
|
||||||
|
|
||||||
|
|
||||||
# -- Options for manual page output ---------------------------------------
|
# -- Options for manual page output ---------------------------------------
|
||||||
|
|
||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
# man_pages = [
|
||||||
(master_doc, 'andes', 'ANDES Manual',
|
# (master_doc, 'andes', 'ANDES Manual',
|
||||||
[author], 1)
|
# [author], 1)
|
||||||
]
|
# ]
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Texinfo output -------------------------------------------
|
# -- Options for Texinfo output -------------------------------------------
|
||||||
@@ -183,11 +182,11 @@ man_pages = [
|
|||||||
# Grouping the document tree into Texinfo files. List of tuples
|
# Grouping the document tree into Texinfo files. List of tuples
|
||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
# texinfo_documents = [
|
||||||
(master_doc, 'andes', 'ANDES Manual',
|
# (master_doc, 'andes', 'ANDES Manual',
|
||||||
author, 'andes', 'Python Software for Symbolic Power System Modeling and Numerical Analysis',
|
# author, 'andes', 'Python Software for Symbolic Power System Modeling and Numerical Analysis',
|
||||||
'Miscellaneous'),
|
# 'Miscellaneous'),
|
||||||
]
|
# ]
|
||||||
|
|
||||||
|
|
||||||
# Example configuration for intersphinx: refer to the Python standard library.
|
# Example configuration for intersphinx: refer to the Python standard library.
|
||||||
|
|||||||
@@ -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)
|
|
||||||
Reference in New Issue
Block a user