Skip to content

Commit

Permalink
Move configuration into pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelboulton committed Dec 13, 2022
1 parent d39768b commit bd12dc4
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 92 deletions.
8 changes: 0 additions & 8 deletions .coveragerc

This file was deleted.

2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ example
.gitignore
LICENSE
# MANIFEST.in
.pylintrc
README.md
README.md
requirements.txt
Expand All @@ -113,7 +112,6 @@ tests
.tox
tox.ini
tox-integration.ini
.travis.yml

venv
.idea
12 changes: 0 additions & 12 deletions .isort.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ repos:
hooks:
- id: isort
args:
- --settings-path=.isort.cfg
- --settings-path=pyproject.toml

exclude: (docs/|example/|tests/)
14 changes: 0 additions & 14 deletions .pylintrc

This file was deleted.

2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Contributing

All configuration for the project should be put into `pyproject.toml`.

## Working locally

1. Create a virtualenv using whatever method you like (eg, [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/))
Expand Down
8 changes: 5 additions & 3 deletions constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ colorlog==6.7.0
commonmark==0.9.1
# via rich
coverage==6.5.0
# via pytest-cov
# via
# pytest-cov
# tavern (pyproject.toml)
cryptography==38.0.4
# via
# paramiko
Expand Down Expand Up @@ -101,7 +103,7 @@ importlib-metadata==5.1.0
# twine
iniconfig==1.1.1
# via pytest
isort==5.10.1
isort==5.11.1
# via
# pylint
# tavern (pyproject.toml)
Expand Down Expand Up @@ -248,7 +250,7 @@ ruamel-yaml==0.17.21
# via pykwalify
ruamel-yaml-clib==0.2.7
# via ruamel-yaml
ruff==0.0.177
ruff==0.0.178
# via tavern (pyproject.toml)
secretstorage==3.3.3
# via keyring
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Tavern is an advanced pytest based API testing framework for HTTP, MQTT or other protocols.

Note that Tavern **only** supports Python 3.4 and up. At the time of writing we
test against Python 3.7-3.9 and pypy3. Python 2 is now **unsupported**.
test against Python 3.7-3.10 and pypy3. Python 2 is now **unsupported**.

## Why Tavern

Expand Down
3 changes: 0 additions & 3 deletions mypy.ini

This file was deleted.

69 changes: 69 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ dev = [
"itsdangerous",
"mypy",
"mypy-extensions",
"coverage[toml]",
"types-PyYAML",
"flit >=3.2,<4",
"pip-tools",
Expand Down Expand Up @@ -100,3 +101,71 @@ requests = "tavern._plugins.rest.tavernhook:TavernRestPlugin"
[project.entry-points.tavern_mqtt]
paho-mqtt = "tavern._plugins.mqtt.tavernhook"

[tool.black]
target-version = ['py37']

[tool.mypy]
python_version = 3.7
ignore_missing_imports = true

[tool.coverage.run]
branch = false
omit = [
"tests/*",
".eggs/*",
"env/*",
"build/*",
"dist/*",
]
source = ["tavern"]

[tool.coverage.paths]
tavern = [
"tavern/",
".tox/py39-generic/lib/python3.9/site-packages/tavern/",
".tox/py39-mqtt/lib/python3.9/site-packages/tavern",
]

[tool.isort]
multi_line_output = 3
include_trailing_comma = true
indent = 4
atomic = true
combine_star = true
use_parentheses = true
line_length = 88
skip_glob = ["tests/**", "docs/**", "example/**"]
known_tavern = "tavern"
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "TAVERN", "LOCALFOLDER"]
force_sort_within_sections = true

[tool.pytest.ini_options]
testpaths = ["tavern", "tests/unit"]
addopts = [
"--doctest-modules",
"-r", "xs",
"-vv",
"--strict-markers",
"-p", "no:logging",
"--tb=short",
]
norecursedirs = [
".git",
".tox",
"example",
]

[tool.pylint.MASTER]
disable = "missing-docstring,fixme,invalid-name,line-too-long,too-few-public-methods,no-else-return,too-many-branches,locally-disabled,useless-object-inheritance,no-else-raise,abstract-method,import-outside-toplevel,cyclic-import,consider-using-f-string,useless-option-value"
ignore = "tests"

[tool.pylint.REPORTS]
reports = "no"

[tool.pylint.SIMILARITIES]
min-similarity-lines = 6
ignore-imports = "yes"

[tool.pylint.TYPECHECK]
ignored-classes = "RememberComposer"
ignored-modules = "distutils"
24 changes: 0 additions & 24 deletions pytest.ini

This file was deleted.

44 changes: 23 additions & 21 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ coverage[toml]==6.5.0 \
--hash=sha256:f4f05d88d9a80ad3cac6244d36dd89a3c00abc16371769f1340101d3cb899fc3 \
--hash=sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84 \
--hash=sha256:fc2af30ed0d5ae0b1abdb4ebdce598eafd5b35397d4d75deb341a614d333d987
# via pytest-cov
# via
# pytest-cov
# tavern (pyproject.toml)
cryptography==38.0.4 \
--hash=sha256:0e70da4bdff7601b0ef48e6348339e490ebfb0cbe638e083c9c41fb49f00c8bd \
--hash=sha256:10652dd7282de17990b88679cb82f832752c4e8237f0c714be518044269415db \
Expand Down Expand Up @@ -340,9 +342,9 @@ iniconfig==1.1.1 \
--hash=sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3 \
--hash=sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32
# via pytest
isort==5.10.1 \
--hash=sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7 \
--hash=sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951
isort==5.11.1 \
--hash=sha256:7c5bd998504826b6f1e6f2f98b533976b066baba29b8bae83fdeefd0b89c6b70 \
--hash=sha256:bf02c95f1fe615ebbe13a619cfed1619ddfe8941274c9e3de3143adca406cb02
# via
# pylint
# tavern (pyproject.toml)
Expand Down Expand Up @@ -808,23 +810,23 @@ ruamel-yaml-clib==0.2.7 \
--hash=sha256:f01da5790e95815eb5a8a138508c01c758e5f5bc0ce4286c4f7028b8dd7ac3d0 \
--hash=sha256:f34019dced51047d6f70cb9383b2ae2853b7fc4dce65129a5acd49f4f9256646
# via ruamel-yaml
ruff==0.0.177 \
--hash=sha256:1a6c0eebbeb065f779516c64b08c4fcdddd9ca48c8259bb5e6bab005707578d3 \
--hash=sha256:235edc670a7a01154a1b1c89a229b5de2b99b9afb01d6d9457565d7f7cd04c68 \
--hash=sha256:27462f8ec0d98934ce5e1eef97114efe6e97783d452fb8054d0a2077643838e2 \
--hash=sha256:2e0252edbab8bd9e1a573d6174b8893f5ac7fc6685342079bc583737dcbb923b \
--hash=sha256:4280b6692adac77f56118615310ed3f1d634008b9dfec091c36e326555d02e0b \
--hash=sha256:4996a980a6ba81c5edde0ad3d65c186114a7429defe3c6b018067cc81570a78e \
--hash=sha256:4b11a0bcad6be56c2b39b37d7c2486d86f47e4dbe63e53a4592cca44df8172ee \
--hash=sha256:6bb30a5799f98b04259ef7d3b9bdb2d2c4934c28ca0b8f7f185e3e6075585474 \
--hash=sha256:736ce4156182613fac2af8cfb913896d73875ba2e17da26f6a7b9a9809c7c8bd \
--hash=sha256:88b5ba142c1db12c58c79c54efa02db7cd906f8126ad3d2d0c5aa465aea23a78 \
--hash=sha256:96c7f6b61c957aab18e9941a925f559c1af340fe6ff92a89b5667d355d57f5af \
--hash=sha256:a4eae7c3703278ae2d4c1851148d3f0d5b40a0ee506eea2a934ef1ad290a1a23 \
--hash=sha256:bf061e86c7066eef7a9abb16852f8ff2440942211dface6f0c8ddc71d594697e \
--hash=sha256:c4d88556d9e0f9a578da7cefd6424ff717abe9432f0a832902a404bc9fd8d4cf \
--hash=sha256:ce4ff408a23f1d68db850ead408287aab014ae72de26f603ecf96b552e226343 \
--hash=sha256:d7a850a627e24e2a8da74744f9049da3b29ddc94dceec10db5032f80524447ca
ruff==0.0.178 \
--hash=sha256:0b5c9cf92a0abc05e4bd66d617951f016f806fe4cb48c665c0bf911c95c98655 \
--hash=sha256:0f040990ea0587b8205099110536882b042ff411373afc69e71d2294fe0d95ee \
--hash=sha256:128f6c42a2b004c0680b9c0fa6af04e64bf47e87737c3b7644dfdfdf12fa5fc6 \
--hash=sha256:1bc308172a0df7628029ac92671b48fa8a5bb1b235931a2ac4e44fffffeef76b \
--hash=sha256:2aef8ef37aed0b65c66045fb6ed59d1b1f697fb3813ab71f8f848d3e0d2560c8 \
--hash=sha256:4783ff67cdf0231f66b9ad808175d095feb43eb22fe6c1a87913ff74fbaac77f \
--hash=sha256:79aceb172612c9293ed07fdd14a63c6cb2f1cd838a372914f0800fb465c8fc48 \
--hash=sha256:7a8e12121a42720328f9637f03dc288e089a5f51eddc3da4d14e14887bbdef7b \
--hash=sha256:8507c4c887dadb2f70075c1de76e79120b1234d81e5d79cc5c73d3504527c30f \
--hash=sha256:8a06c6f3c378e0d858eed86c2bbe4b23395c70d1bdcbb73189a0e5a5e5215480 \
--hash=sha256:8dc1af3c379d7f4643aa44cc6f70b665a86489194c6ffab49d2054880a0ad26e \
--hash=sha256:bf0237400af549d37533a2e3e4654fdcc93a19c7d725af8a1bb565f1e9cdfaba \
--hash=sha256:c93bd93c2b18d66643669187adcf52ee16a390f8f725f68cf3d8cf25d9b0ba76 \
--hash=sha256:d94d118ab838b4d920233d7dd197c572090ad69fcde08241ff17fb98aa0ca29e \
--hash=sha256:edc01a9ed28b90df2541dca499cda2e825bf710bd1e8ffa6dfeef13944b3017c \
--hash=sha256:ffff3376e4b2ad436a1d41c5dbdc70fa33579c9658469d1efbbd907d6b480853
# via tavern (pyproject.toml)
secretstorage==3.3.3 \
--hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ commands =

[testenv:py3isort]
commands =
isort . --check --settings-path={toxinidir}/.isort.cfg --diff
isort . --check --settings-path={toxinidir}/.isort.cfg
isort . --check --settings-path={toxinidir}/pyproject.toml --diff
isort . --check --settings-path={toxinidir}/pyproject.toml

[testenv:py3mypy]
setenv =
Expand All @@ -43,4 +43,4 @@ deps =
types-PyYAML
types-requests
commands =
mypy -p tavern --config-file {toxinidir}/mypy.ini --install-types --non-interactive
mypy -p tavern --config-file {toxinidir}/pyproject.toml --install-types --non-interactive

0 comments on commit bd12dc4

Please sign in to comment.