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 Oct 15, 2024
2 parents 9d2c208 + 68ba448 commit a4a59a7
Show file tree
Hide file tree
Showing 12 changed files with 1,017 additions and 31 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/python-ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']

name: Python ${{ matrix.python-version }} Build
steps:
Expand All @@ -27,7 +27,8 @@ jobs:
run: |
tox
- name: Upload coverage information to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4.2.0
with:
fail_ci_if_error: true # optional (default = false)
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
args:
- --max-line-length=160
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
rev: 5.12.0
hooks:
- id: isort
name: Sort python imports (shows diff)
Expand Down
17 changes: 17 additions & 0 deletions determinsitic-id-checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import json

import stix2


def main():
with open("sco-examples-bundle.json", "r", encoding="utf-8") as examples:
all_examples = json.load(examples)
for obj in all_examples:
existing_id = obj["id"]
del obj["id"]
stix_obj = stix2.parse(obj)
print(f"id {existing_id} should be {stix_obj['id']}")


if __name__ == "__main__":
main()
Loading

0 comments on commit a4a59a7

Please sign in to comment.