Bootstrapping with python support files
This commit is contained in:
parent
2421813bd7
commit
831467ca74
24
.drone.yml
Normal file
24
.drone.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
kind: pipeline
|
||||
|
||||
name: default
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- python: 3.8
|
||||
env: TOXENV=py38
|
||||
- python: 3.8
|
||||
env: TOXENV=lint
|
||||
- python: 3.8
|
||||
env: TOXENV=sort
|
||||
- python: 3.8
|
||||
env: TOXENV=format
|
||||
- python: 3.8
|
||||
env: TOXENV=type
|
||||
|
||||
steps:
|
||||
- name: Tox matrix testing
|
||||
image: python:3.8.2-buster
|
||||
commands:
|
||||
- pip install tox==3.14.6
|
||||
- tox
|
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
*.egg-info/
|
||||
*.pyc
|
||||
.coverage
|
||||
.eggs/
|
||||
.mypy_cache/
|
||||
.tox/
|
||||
.venv/
|
||||
__pycache__
|
||||
build/
|
||||
dist/
|
||||
pip-wheel-metadata/
|
||||
documentation/build/
|
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: gandi_dns
|
||||
@ -14,8 +16,6 @@ EXAMPLES = """
|
||||
ipv4: 192.168.1.2
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(argument_spec={})
|
||||
|
4
mypy.ini
Normal file
4
mypy.ini
Normal file
@ -0,0 +1,4 @@
|
||||
[mypy]
|
||||
python_version = 3.7
|
||||
platform = linux
|
||||
ignore_missing_imports = True
|
13
pyproject.toml
Normal file
13
pyproject.toml
Normal file
@ -0,0 +1,13 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools>=40.9.0",
|
||||
"setuptools-scm",
|
||||
"wheel",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.black]
|
||||
line-length = 80
|
||||
target-version = ["py38"]
|
||||
skip-string-normalization = true
|
||||
include = '\.pyi?$'
|
16
setup.cfg
Normal file
16
setup.cfg
Normal file
@ -0,0 +1,16 @@
|
||||
[tool:pytest]
|
||||
testpaths = test
|
||||
|
||||
[flake8]
|
||||
max-line-length = 80
|
||||
|
||||
[isort]
|
||||
line_length = 80
|
||||
multi_line_output = 3
|
||||
skip = .venv, .tox
|
||||
include_trailing_comma = True
|
||||
|
||||
[metadata]
|
||||
name = autonomic.gandi
|
||||
author = decentral1se
|
||||
version = 0.0.1
|
40
tox.ini
Normal file
40
tox.ini
Normal file
@ -0,0 +1,40 @@
|
||||
[tox]
|
||||
envlist =
|
||||
{py38}
|
||||
lint
|
||||
sort
|
||||
format
|
||||
type
|
||||
skip_missing_interpreters = True
|
||||
isolated_build = True
|
||||
|
||||
[testenv]
|
||||
description = run the unit tests
|
||||
deps =
|
||||
pytest
|
||||
pytest-cov
|
||||
commands = pytest test/ --cov={toxinidir}/library/ --no-cov-on-fail {posargs}
|
||||
|
||||
[testenv:lint]
|
||||
description = lint the source
|
||||
skipdist = True
|
||||
deps = flake8
|
||||
commands = flake8 {posargs} library/ test/
|
||||
|
||||
[testenv:sort]
|
||||
description = sort the source
|
||||
skipdist = True
|
||||
deps = isort
|
||||
commands = isort {posargs:-rc -c} -sp setup.cfg library/ test/
|
||||
|
||||
[testenv:format]
|
||||
description = format the source
|
||||
skipdist = True
|
||||
deps = black
|
||||
commands = black {posargs:--check} library/ test/
|
||||
|
||||
[testenv:type]
|
||||
description = type check the source
|
||||
skipdist = True
|
||||
deps = mypy
|
||||
commands = mypy library/ test/
|
Loading…
Reference in New Issue
Block a user