oasis-open / cti-python-stix2

OASIS TC Open Repository: Python APIs for STIX 2
https://stix2.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
364 stars 119 forks source link

Fix custom markings #521

Closed chisholm closed 3 years ago

chisholm commented 3 years ago

The main fix in this PR is for custom markings. The changes which had been made to @CustomMarking to support the new extension-based custom markings are backed out. The new way to do this is to create a normal extension via @CustomExtension and use the extension with a marking definition, the same way as for any other object. @CustomMarking is now only used for the old-style custom markings.

Other misc changes include:

codecov-commenter commented 3 years ago

Codecov Report

Merging #521 (295037f) into master (10956d3) will increase coverage by 0.02%. The diff coverage is 94.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #521      +/-   ##
==========================================
+ Coverage   87.20%   87.22%   +0.02%     
==========================================
  Files         153      153              
  Lines       17911    17925      +14     
==========================================
+ Hits        15619    15635      +16     
+ Misses       2292     2290       -2     
Impacted Files Coverage Δ
stix2/v21/common.py 46.42% <0.00%> (-5.19%) :arrow_down:
stix2/custom.py 87.34% <66.66%> (+1.79%) :arrow_up:
stix2/registration.py 78.66% <83.33%> (+0.58%) :arrow_up:
stix2/test/v21/test_custom.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 10956d3...295037f. Read the comment docs.