Skip to content

Commit

Permalink
Update dependencies and test configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
gtback committed Jul 16, 2018
1 parent e2c9935 commit 7c4ef78
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 34 deletions.
54 changes: 48 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#####=== Python ===#####

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -10,7 +8,6 @@ __pycache__/

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
Expand All @@ -22,9 +19,11 @@ lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -44,26 +43,69 @@ htmlcov/
.cache
nosetests.xml
coverage.xml
*,cover
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# Automatically-built grammar tokens
*.tokens
*.interp

# PyCharm
.idea/

MANIFEST
1 change: 1 addition & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ skip_glob = **/STIXPattern*.py
not_skip = __init__.py
known_third_party =
antlr4,
pytest,
six,
typing,
known_first_party = stix2patterns
Expand Down
7 changes: 5 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
include *.md
include requirements.txt
include .isort.cfg
include .pre-commit-config.yaml
include CHANGELOG
include CONTRIBUTING.md
include dev-requirements.txt
include LICENSE
include tox.ini
include stix2patterns/test/spec_examples.txt
5 changes: 2 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@ repositories/maintainers-guide#additionalMaintainers>`__.
.. _currentMaintainers:

Current Maintainers of this TC Open Repository
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- `Greg Back <mailto:[email protected]>`__; GitHub ID:
https://github.com/gtback; WWW: `MITRE <https://www.mitre.org>`__
- `Ivan Kirillov <mailto:[email protected]>`__; GitHub ID:
https://github.com/ikiril01; WWW: `MITRE <https://www.mitre.org>`__

About OASIS TC Open Repositories
-----------------------------
--------------------------------

- `TC Open Repositories: Overview and
Resources <https://www.oasis-open.org/resources/open-
Expand Down Expand Up @@ -269,4 +269,3 @@ to [email protected].
:target: https://codecov.io/gh/oasis-open/cti-pattern-validator
.. |Version| image:: https://img.shields.io/pypi/v/stix2-patterns.svg?maxAge=3600
:target: https://pypi.python.org/pypi/stix2-patterns/

1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-e .[dev]
13 changes: 0 additions & 13 deletions requirements.txt

This file was deleted.

38 changes: 34 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,42 @@ def get_version():
raise AttributeError("Package does not have a __version__")


doc_requires = [
'sphinx',
]

test_requires = [
'coverage',
'pytest',
'pytest-cov',
]

dev_requires = doc_requires + test_requires + [
'bumpversion',
'check-manifest',
'pre-commit',
'readme_renderer',
# test_requires are installed into every tox environemnt, so we don't
# want to include tox there.
'tox',
]

setup(
name='stix2-patterns',
version=get_version(),
packages=find_packages(),
description='Validate STIX 2 Patterns.',
long_description=readme,
url="https://github.com/oasis-open/cti-pattern-validator",
author='OASIS Cyber Threat Intelligence Technical Committee',
author_email='[email protected]',
maintainer='Greg Back',
maintainer_email='[email protected]',
packages=find_packages(),
install_requires=[
'antlr4-python2-runtime==4.7 ; python_version<"3"',
'antlr4-python3-runtime==4.7 ; python_version>="3"',
'antlr4-python2-runtime>=4.7 ; python_version<"3"',
'antlr4-python3-runtime>=4.7 ; python_version>="3"',
'six',
'typing ; python_version<"3.5" and python_version>="3"'
'typing ; python_version<"3.5" and python_version>="3"',
],
entry_points={
'console_scripts': [
Expand All @@ -42,4 +67,9 @@ def get_version():
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
extras_require={
'dev': dev_requires,
'docs': doc_requires,
'test': test_requires,
},
)
1 change: 1 addition & 0 deletions stix2patterns/test/test_inspector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from stix2patterns.inspector import INDEX_STAR
from stix2patterns.pattern import Pattern

Expand Down
1 change: 1 addition & 0 deletions stix2patterns/test/test_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os

import pytest

from stix2patterns.validator import validate

TEST_CASE_FILE = os.path.join(os.path.dirname(__file__), 'spec_examples.txt')
Expand Down
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ envlist = py27,py34,py35,py36,pycodestyle,isort-check

[testenv]
deps =
-U
tox
pytest
pytest-cov
coverage
check-manifest
readme_renderer
extras = test
commands =
py.test --cov=stix2patterns stix2patterns/test/ --cov-report term-missing
check-manifest
python setup.py check -m -r -s
pytest --cov=stix2patterns stix2patterns/test/ --cov-report term-missing

passenv = CI TRAVIS TRAVIS_*

Expand Down

0 comments on commit 7c4ef78

Please sign in to comment.