Skip to content

Commit

Permalink
update project requirements, test harness and minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanvg committed Sep 6, 2019
1 parent 2484b9c commit 67c8949
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
language: python
cache: pip
dist: xenial
python:
- "2.6"
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
install:
- pip install -U pip setuptools
- pip install tox-travis
script:
- tox
Expand Down
4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ def get_long_description():
url="https://github.com/mitre/stixmarx",
packages=find_packages(),
install_requires=[
"lxml",
"mixbox>=1.0.2",
"stix>=1.1.1.8,<1.2.1.0"
],
license="BSD",
Expand All @@ -44,10 +42,8 @@ def get_long_description():
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
Expand Down
4 changes: 3 additions & 1 deletion stixmarx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
# internal
from stixmarx.version import __version__ # noqa

formatter = logging.Formatter("[%(name)s] [%(levelname)-7s] [%(asctime)s] %(message)s")

# Console Handler for stixmarx messages
ch = logging.StreamHandler()
ch.setFormatter(logging.Formatter("[%(name)s] [%(levelname)-7s] [%(asctime)s] %(message)s"))
ch.setFormatter(formatter)

# Module-level logger
log = logging.getLogger(__name__)
Expand Down
8 changes: 4 additions & 4 deletions stixmarx/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _load_stix():
import stix.utils.parser as stix_parser
import stix.utils.nsparser as stix_nsparser
except (ImportError, ImportWarning) as e:
LOG.warning(str(e))
LOG.warning(e)
return

__PYTHON_STIX_LOADED = True
Expand All @@ -98,7 +98,7 @@ def _load_cybox():
import cybox.common as cybox_common
import cybox.utils.nsparser as cybox_nsparser
except (ImportError, ImportWarning) as e:
LOG.warning(str(e))
LOG.warning(e)
return

__PYTHON_CYBOX_LOADED = True
Expand All @@ -116,7 +116,7 @@ def _load_mixbox():
import mixbox.entities as mixbox_entities
import mixbox.namespaces as mixbox_ns
except (ImportError, ImportWarning) as e:
LOG.warning(str(e))
LOG.warning(e)
return

__MIXBOX_LOADED = True
Expand All @@ -133,7 +133,7 @@ def _load_maec():
import maec
import maec.utils.nsparser as maec_nsparser
except (ImportError, ImportWarning) as e:
LOG.warning(str(e))
LOG.warning(e)
return

__PYTHON_MAEC_LOADED = True
Expand Down
4 changes: 1 addition & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[tox]
envlist = py{26,27,34,35,36}-stix{111,120}, py{27,35}-nomaec{111,120}
envlist = py{27,34,35,36,37}-stix{111,120}, py{27,35}-nomaec{111,120}

[testenv]
commands =
pytest
deps =
-rrequirements.txt
py26: lxml<4.0.0
stix111: stix>=1.1.1.0,<1.1.2.0
stix120: stix>=1.2.0.0,<1.2.1.0
stix{111,120}: maec>=4.1.0.13,<4.1.1.0
Expand All @@ -15,7 +14,6 @@ deps =

[travis]
python =
2.6: py26
2.7: py27
3.4: py34
3.5: py35
Expand Down

0 comments on commit 67c8949

Please sign in to comment.