Merge branch 'master' of github.com:oasis-open/cti-python-stix2
commit
344454e399
|
@ -1,5 +1,5 @@
|
||||||
pattern
|
pattern
|
||||||
==============
|
=========================
|
||||||
|
|
||||||
.. automodule:: stix2.equivalence.pattern
|
.. automodule:: stix2.equivalence.pattern
|
||||||
:members:
|
:members:
|
|
@ -1,4 +1,4 @@
|
||||||
confidence
|
confidence
|
||||||
================
|
================
|
||||||
|
|
||||||
.. automodule:: stix2.confidence
|
.. automodule:: stix2.confidence
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
datastore
|
datastore
|
||||||
===============
|
===============
|
||||||
|
|
||||||
.. automodule:: stix2.datastore
|
.. automodule:: stix2.datastore
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
environment
|
environment
|
||||||
=================
|
=================
|
||||||
|
|
||||||
.. automodule:: stix2.environment
|
.. automodule:: stix2.environment
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
equivalence
|
equivalence
|
||||||
==============
|
=================
|
||||||
|
|
||||||
.. automodule:: stix2.equivalence
|
.. automodule:: stix2.equivalence
|
||||||
:members:
|
:members:
|
|
@ -1,4 +1,4 @@
|
||||||
exceptions
|
exceptions
|
||||||
================
|
================
|
||||||
|
|
||||||
.. automodule:: stix2.exceptions
|
.. automodule:: stix2.exceptions
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
markings
|
markings
|
||||||
==============
|
==============
|
||||||
|
|
||||||
.. automodule:: stix2.markings
|
.. automodule:: stix2.markings
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
parsing
|
parsing
|
||||||
===============
|
=============
|
||||||
|
|
||||||
.. automodule:: stix2.parsing
|
.. automodule:: stix2.parsing
|
||||||
:members:
|
:members:
|
|
@ -1,5 +1,5 @@
|
||||||
pattern_visitor
|
pattern_visitor
|
||||||
================
|
=====================
|
||||||
|
|
||||||
.. automodule:: stix2.pattern_visitor
|
.. automodule:: stix2.pattern_visitor
|
||||||
:members:
|
:members:
|
|
@ -1,4 +1,4 @@
|
||||||
patterns
|
patterns
|
||||||
==============
|
==============
|
||||||
|
|
||||||
.. automodule:: stix2.patterns
|
.. automodule:: stix2.patterns
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
properties
|
properties
|
||||||
================
|
================
|
||||||
|
|
||||||
.. automodule:: stix2.properties
|
.. automodule:: stix2.properties
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
serialization
|
serialization
|
||||||
================
|
===================
|
||||||
|
|
||||||
.. automodule:: stix2.serialization
|
.. automodule:: stix2.serialization
|
||||||
:members:
|
:members:
|
|
@ -1,4 +1,4 @@
|
||||||
utils
|
utils
|
||||||
===========
|
===========
|
||||||
|
|
||||||
.. automodule:: stix2.utils
|
.. automodule:: stix2.utils
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
v20
|
v20
|
||||||
=========
|
=========
|
||||||
|
|
||||||
.. automodule:: stix2.v20
|
.. automodule:: stix2.v20
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
v21
|
v21
|
||||||
=========
|
=========
|
||||||
|
|
||||||
.. automodule:: stix2.v21
|
.. automodule:: stix2.v21
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
versioning
|
versioning
|
||||||
===============
|
================
|
||||||
|
|
||||||
.. automodule:: stix2.versioning
|
.. automodule:: stix2.versioning
|
||||||
:members:
|
:members:
|
|
@ -1,4 +1,4 @@
|
||||||
workbench
|
workbench
|
||||||
===============
|
===============
|
||||||
|
|
||||||
.. automodule:: stix2.workbench
|
.. automodule:: stix2.workbench
|
||||||
|
|
|
@ -40,7 +40,6 @@ author = 'OASIS Open'
|
||||||
version = __version__
|
version = __version__
|
||||||
release = __version__
|
release = __version__
|
||||||
|
|
||||||
language = None
|
|
||||||
exclude_patterns = ['_build', '_templates', 'Thumbs.db', '.DS_Store', 'guide/.ipynb_checkpoints']
|
exclude_patterns = ['_build', '_templates', 'Thumbs.db', '.DS_Store', 'guide/.ipynb_checkpoints']
|
||||||
pygments_style = 'sphinx'
|
pygments_style = 'sphinx'
|
||||||
todo_include_todos = False
|
todo_include_todos = False
|
||||||
|
@ -102,8 +101,8 @@ class STIXPropertyDocumenter(ClassDocumenter):
|
||||||
issubclass(member, _STIXBase) and \
|
issubclass(member, _STIXBase) and \
|
||||||
hasattr(member, '_properties')
|
hasattr(member, '_properties')
|
||||||
|
|
||||||
def add_content(self, more_content, no_docstring=False):
|
def add_content(self, more_content):
|
||||||
ClassDocumenter.add_content(self, more_content, no_docstring)
|
ClassDocumenter.add_content(self, more_content)
|
||||||
|
|
||||||
obj = self.object
|
obj = self.object
|
||||||
self.add_line(':Properties:', '<stixattr>')
|
self.add_line(':Properties:', '<stixattr>')
|
||||||
|
|
|
@ -1482,7 +1482,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"### Custom Cyber Observable Extensions\n",
|
"### Custom Cyber Observable Extensions\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Finally, custom extensions to existing Cyber Observable types can also be created. Just use the @[CustomExtension](../api/v21/stix2.v21.observables.rst#stix2.v21.observables.CustomExtension) decorator. Note that you must provide the Cyber Observable class to which the extension applies. Again, any extra validation of the properties can be implemented by providing an ``__init__()`` but it is not required. Let's say we want to make an extension to the ``File`` Cyber Observable Object:"
|
"Finally, custom extensions to existing Cyber Observable types can also be created. Just use the @[CustomExtension](../api/v21/stix2.v21.common.rst#stix2.v21.common.CustomExtension) decorator. Note that you must provide the Cyber Observable class to which the extension applies. Again, any extra validation of the properties can be implemented by providing an ``__init__()`` but it is not required. Let's say we want to make an extension to the ``File`` Cyber Observable Object:"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1803,7 +1803,7 @@
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 3 (ipykernel)",
|
"display_name": "Python 3",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "python3"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
|
@ -1817,7 +1817,7 @@
|
||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.8.1"
|
"version": "3.9.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|
|
@ -63,8 +63,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"Imports can be used in different ways depending on the use case and support levels.\n",
|
"Imports can be used in different ways depending on the use case and support levels.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"People who want to support the latest version of STIX 2 without having to make changes, can implicitly use the latest version:",
|
"People who want to support the latest version of STIX 2 without having to make changes, can implicitly use the latest version:<div class=\"alert alert-warning\">\n",
|
||||||
"<div class=\"alert alert-warning\">\n",
|
|
||||||
"\n",
|
"\n",
|
||||||
"**Warning**\n",
|
"**Warning**\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
@ -372,7 +371,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"### How custom content works\n",
|
"### How custom content works\n",
|
||||||
"\n",
|
"\n",
|
||||||
"[CustomObject](../api/v21/stix2.v21.sdo.rst#stix2.v21.sdo.CustomObject), [CustomObservable](../api/v21/stix2.v21.observables.rst#stix2.v21.observables.CustomObservable), [CustomMarking](../api/v21/stix2.v21.common.rst#stix2.v21.common.CustomMarking) and [CustomExtension](../api/v21/stix2.v21.observables.rst#stix2.v21.observables.CustomExtension) must be registered explicitly by STIX version. This is a design decision since properties or requirements may change as the STIX Technical Specification advances.\n",
|
"[CustomObject](../api/v21/stix2.v21.sdo.rst#stix2.v21.sdo.CustomObject), [CustomObservable](../api/v21/stix2.v21.observables.rst#stix2.v21.observables.CustomObservable), [CustomMarking](../api/v21/stix2.v21.common.rst#stix2.v21.common.CustomMarking) and [CustomExtension](../api/v21/stix2.v21.common.rst#stix2.v21.common.CustomExtension) must be registered explicitly by STIX version. This is a design decision since properties or requirements may change as the STIX Technical Specification advances.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"You can perform this by:"
|
"You can perform this by:"
|
||||||
]
|
]
|
||||||
|
@ -416,7 +415,7 @@
|
||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.9.0a6"
|
"version": "3.9.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
bumpversion
|
bumpversion
|
||||||
ipython
|
ipython
|
||||||
nbconvert<6
|
nbconvert
|
||||||
nbsphinx==0.8.6
|
nbsphinx==0.8.6
|
||||||
pre-commit
|
pre-commit
|
||||||
pygments<3,>=2.4.1
|
pygments<3,>=2.4.1
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
sphinx<2
|
sphinx<6
|
||||||
sphinx-prompt
|
sphinx-prompt
|
||||||
tox
|
tox
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,6 @@ class Environment(DataStoreMixin):
|
||||||
.. automethod:: get
|
.. automethod:: get
|
||||||
.. automethod:: all_versions
|
.. automethod:: all_versions
|
||||||
.. automethod:: query
|
.. automethod:: query
|
||||||
.. automethod:: creator_of
|
|
||||||
.. automethod:: relationships
|
.. automethod:: relationships
|
||||||
.. automethod:: related_to
|
.. automethod:: related_to
|
||||||
.. automethod:: add
|
.. automethod:: add
|
||||||
|
|
|
@ -244,7 +244,7 @@ def partial_timestamp_based(t1, t2, tdelta):
|
||||||
def partial_list_based(l1, l2):
|
def partial_list_based(l1, l2):
|
||||||
"""Performs a partial list matching via finding the intersection between
|
"""Performs a partial list matching via finding the intersection between
|
||||||
common values. Repeated values are counted only once. This method can be
|
common values. Repeated values are counted only once. This method can be
|
||||||
used for *_refs equality checks when de-reference is not possible.
|
used for _refs equality checks when de-reference is not possible.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
l1: A list of values.
|
l1: A list of values.
|
||||||
|
@ -262,7 +262,7 @@ def partial_list_based(l1, l2):
|
||||||
|
|
||||||
def exact_match(val1, val2):
|
def exact_match(val1, val2):
|
||||||
"""Performs an exact value match based on two values. This method can be
|
"""Performs an exact value match based on two values. This method can be
|
||||||
used for *_ref equality check when de-reference is not possible.
|
used for _ref equality check when de-reference is not possible.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
val1: A value suitable for an equality test.
|
val1: A value suitable for an equality test.
|
||||||
|
|
Loading…
Reference in New Issue