Skip to content

Commit

Permalink
Merge branch 'master' of github.com:oasis-open/cti-python-stix2
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisr3d committed Jan 25, 2023
2 parents 78c2c3d + 2860699 commit 344454e
Show file tree
Hide file tree
Showing 30 changed files with 58 additions and 61 deletions.
2 changes: 1 addition & 1 deletion docs/api/datastore/stix2.datastore.filesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ filesystem
==========================

.. automodule:: stix2.datastore.filesystem
:members:
:members:
2 changes: 1 addition & 1 deletion docs/api/datastore/stix2.datastore.filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ filters
=======================

.. automodule:: stix2.datastore.filters
:members:
:members:
2 changes: 1 addition & 1 deletion docs/api/datastore/stix2.datastore.memory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ memory
======================

.. automodule:: stix2.datastore.memory
:members:
:members:
2 changes: 1 addition & 1 deletion docs/api/datastore/stix2.datastore.taxii.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ taxii
=====================

.. automodule:: stix2.datastore.taxii
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/equivalence/stix2.equivalence.pattern.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pattern
==============
=========================

.. automodule:: stix2.equivalence.pattern
:members:
:members:
2 changes: 1 addition & 1 deletion docs/api/markings/stix2.markings.granular_markings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ granular_markings
================================

.. automodule:: stix2.markings.granular_markings
:members:
:members:
2 changes: 1 addition & 1 deletion docs/api/markings/stix2.markings.object_markings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ object_markings
==============================

.. automodule:: stix2.markings.object_markings
:members:
:members:
2 changes: 1 addition & 1 deletion docs/api/markings/stix2.markings.utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ utils
====================

.. automodule:: stix2.markings.utils
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/stix2.confidence.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
confidence
confidence
================

.. automodule:: stix2.confidence
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/stix2.datastore.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
datastore
datastore
===============

.. automodule:: stix2.datastore
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/stix2.environment.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
environment
environment
=================

.. automodule:: stix2.environment
:members:
:members:
6 changes: 3 additions & 3 deletions docs/api/stix2.equivalence.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
equivalence
==============
equivalence
=================

.. automodule:: stix2.equivalence
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/stix2.exceptions.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
exceptions
exceptions
================

.. automodule:: stix2.exceptions
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/stix2.markings.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
markings
markings
==============

.. automodule:: stix2.markings
:members:
:members:
6 changes: 3 additions & 3 deletions docs/api/stix2.parsing.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parsing
===============
parsing
=============

.. automodule:: stix2.parsing
:members:
:members:
6 changes: 3 additions & 3 deletions docs/api/stix2.pattern_visitor.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pattern_visitor
================
pattern_visitor
=====================

.. automodule:: stix2.pattern_visitor
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/stix2.patterns.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
patterns
patterns
==============

.. automodule:: stix2.patterns
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/stix2.properties.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
properties
properties
================

.. automodule:: stix2.properties
:members:
:members:
6 changes: 3 additions & 3 deletions docs/api/stix2.serialization.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
serialization
================
serialization
===================

.. automodule:: stix2.serialization
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/stix2.utils.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
utils
utils
===========

.. automodule:: stix2.utils
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/stix2.v20.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
v20
v20
=========

.. automodule:: stix2.v20
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/stix2.v21.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
v21
v21
=========

.. automodule:: stix2.v21
:members:
:members:
6 changes: 3 additions & 3 deletions docs/api/stix2.versioning.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
versioning
===============
versioning
================

.. automodule:: stix2.versioning
:members:
:members:
4 changes: 2 additions & 2 deletions docs/api/stix2.workbench.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
workbench
workbench
===============

.. automodule:: stix2.workbench
:members:
:members:
5 changes: 2 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
version = __version__
release = __version__

language = None
exclude_patterns = ['_build', '_templates', 'Thumbs.db', '.DS_Store', 'guide/.ipynb_checkpoints']
pygments_style = 'sphinx'
todo_include_todos = False
Expand Down Expand Up @@ -102,8 +101,8 @@ def can_document_member(cls, member, membername, isattr, parent):
issubclass(member, _STIXBase) and \
hasattr(member, '_properties')

def add_content(self, more_content, no_docstring=False):
ClassDocumenter.add_content(self, more_content, no_docstring)
def add_content(self, more_content):
ClassDocumenter.add_content(self, more_content)

obj = self.object
self.add_line(':Properties:', '<stixattr>')
Expand Down
6 changes: 3 additions & 3 deletions docs/guide/custom.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@
"source": [
"### Custom Cyber Observable Extensions\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:"
]
},
{
Expand Down Expand Up @@ -1803,7 +1803,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -1817,7 +1817,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.1"
"version": "3.9.2"
}
},
"nbformat": 4,
Expand Down
7 changes: 3 additions & 4 deletions docs/guide/ts_support.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
"\n",
"Imports can be used in different ways depending on the use case and support levels.\n",
"\n",
"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",
"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",
"\n",
"**Warning**\n",
"\n",
Expand Down Expand Up @@ -372,7 +371,7 @@
"source": [
"### How custom content works\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",
"You can perform this by:"
]
Expand Down Expand Up @@ -416,7 +415,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.0a6"
"version": "3.9.2"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
bumpversion
ipython
nbconvert<6
nbconvert
nbsphinx==0.8.6
pre-commit
pygments<3,>=2.4.1
pytest
pytest-cov
sphinx<2
sphinx<6
sphinx-prompt
tox

Expand Down
1 change: 0 additions & 1 deletion stix2/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ class Environment(DataStoreMixin):
.. automethod:: get
.. automethod:: all_versions
.. automethod:: query
.. automethod:: creator_of
.. automethod:: relationships
.. automethod:: related_to
.. automethod:: add
Expand Down
4 changes: 2 additions & 2 deletions stix2/equivalence/object/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def partial_timestamp_based(t1, t2, tdelta):
def partial_list_based(l1, l2):
"""Performs a partial list matching via finding the intersection between
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:
l1: A list of values.
Expand All @@ -262,7 +262,7 @@ def partial_list_based(l1, l2):

def exact_match(val1, val2):
"""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:
val1: A value suitable for an equality test.
Expand Down

0 comments on commit 344454e

Please sign in to comment.