Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
Package Metadata (#8)
Browse files Browse the repository at this point in the history
* update package metadata and helper tools

* clean up examples test placeholder
  • Loading branch information
mattsb42-aws authored May 7, 2019
1 parent 16cbfaf commit 3bcd073
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
build
dist
docs/build
/doc/generated/*
generated/

# Bytecode Artifacts
*.pyc
Expand Down
42 changes: 24 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,40 @@ matrix:
- python: 3.6
env: TOXENV=py36-local
stage: Client Tests
- python: 3.6
env: TOXENV=py36-integ
stage: Client Tests
- python: 3.6
env: TOXENV=py36-examples
stage: Client Tests
# we don't have any yet
#- python: 3.6
# env: TOXENV=py36-integ
# stage: Client Tests
# we don't have any yet
#- python: 3.6
# env: TOXENV=py36-examples
# stage: Client Tests
# CPython 3.7
- python: 3.7
env: TOXENV=py37-local
stage: Client Tests
- python: 3.7
env: TOXENV=py37-integ
stage: Client Tests
- python: 3.7
env: TOXENV=py37-examples
stage: Client Tests
# we don't have any yet
#- python: 3.7
# env: TOXENV=py37-integ
# stage: Client Tests
# we don't have any yet
#- python: 3.7
# env: TOXENV=py37-examples
# stage: Client Tests
# Security
- python: 3.7
env: TOXENV=bandit
stage: Static Checks
# Linting
- python: 3.7
env: TOXENV=lint
stage: Static Checks
# disable for now
#- python: 3.7
# env: TOXENV=lint
# stage: Static Checks
# MyPy
- python: 3.7
env: TOXENV=mypy-py3
stage: Static Checks
# disable for now
#- python: 3.7
# env: TOXENV=mypy-py3
# stage: Static Checks

install: pip install tox
script: tox -- -vv
2 changes: 0 additions & 2 deletions examples/test/test_make_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
"""Placeholder module to remind you to write tests."""
import pytest

import pipeformer


@pytest.mark.xfail(strict=True)
@pytest.mark.examples
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
attr
attrs >= 19.1.0
boto3
oyaml
requests
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_requirements():
return requirements, dependencies


install_requires, dependency_links = get_requirements()
INSTALL_REQUIRES, DEPENDENCY_LINKS = get_requirements()

setup(
name="pipeformer",
Expand All @@ -68,8 +68,8 @@ def get_requirements():
keywords="pipeformer pipeformer aws",
data_files=["README.rst", "CHANGELOG.rst", "LICENSE", "requirements.txt"],
license="Apache 2.0",
install_requires=install_requires,
dependency_links=dependency_links,
install_requires=INSTALL_REQUIRES,
dependency_links=DEPENDENCY_LINKS,
classifiers=[
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
Expand Down
72 changes: 51 additions & 21 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,6 @@ commands =
{posargs}
{[testenv:mypy-coverage]commands}

[testenv:mypy-py2]
basepython = {[testenv:mypy-common]basepython}
deps = {[testenv:mypy-common]deps}
commands =
python -m mypy \
--py2 \
--linecoverage-report build \
src/pipeformer/ \
{posargs}
{[testenv:mypy-coverage]commands}

###############################
# Formatting and style checks #
###############################
Expand All @@ -155,8 +144,9 @@ deps = {[testenv:flake8]deps}
commands =
flake8 \
# Ignore F811 redefinition errors in tests (breaks with pytest-mock use)
# Ignore D103 docstring requirements for tests
--ignore F811,D103 \
# Ignore F841 local variable assigned but never used (useful for collecting locals for test reports)
# Ignore D101,D102,D103 docstring requirements for tests
--ignore F811,F841,D101,D102,D103 \
test/

[testenv:flake8-examples]
Expand All @@ -166,9 +156,10 @@ commands =
flake8 \
examples/src/
flake8 \
# Ignore F811 redefinition errors in tests (breaks with fixture use)
# Ignore D103 docstring requirements for tests
--ignore F811,D103 \
# Ignore F811 redefinition errors in tests (breaks with pytest-mock use)
# Ignore F841 local variable assigned but never used (useful for collecting locals for test reports)
# Ignore D101,D102,D103 docstring requirements for tests
--ignore F811,F841,D101,D102,D103 \
examples/test/

[testenv:pylint]
Expand Down Expand Up @@ -204,7 +195,10 @@ commands =
[testenv:bandit]
basepython = python3
deps = bandit
commands = bandit -r src/pipeformer/
commands = bandit \
# B322: Ignore Python 2 input check: we only support Python 3
-s B322 \
-r src/pipeformer/

# Prone to false positives: only run manually
[testenv:vulture]
Expand Down Expand Up @@ -307,6 +301,8 @@ commands =

# Clear out any generated files from doc/
[testenv:resetdocs]
skip_install = true
deps =
whitelist_externals =
mkdir
rm
Expand All @@ -316,16 +312,50 @@ commands =
mkdir -p {toxinidir}/doc/lib/generated
rm -r {toxinidir}/doc/lib/generated

[testenv:docs]
[testenv:assert-file-is-empty]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
python -c \
"import sys;\
f = open(sys.argv[-1], 'r');\
contents = f.read();\
sys.exit(contents if contents.strip() else 0);\
f.close()" \
{posargs}

[testenv:docs-build]
basepython = python3
deps = {[testenv:docs]deps}
commands =
sphinx-build -E -c {toxinidir}/doc/ -b html {toxinidir}/doc/ {toxinidir}/doc/build/html
sphinx-build -E -c {toxinidir}/doc/ -b linkcheck {toxinidir}/doc/ {toxinidir}/doc/build/html
{[testenv:assert-file-is-empty]commands} "{toxinidir}/doc/build/html/output.txt"

[testenv:docs-spelling]
basepython = python3
deps = {[testenv:docs]deps}
commands =
sphinx-build -E -c {toxinidir}/doc/ -b spelling {toxinidir}/doc/ {toxinidir}/doc/build/spelling
{[testenv:assert-file-is-empty]commands} "{toxinidir}/doc/build/spelling/output.txt"

[testenv:docs-linkcheck]
basepython = python3
deps = {[testenv:docs]deps}
commands =
sphinx-build -E -c {toxinidir}/doc/ -b linkcheck {toxinidir}/doc/ {toxinidir}/doc/build/linkcheck
{[testenv:assert-file-is-empty]commands} "{toxinidir}/doc/build/linkcheck/output.txt"

[testenv:docs]
basepython = python3
deps =
{[testenv]deps}
-r{toxinidir}/doc/requirements.txt
commands =
{[testenv:docs-build]commands}
{[testenv:docs-spelling]commands}
{[testenv:docs-linkcheck]commands}

[testenv:autodocs]
basepython = python3
skip_install = true
deps =
{[testenv:docs]deps}
sphinx-autobuild
Expand Down

0 comments on commit 3bcd073

Please sign in to comment.