-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
118 additions
and
166 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
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,36 +1,32 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 21.10b0 | ||
rev: 21.12b0 | ||
hooks: | ||
- id: black | ||
args: ["--target-version=py36"] | ||
args: [--line-length, "128"] | ||
|
||
- repo: https://github.com/asottile/blacken-docs | ||
rev: v1.11.0 | ||
rev: v1.12.0 | ||
hooks: | ||
- id: blacken-docs | ||
args: ["--target-version=py36"] | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
language_version: python3.8 | ||
args: [--ignore, "E203,E501,B006,W503"] | ||
additional_dependencies: [flake8-bugbear] | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
args: [--profile, "black"] | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: debug-statements | ||
|
||
- repo: https://github.com/mgedmin/check-manifest | ||
rev: "0.47" | ||
hooks: | ||
- id: check-manifest | ||
args: [--no-build-isolation] | ||
- id: end-of-file-fixer | ||
- id: fix-byte-order-marker | ||
- id: trailing-whitespace |
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,2 +1,9 @@ | ||
version: 2 | ||
|
||
python: | ||
setup_py_install: true | ||
version: "3.8" | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
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 |
---|---|---|
@@ -1,6 +1,49 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta:__legacy__" | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
name = "cwt" | ||
version = "1.4.2" | ||
description = "A Python implementation of CWT/COSE." | ||
authors = ["Ajitomi Daisuke <[email protected]>"] | ||
readme = "README.md" | ||
repository = "https://github.com/dajiaji/cwt" | ||
|
||
include = [ | ||
".pre-commit-config.yaml", | ||
"CHANGES.rst", | ||
"CODE_OF_CONDUCT.md", | ||
"LICENSE", | ||
"tox.ini", | ||
"cwt/py.typed", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.6.1" | ||
asn1crypto = "^1.4.0" | ||
cbor2 = "^5.4.2" | ||
certvalidator = "^0.11.1" | ||
cryptography = "^36.0.0" | ||
Sphinx = {version = "^4.3.1", extras = ["docs"]} | ||
sphinx-autodoc-typehints = {version = "^1.12.0", extras = ["docs"]} | ||
sphinx-rtd-theme = {version = "^1.0.0", extras = ["docs"]} | ||
|
||
[tool.poetry.extras] | ||
docs = [ | ||
"Sphinx", | ||
"sphinx-rtd-theme", | ||
"sphinx-autodoc-typehints", | ||
] | ||
|
||
[tool.poetry.dev-dependencies] | ||
pytest = "^5.2" | ||
pytest-cov = "^3.0.0" | ||
coverage = {extras = ["toml"], version = "^6.2"} | ||
tox = "^3.24.4" | ||
pre-commit = "^2.15.0" | ||
mypy = "^0.910" | ||
Sphinx = "^4.3.1" | ||
|
||
[tool.coverage.run] | ||
parallel = true | ||
|
@@ -13,8 +56,8 @@ source = ["cwt", ".tox/*/site-packages"] | |
[tool.coverage.report] | ||
show_missing = true | ||
|
||
[tool.flake8] | ||
ignore = "E203,E501," | ||
|
||
[tool.isort] | ||
profile = "black" | ||
atomic = true | ||
combine_as_imports = true | ||
[tool.mypy] | ||
ignore_missing_imports = true |
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,76 +1,65 @@ | ||
[pytest] | ||
addopts = -ra | ||
testpaths = tests | ||
filterwarnings = | ||
once::Warning | ||
ignore:::pympler[.*] | ||
[tox] | ||
envlist = | ||
lint | ||
typing | ||
py{36,37,38,39,310} | ||
docs | ||
pypi | ||
coverage | ||
isolated_build = True | ||
|
||
|
||
[gh-actions] | ||
python = | ||
3.6: py36 | ||
3.7: py37 | ||
3.8: py38, docs, typing | ||
3.8: py38, lint, typing, docs, pypi | ||
3.9: py39 | ||
3.10: py310 | ||
|
||
|
||
[tox] | ||
envlist = | ||
lint | ||
typing | ||
py{36,37,38,39,310} | ||
docs | ||
pypi-description | ||
coverage-report | ||
isolated_build = True | ||
|
||
|
||
[testenv] | ||
# Prevent random setuptools/pip breakages like | ||
# https://github.com/pypa/setuptools/issues/1042 from breaking our builds. | ||
setenv = | ||
VIRTUALENV_NO_DOWNLOAD=1 | ||
extras = | ||
tests | ||
commands = {envpython} -b -m coverage run -m pytest {posargs} | ||
whitelist_externals = poetry | ||
commands = | ||
poetry install | ||
poetry run coverage run -m pytest -ra tests | ||
|
||
|
||
[testenv:docs] | ||
basepython = python3.8 | ||
extras = docs | ||
[testenv:lint] | ||
whitelist_externals = poetry | ||
skip_install = true | ||
commands = | ||
sphinx-build -n -T -W -b html -d {envtmpdir}/doctrees docs docs/_build/html | ||
poetry install | ||
poetry run pre-commit run --all-files | ||
|
||
|
||
[testenv:typing] | ||
basepython = python3.8 | ||
extras = dev | ||
commands = mypy cwt | ||
whitelist_externals = poetry | ||
skip_install = true | ||
commands = | ||
poetry install | ||
poetry run mypy cwt | ||
|
||
|
||
[testenv:lint] | ||
basepython = python3.8 | ||
extras = dev | ||
passenv = HOMEPATH # needed on Windows | ||
commands = pre-commit run --all-files | ||
[testenv:docs] | ||
whitelist_externals = poetry | ||
skip_install = true | ||
commands = | ||
poetry install -E docs | ||
sphinx-build -n -T -W -b html -d {envtmpdir}/doctrees docs docs/_build/html | ||
|
||
|
||
[testenv:pypi-description] | ||
basepython = python3.8 | ||
[testenv:pypi] | ||
whitelist_externals = poetry | ||
skip_install = true | ||
deps = | ||
twine | ||
pip >= 18.0.0 | ||
commands = | ||
pip wheel -w {envtmpdir}/build --no-deps . | ||
twine check {envtmpdir}/build/* | ||
poetry build | ||
|
||
|
||
[testenv:coverage-report] | ||
basepython = python3.8 | ||
[testenv:coverage] | ||
whitelist_externals = poetry | ||
skip_install = true | ||
deps = coverage[toml]==5.0.4 | ||
commands = | ||
coverage combine | ||
coverage report | ||
poetry install | ||
poetry run coverage combine | ||
poetry run coverage report |