Set up Sphinx autodoc
This will automatically generate API documentation from docstrings.stix2.1
parent
d54ac6e231
commit
d7efd1f752
|
@ -0,0 +1,5 @@
|
|||
{{ name }}
|
||||
{{ underline }}
|
||||
|
||||
.. automodule:: {{ fullname }}
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
base
|
||||
==========
|
||||
|
||||
.. automodule:: stix2.base
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
common
|
||||
============
|
||||
|
||||
.. automodule:: stix2.common
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
core
|
||||
==========
|
||||
|
||||
.. automodule:: stix2.core
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
environment
|
||||
=================
|
||||
|
||||
.. automodule:: stix2.environment
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
exceptions
|
||||
================
|
||||
|
||||
.. automodule:: stix2.exceptions
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
observables
|
||||
=================
|
||||
|
||||
.. automodule:: stix2.observables
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
patterns
|
||||
==============
|
||||
|
||||
.. automodule:: stix2.patterns
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
properties
|
||||
================
|
||||
|
||||
.. automodule:: stix2.properties
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
sdo
|
||||
=========
|
||||
|
||||
.. automodule:: stix2.sdo
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
sro
|
||||
=========
|
||||
|
||||
.. automodule:: stix2.sro
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
utils
|
||||
===========
|
||||
|
||||
.. automodule:: stix2.utils
|
||||
:members:
|
|
@ -0,0 +1,7 @@
|
|||
API Reference
|
||||
=============
|
||||
|
||||
This section of documentation contains information on all of the classes and
|
||||
functions in the ``stix2`` API, as given by the package's docstrings.
|
||||
|
||||
.. automodule:: stix2
|
19
docs/conf.py
19
docs/conf.py
|
@ -1,7 +1,24 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
extensions = [
|
||||
'sphinx-prompt',
|
||||
'nbsphinx',
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.autosummary',
|
||||
'sphinx.ext.napoleon',
|
||||
]
|
||||
autodoc_default_flags = [
|
||||
'show-inheritance',
|
||||
'undoc-members',
|
||||
]
|
||||
autodoc_member_order = 'groupwise'
|
||||
autosummary_generate = True
|
||||
napoleon_numpy_docstring = False # Force consistency, leave only Google
|
||||
napoleon_use_rtype = False
|
||||
|
||||
templates_path = ['_templates']
|
||||
source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
@ -14,7 +31,7 @@ version = '0.2.0'
|
|||
release = '0.2.0'
|
||||
|
||||
language = None
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
exclude_patterns = ['_build', '_templates', 'Thumbs.db', '.DS_Store', '.ipynb_checkpoints']
|
||||
pygments_style = 'sphinx'
|
||||
todo_include_todos = False
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
User's Guide
|
||||
============
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
|
||||
guide/*
|
|
@ -7,16 +7,12 @@ Welcome to stix2's documentation!
|
|||
=================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:maxdepth: 3
|
||||
:caption: Contents:
|
||||
|
||||
overview
|
||||
creating
|
||||
serializing
|
||||
parsing
|
||||
versioning
|
||||
markings
|
||||
custom
|
||||
guide
|
||||
api_ref
|
||||
datastore_api
|
||||
roadmap
|
||||
contributing
|
||||
|
|
|
@ -1,4 +1,20 @@
|
|||
"""Python APIs for STIX 2."""
|
||||
"""Python APIs for STIX 2.
|
||||
|
||||
.. autosummary::
|
||||
:toctree: api
|
||||
|
||||
base
|
||||
common
|
||||
core
|
||||
environment
|
||||
exceptions
|
||||
observables
|
||||
patterns
|
||||
properties
|
||||
sdo
|
||||
sro
|
||||
utils
|
||||
"""
|
||||
|
||||
# flake8: noqa
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
"""Base class for type definitions in the stix2 library."""
|
||||
"""Base classes for type definitions in the stix2 library."""
|
||||
|
||||
import collections
|
||||
import copy
|
||||
|
|
Loading…
Reference in New Issue