Skip to content

Commit

Permalink
Merge pull request oasis-open#63 from oasis-open/config_fixes_for_pyp…
Browse files Browse the repository at this point in the history
…i_publish

fix tox and isort configurations to prepare for pypi publishing
  • Loading branch information
clenk authored Jul 22, 2020
2 parents dee581e + 4933909 commit cd6aac7
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 16 deletions.
12 changes: 8 additions & 4 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[settings]
check=1
diff=1
known_third_party=antlr4,enum,dateutil,six,stix2patterns,typing
known_third_party=
antlr4,
dateutil,
enum,
pytest,
six,
stix2patterns,
typing,
known_first_party=stix2matcher
not_skip=__init__.py
force_sort_within_sections=1
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
- repo: https://github.com/pre-commit/pre-commit-hooks
sha: ea227f024bd89d638aea319c92806737e3375979
rev: ea227f024bd89d638aea319c92806737e3375979
hooks:
- id: trailing-whitespace
- id: flake8
args:
- --max-line-length=160
- id: check-merge-conflict
- repo: https://github.com/FalconSocial/pre-commit-python-sorter
sha: b57843b0b874df1d16eb0bef00b868792cb245c2
rev: b57843b0b874df1d16eb0bef00b868792cb245c2
hooks:
- id: python-import-sorter
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CHANGELOG
=========
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
include .isort.cfg
include .pre-commit-config.yaml
include *.md
include *.txt
include LICENSE
include CHANGELOG.rst
include tox.ini
recursive-include stix2matcher/test/testcases *.json
1 change: 1 addition & 0 deletions stix2matcher/test/test_basic_ops.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from stix2matcher.matcher import MatcherException, match

_observations = [
Expand Down
1 change: 1 addition & 0 deletions stix2matcher/test/test_binary.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from stix2matcher.matcher import match

_observations = [
Expand Down
1 change: 1 addition & 0 deletions stix2matcher/test/test_comparison_exprs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from stix2matcher.matcher import match

_observations = [
Expand Down
1 change: 1 addition & 0 deletions stix2matcher/test/test_complex.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from stix2matcher.matcher import match

_observations = [
Expand Down
2 changes: 1 addition & 1 deletion stix2matcher/test/test_matching_sdos.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
import six

import pytest
from stix2matcher.matcher import match

_observations = [
Expand Down
2 changes: 1 addition & 1 deletion stix2matcher/test/test_null.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from stix2patterns.pattern import ParseException

import pytest
from stix2matcher.matcher import match

_observations = [
Expand Down
2 changes: 1 addition & 1 deletion stix2matcher/test/test_object_path_quoting.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from stix2patterns.pattern import ParseException

import pytest
from stix2matcher.matcher import match

_observations = [
Expand Down
1 change: 1 addition & 0 deletions stix2matcher/test/test_observation_exprs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from stix2matcher.matcher import match

_observations = [
Expand Down
1 change: 1 addition & 0 deletions stix2matcher/test/test_references.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from stix2matcher.matcher import match

_observations = [
Expand Down
4 changes: 2 additions & 2 deletions stix2matcher/test/test_temporal_qualifiers.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from stix2patterns.pattern import ParseException

# I'll specially test some critical internal time-interval related code,
# since it's easier to test it separately than create lots of SDOs AND
# patterns.
import pytest
from stix2patterns.pattern import ParseException

from stix2matcher.matcher import (_OVERLAP, _OVERLAP_NONE,
_OVERLAP_TOUCH_INNER, _OVERLAP_TOUCH_OUTER,
_OVERLAP_TOUCH_POINT, MatcherException,
Expand Down
2 changes: 1 addition & 1 deletion stix2matcher/test/test_timestamps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from stix2patterns.pattern import ParseException

import pytest
from stix2matcher.matcher import MatcherException, match

_observations = [
Expand Down
1 change: 1 addition & 0 deletions stix2matcher/test/test_unicode_normalization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from stix2matcher.matcher import match

_observations = [
Expand Down
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ passenv = CI TRAVIS TRAVIS_*
deps =
flake8
commands =
flake8
flake8 ./stix2matcher

[testenv:isort-check]
deps = isort
commands =
isort -rc stix2matcher -df
isort -rc stix2matcher -c
isort stix2matcher --df
isort stix2matcher -c

[pycodestyle]
max-line-length=160
exclude=grammars

[flake8]
max-line-length=160
Expand Down

0 comments on commit cd6aac7

Please sign in to comment.