-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:oasis-open/cti-taxii-client into …
…zrush-master
- Loading branch information
Showing
12 changed files
with
147 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: cti-taxii-client test harness | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
|
||
name: Python ${{ matrix.python-version }} Build | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install and update essential dependencies | ||
run: | | ||
pip install -U pip setuptools | ||
pip install tox-gh-actions | ||
pip install codecov | ||
- name: Test with Tox | ||
run: | | ||
tox | ||
- name: Upload coverage information to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
fail_ci_if_error: true # optional (default = false) | ||
verbose: true # optional (default = false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
sha: v0.9.2 | ||
rev: v3.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-merge-conflict | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 3.8.4 | ||
hooks: | ||
- id: flake8 | ||
name: Check project styling | ||
args: | ||
- --max-line-length=160 | ||
- id: check-merge-conflict | ||
- repo: https://github.com/FalconSocial/pre-commit-python-sorter | ||
sha: b57843b0b874df1d16eb0bef00b868792cb245c2 | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.7.0 | ||
hooks: | ||
- id: python-import-sorter | ||
args: | ||
- --diff | ||
- id: isort | ||
name: Sort python imports (shows diff) | ||
args: ["-c", "--diff"] | ||
- id: isort | ||
name: Sort python imports (fixes files) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
API Reference | ||
============= | ||
|
||
This section of documentation contains information on all of the classes and | ||
functions in the ``taxii2client`` API, as given by the package's docstrings. | ||
|
||
Subpackages | ||
----------- | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
taxii2client.v20 | ||
taxii2client.v21 | ||
|
||
Submodules | ||
---------- | ||
|
||
taxii2client.common module | ||
************************** | ||
|
||
.. automodule:: taxii2client.common | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
taxii2client.exceptions module | ||
****************************** | ||
|
||
.. automodule:: taxii2client.exceptions | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
taxii2client.version module | ||
*************************** | ||
|
||
.. automodule:: taxii2client.version | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: taxii2client | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
taxii2client.v20 package | ||
======================== | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: taxii2client.v20 | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
taxii2client.v21 package | ||
======================== | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: taxii2client.v21 | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,35 @@ | ||
[tox] | ||
envlist = py35,py36,py37,py38,pycodestyle,isort-check,packaging | ||
envlist = py36,py37,py38,py39,packaging,pre-commit-check | ||
|
||
[testenv] | ||
deps = | ||
-U | ||
tox | ||
pytest | ||
pytest-cov | ||
coverage | ||
responses | ||
-U | ||
tox | ||
pytest | ||
pytest-cov | ||
coverage | ||
responses | ||
commands = | ||
pytest --cov=taxii2client taxii2client/test/ --cov-report term-missing | ||
pytest --cov=taxii2client taxii2client/test/ --cov-report term-missing | ||
|
||
passenv = CI TRAVIS TRAVIS_* | ||
passenv = GITHUB_* | ||
|
||
[testenv:pycodestyle] | ||
[testenv:packaging] | ||
deps = | ||
flake8 | ||
pycodestyle | ||
commands = | ||
pip check | ||
pycodestyle ./taxii2client | ||
flake8 ./taxii2client | ||
|
||
[pycodestyle] | ||
max-line-length=160 | ||
exclude=taxii2client/__init__.py | ||
|
||
[flake8] | ||
max-line-length=160 | ||
exclude=taxii2client/__init__.py | ||
|
||
[testenv:isort-check] | ||
deps = isort | ||
twine | ||
commands = | ||
isort taxii2client --df | ||
isort taxii2client -c | ||
python setup.py sdist bdist_wheel --universal | ||
twine check dist/* | ||
|
||
[testenv:packaging] | ||
[testenv:pre-commit-check] | ||
deps = | ||
readme_renderer | ||
pre-commit | ||
commands = | ||
python setup.py check -r -s | ||
pre-commit run --all-files | ||
|
||
[travis] | ||
[gh-actions] | ||
python = | ||
3.5: py35 | ||
3.6: py36 | ||
3.7: py37 | ||
3.8: py38, pycodestyle, isort-check, packaging | ||
3.8: py38 | ||
3.9: py39, packaging, pre-commit-check |