parent
8a3a4f1b0b
commit
fee2b1c8ba
@ -0,0 +1 @@ |
||||
# {{cookiecutter.package}} 0.1.0 (UNRELEASED) |
@ -1 +0,0 @@ |
||||
include LICENSE README.md CHANGELOG.md |
@ -1,3 +1,15 @@ |
||||
# {{cookiecutter.package}} |
||||
|
||||
## {{cookiecutter.package_description}} |
||||
|
||||
## Install |
||||
|
||||
```sh |
||||
$ pip install {{ cookiecutter.package }} |
||||
``` |
||||
|
||||
## Example |
||||
|
||||
```python |
||||
print("TODO") |
||||
``` |
||||
|
@ -1,4 +0,0 @@ |
||||
[mypy] |
||||
python_version = 3.8 |
||||
platform = linux |
||||
ignore_missing_imports = True |
@ -1,11 +1,75 @@ |
||||
[build-system] |
||||
requires = [ |
||||
"setuptools", |
||||
"setuptools-scm", |
||||
"wheel", |
||||
] |
||||
build-backend = "setuptools.build_meta" |
||||
requires = ["poetry>=1.0.9,<2.0"] |
||||
build-backend = "poetry.masonry.api" |
||||
|
||||
[tool.poetry] |
||||
name = "{{cookiecutter.package}}" |
||||
version = "0.1.0" |
||||
description = "{{cookiecutter.package_description}}" |
||||
authors = ["{{cookiecutter.author}} <{{cookiecutter.author_email}}>"] |
||||
maintainers = ["{{cookiecutter.author}} <{{cookiecutter.author_email}}>"] |
||||
license = "GPLv3" |
||||
readme = "README.md" |
||||
repository = "{{cookiecutter.git_hosting_url}}" |
||||
keywords = [] |
||||
|
||||
[tool.poetry.dependencies] |
||||
python = "^3.6" |
||||
|
||||
[tool.poetry.dev-dependencies] |
||||
black = "^19.10b0" |
||||
flake8 = "^3.8.3" |
||||
isort = "^5.0.2" |
||||
|
||||
[tool.black] |
||||
line-length = 80 |
||||
target-version = ["py38"] |
||||
include = '\.pyi?$' |
||||
|
||||
[tool.isort] |
||||
include_trailing_comma = true |
||||
known_first_party = "{{cookiecutter.package}}" |
||||
known_third_party = "pytest" |
||||
line_length = 80 |
||||
multi_line_output = 3 |
||||
skip = ".tox" |
||||
|
||||
[tool.tox] |
||||
legacy_tox_ini = """ |
||||
[tox] |
||||
envlist = |
||||
{py36,py37,py38} |
||||
lint |
||||
sort |
||||
format |
||||
type |
||||
skip_missing_interpreters = True |
||||
isolated_build = True |
||||
|
||||
[testenv] |
||||
deps = |
||||
pytest |
||||
pytest-cov |
||||
pytest-mock |
||||
commands = pytest test/ --cov={toxinidir}/{{cookiecutter.package}}/ --no-cov-on-fail {posargs} |
||||
|
||||
[testenv:lint] |
||||
skipdist = True |
||||
deps = flake8 |
||||
commands = flake8 {posargs:--max-line-length 80} {{cookiecutter.package}}/ test/ |
||||
|
||||
[testenv:sort] |
||||
skipdist = True |
||||
deps = isort |
||||
commands = isort {posargs:-c} {{cookiecutter.package}}/ test/ |
||||
|
||||
[testenv:format] |
||||
skipdist = True |
||||
deps = black |
||||
commands = black {posargs:--check} {{cookiecutter.package}}/ test/ |
||||
|
||||
[testenv:type] |
||||
skipdist = True |
||||
deps = mypy |
||||
commands = mypy {posargs:--ignore-missing-imports} {{cookiecutter.package}}/ test/ |
||||
""" |
||||
|
@ -1,46 +0,0 @@ |
||||
[tool:pytest] |
||||
testpaths = test |
||||
|
||||
[flake8] |
||||
max-line-length = 80 |
||||
|
||||
[isort] |
||||
known_first_party = {{cookiecutter.package}} |
||||
known_third_party = pytest |
||||
line_length = 80 |
||||
multi_line_output = 3 |
||||
skip = .venv, .tox |
||||
include_trailing_comma = True |
||||
|
||||
[metadata] |
||||
name = {{cookiecutter.package}} |
||||
author = {{cookiecutter.author}} |
||||
author_email = {{cookiecutter.author_email}} |
||||
maintainer = {{cookiecutter.author}} |
||||
maintainer_email = {{cookiecutter.author_email}} |
||||
url = {{cookiecutter.git_hosting_url}} |
||||
project_urls = |
||||
Source Code = {{cookiecutter.git_hosting_url}} |
||||
description = {{cookiecutter.package_description}} |
||||
long_description = file: README.md |
||||
license = GPLv3 |
||||
license_file = LICENSE |
||||
classifiers = |
||||
Programming Language :: Python :: 3 |
||||
Programming Language :: Python :: 3.6 |
||||
Programming Language :: Python :: 3.7 |
||||
Programming Language :: Python :: 3.8 |
||||
|
||||
[options] |
||||
use_scm_version = True |
||||
python_requires = >=3.6 |
||||
setup_requires = |
||||
setuptools_scm |
||||
setuptools_scm_git_archive |
||||
package_dir = |
||||
= . |
||||
packages = find: |
||||
zip_safe = False |
||||
|
||||
[options.packages.find] |
||||
where = . |
@ -1,3 +0,0 @@ |
||||
from setuptools import setup |
||||
|
||||
setup(use_scm_version=True) |
@ -1,10 +0,0 @@ |
||||
"""Version test module.""" |
||||
|
||||
|
||||
def test_version_fails_gracefully(mocker): |
||||
target = 'pkg_resources.get_distribution' |
||||
mocker.patch(target, side_effect=Exception()) |
||||
|
||||
from {{cookiecutter.package}}.__init__ import __version__ |
||||
|
||||
assert __version__ == 'unknown' |
@ -1,48 +0,0 @@ |
||||
[tox] |
||||
envlist = |
||||
{py36,py37,py38} |
||||
lint |
||||
sort |
||||
format |
||||
type |
||||
skip_missing_interpreters = True |
||||
isolated_build = True |
||||
|
||||
[testenv] |
||||
deps = |
||||
pytest |
||||
pytest-cov |
||||
pytest-mock |
||||
commands = pytest test/ --cov={toxinidir}/{{cookiecutter.package}}/ --no-cov-on-fail {posargs} |
||||
|
||||
[testenv:lint] |
||||
skipdist = True |
||||
deps = flake8 |
||||
commands = flake8 {posargs} {{cookiecutter.package}}/ test/ |
||||
|
||||
[testenv:sort] |
||||
skipdist = True |
||||
deps = isort |
||||
commands = isort {posargs:-rc -c} -sp setup.cfg {{cookiecutter.package}}/ test/ |
||||
|
||||
[testenv:format] |
||||
skipdist = True |
||||
basepython = python3.8 |
||||
deps = black |
||||
commands = black {posargs:--check} {{cookiecutter.package}}/ test/ |
||||
|
||||
[testenv:type] |
||||
basepython = python3.8 |
||||
skipdist = True |
||||
deps = mypy |
||||
commands = mypy {{cookiecutter.package}}/ test/ |
||||
|
||||
[testenv:release] |
||||
deps = twine |
||||
commands = |
||||
rm -rf {toxworkdir}/dist |
||||
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel |
||||
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg |
||||
twine upload {toxworkdir}/dist/* |
||||
whitelist_externals = |
||||
rm |
Loading…
Reference in new issue