def run_apidoc(_): from sphinx.apidoc import main as apidoc_main cur_dir = os.path.abspath(os.path.dirname(__file__)) output_path = cur_dir module_path = os.path.abspath(os.path.join(cur_dir, '..', '..', 'OPSI/')) apidoc_main(['--separate', '--output-dir', output_path, module_path])
def setup(app): # Add custom CSS app.add_stylesheet('custom.css') # Make the version number available to ifconfig app.add_config_value('ag_version', ag_version, 'env') # Do not generate apidocs for these: exclude = ['franz/miniclient', 'franz/openrdf/tests', # These are re-exported in franz.openrdf.model 'franz/openrdf/model/literal.py', 'franz/openrdf/model/statement.py', 'franz/openrdf/model/value.py', 'franz/openrdf/model/valuefactory.py', # More reexported stuff 'franz/openrdf/vocabulary/owl.py', 'franz/openrdf/vocabulary/rdf.py', 'franz/openrdf/vocabulary/rdfs.py', 'franz/openrdf/vocabulary/xmlschema.py',] abs_exclude = [os.path.abspath(os.path.join('../src', path)) for path in exclude] # Generate apidocs # Options: # -e = create a separate page for each module # -f = overwrite old files # -o ... = output directory # ../src = path to the sources # rest = exclusion patterns apidoc_main(['-e', '-f', '-o', os.path.abspath('source/_gen'), os.path.abspath('../src')] + abs_exclude)
def apidoc(tempdir, apidoc_params): _, kwargs = apidoc_params coderoot = kwargs.get('coderoot', (rootdir / 'root')) outdir = tempdir / 'out' args = ['sphinx-apidoc', '-o', outdir, '-F', coderoot] + kwargs.get('options', []) apidoc_main(args) return namedtuple('apidoc', 'coderoot,outdir')(coderoot, outdir)
def run_apidoc(_): from sphinx.apidoc import main as apidoc_main modules = ['src/widgetastic_patternfly'] for module in modules: cur_dir = os.path.abspath(os.path.dirname(__file__)) output_path = os.path.join(cur_dir, module, 'doc') apidoc_main(['-e', '-f', '-o', output_path, '.', '--force'])
def run_apidoc(_): from sphinx.apidoc import main as apidoc_main cur_dir = os.path.abspath(os.path.dirname(__file__)) output_path = os.path.join(cur_dir, 'docs') modules = os.path.join(cur_dir, os.path.normpath(r"../python_hll")) exclusions = [] apidoc_main([None, '-e', '-f', '-o', output_path, modules] + exclusions)
def run_apidoc(_): from sphinx.apidoc import main as apidoc_main modules = [] cur_dir = os.path.abspath(os.path.dirname(__file__)) output_path = cur_dir source_dir = os.path.abspath(os.path.join(cur_dir, '..', '..', 'lib', 'intercom_test')) apidoc_args = ['sphinx-apidoc', '-e', '-f', '-o', output_path, source_dir] print("Running: sphinx-apidoc " + ' '.join(apidoc_args)) apidoc_main(apidoc_args)
def run_apidoc(app): from sphinx.apidoc import main as apidoc_main cur_dir = os.path.abspath(os.path.dirname(__file__)) buildapidocdir = os.path.join(app.outdir, "apidoc", "SparseSC") module = os.path.join(cur_dir, "..", "src", "SparseSC") to_excl = [ ] #"cross_validation","fit_ct","fit_fold", "fit_loo","optimizers","optimizers/cd_line_search","tensor","utils/ols_model","utils/penalty_utils","utils/print_progress","utils/sub_matrix_inverse","weights"] #Locally could wrap each to_excl with "*" "*" and put in the apidoc cmd and end and works as exclude patterns, but doesn't work on RTD #with capture() as out: #doesn't have quiet option apidoc_main([None, '-f', '-e', '-o', buildapidocdir, module]) #rm module file because we don't link to it directly and this silences the warning os.remove(os.path.join(buildapidocdir, "modules.rst")) for excl in to_excl: path = os.path.join(buildapidocdir, "SparseSC." + excl.replace("/", ".") + ".rst") print("removing: " + path) os.remove(path)
[u'Martin Gallo, Core Security'], 1)] # If true, show URL addresses after external links. #man_show_urls = False # -- 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 = [ ('index', 'pysap', u'pysap Documentation', u'Martin Gallo, Core Security', 'pysap', 'Python library for crafting SAP\'s network protocols packets', '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 # Automatically build API docs apidoc_main(["-f", "-e", "-M", "-o", "api/", "../pysap"])
def run_apidoc(_): """Call sphinx-apidoc on faucet module""" from sphinx.apidoc import main as apidoc_main cur_dir = os.path.abspath(os.path.dirname(__file__)) apidoc_main([None, '-e', '-o', 'source/apidoc', '../faucet'])
def run_apidoc(_): """Call sphinx-apidoc on faucet module""" from sphinx.apidoc import main as apidoc_main apidoc_main(['-e', '-o', 'source/apidoc', '../faucet'])
# If true, show URL addresses after external links. #man_show_urls = False # -- 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 = [ ('index', 'pysap', u'pysap Documentation', u'Martin Gallo, Core Security', 'pysap', 'Python library for crafting SAP\'s network protocols packets', '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 # Automatically build API docs apidoc_main(["-f", "-e", "-M", "-o", "api/", "../pysap"])
def run_apidoc(_): """Call sphinx-apidoc on faucet module""" from sphinx.apidoc import main as apidoc_main apidoc_main(['-e', '-o', 'source/apidoc', '../faucet'])