mirror of
https://github.com/thegeeklab/ansible-doctor.git
synced 2024-11-22 04:40:43 +00:00
build: migrate to poetry
This commit is contained in:
parent
2981079cbf
commit
559cc5bef7
6
.style.yapf
Normal file
6
.style.yapf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[style]
|
||||||
|
based_on_style = google
|
||||||
|
column_limit = 99
|
||||||
|
dedent_closing_brackets = true
|
||||||
|
coalesce_brackets = true
|
||||||
|
split_before_logical_operator = true
|
@ -90,3 +90,7 @@ class AnsibleDoctor:
|
|||||||
self.logger.info("Using config file {}".format(config.config_file))
|
self.logger.info("Using config file {}".format(config.config_file))
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
AnsibleDoctor()
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
"""Default package."""
|
"""Default package."""
|
||||||
|
|
||||||
__author__ = "Robert Kaussow"
|
__version__ = "0.0.0"
|
||||||
__project__ = "ansible-doctor"
|
|
||||||
__version__ = "0.1.7"
|
|
||||||
__license__ = "GPL-3.0"
|
|
||||||
__maintainer__ = "Robert Kaussow"
|
|
||||||
__email__ = "mail@thegeeklab.de"
|
|
||||||
__url__ = "https://github.com/thegeeklab/ansible-doctor"
|
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""Main program."""
|
|
||||||
|
|
||||||
from ansibledoctor.Cli import AnsibleDoctor
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
AnsibleDoctor()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
@ -1,19 +0,0 @@
|
|||||||
pydocstyle
|
|
||||||
flake8
|
|
||||||
flake8-colors
|
|
||||||
flake8-blind-except
|
|
||||||
flake8-builtins
|
|
||||||
flake8-docstrings
|
|
||||||
flake8-isort
|
|
||||||
flake8-logging-format
|
|
||||||
flake8-polyfill
|
|
||||||
flake8-quotes
|
|
||||||
flake8-pep3101
|
|
||||||
flake8-eradicate; python_version >= "3.6"
|
|
||||||
pep8-naming
|
|
||||||
wheel
|
|
||||||
pytest
|
|
||||||
pytest-mock
|
|
||||||
pytest-cov
|
|
||||||
bandit
|
|
||||||
yapf
|
|
1005
poetry.lock
generated
Normal file
1005
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
99
pyproject.toml
Normal file
99
pyproject.toml
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
[tool.poetry]
|
||||||
|
authors = ["Robert Kaussow <mail@thegeeklab.de>"]
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 5 - Production/Stable",
|
||||||
|
"Environment :: Console",
|
||||||
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||||
|
"Intended Audience :: Developers",
|
||||||
|
"Intended Audience :: Information Technology",
|
||||||
|
"Intended Audience :: System Administrators",
|
||||||
|
"Natural Language :: English",
|
||||||
|
"Operating System :: POSIX",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Programming Language :: Python :: 3.5",
|
||||||
|
"Programming Language :: Python :: 3.6",
|
||||||
|
"Programming Language :: Python :: 3.7",
|
||||||
|
"Programming Language :: Python :: 3.8",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Topic :: Utilities",
|
||||||
|
"Topic :: Software Development",
|
||||||
|
"Topic :: Software Development :: Documentation",
|
||||||
|
]
|
||||||
|
description = "Generate documentation from annotated Ansible roles using templates."
|
||||||
|
documentation = "https://ansible-doctor.geekdocs.de/"
|
||||||
|
homepage = "https://ansible-doctor.geekdocs.de/"
|
||||||
|
include = [
|
||||||
|
"LICENSE",
|
||||||
|
]
|
||||||
|
keywords = ["ansible", "code", "review"]
|
||||||
|
license = "GPL-3.0-only"
|
||||||
|
name = "ansible-doctor"
|
||||||
|
packages = [
|
||||||
|
{include = "ansibledoctor"},
|
||||||
|
]
|
||||||
|
readme = "README.md"
|
||||||
|
repository = "https://github.com/thegeeklab/ansible-doctor/"
|
||||||
|
version = "0.0.0"
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
Jinja2 = "^2.11.2"
|
||||||
|
anyconfig = "^0.9.11"
|
||||||
|
appdirs = "^1.4.4"
|
||||||
|
colorama = "^0.4.4"
|
||||||
|
environs = "^9.3.0"
|
||||||
|
jsonschema = "^3.2.0"
|
||||||
|
nested-lookup = "^0.2.21"
|
||||||
|
pathspec = "^0.8.1"
|
||||||
|
python = "^3.6.0"
|
||||||
|
python-json-logger = "^2.0.1"
|
||||||
|
"ruamel.yaml" = "^0.16.12"
|
||||||
|
|
||||||
|
[tool.poetry.dev-dependencies]
|
||||||
|
bandit = "^1.7.0"
|
||||||
|
flake8 = "^3.8.4"
|
||||||
|
flake8-blind-except = "^0.1.1"
|
||||||
|
flake8-builtins = "^1.5.3"
|
||||||
|
flake8-colors = "^0.1.9"
|
||||||
|
flake8-docstrings = "^1.5.0"
|
||||||
|
flake8-eradicate = "^1.0.0"
|
||||||
|
flake8-isort = "^4.0.0"
|
||||||
|
flake8-logging-format = "^0.6.0"
|
||||||
|
flake8-pep3101 = "^1.3.0"
|
||||||
|
flake8-polyfill = "^1.0.2"
|
||||||
|
flake8-quotes = "^3.2.0"
|
||||||
|
pep8-naming = "^0.11.1"
|
||||||
|
pydocstyle = "^5.1.1"
|
||||||
|
pytest = "^6.2.1"
|
||||||
|
pytest-cov = "^2.10.1"
|
||||||
|
pytest-mock = "^3.4.0"
|
||||||
|
yapf = "^0.30.0"
|
||||||
|
|
||||||
|
[tool.poetry.scripts]
|
||||||
|
ansible-doctor = "ansibledoctor.Cli:main"
|
||||||
|
|
||||||
|
[tool.poetry-dynamic-versioning]
|
||||||
|
enable = true
|
||||||
|
style = "semver"
|
||||||
|
vcs = "git"
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
default_section = "THIRDPARTY"
|
||||||
|
force_single_line = true
|
||||||
|
line_length = 99
|
||||||
|
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
|
||||||
|
skip_glob = ["**/.env*", "**/env/*", "**/docs/*"]
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
addopts = "--cov=ansibledoctor --cov-report xml:coverage.xml --cov-append --no-cov-on-fail"
|
||||||
|
filterwarnings = [
|
||||||
|
"ignore::FutureWarning",
|
||||||
|
"ignore:.*collections.*:DeprecationWarning",
|
||||||
|
"ignore:.*pep8.*:FutureWarning",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
omit = ["**/test/*"]
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
|
30
setup.cfg
30
setup.cfg
@ -1,30 +0,0 @@
|
|||||||
[metadata]
|
|
||||||
description-file = README.md
|
|
||||||
license_file = LICENSE
|
|
||||||
|
|
||||||
[bdist_wheel]
|
|
||||||
universal = 1
|
|
||||||
|
|
||||||
[isort]
|
|
||||||
default_section = THIRDPARTY
|
|
||||||
known_first_party = ansibledoctor
|
|
||||||
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
|
|
||||||
force_single_line = true
|
|
||||||
line_length = 99
|
|
||||||
skip_glob = **/.env*,**/env/*,**/docs/*
|
|
||||||
|
|
||||||
[yapf]
|
|
||||||
based_on_style = google
|
|
||||||
column_limit = 99
|
|
||||||
dedent_closing_brackets = true
|
|
||||||
coalesce_brackets = true
|
|
||||||
split_before_logical_operator = true
|
|
||||||
|
|
||||||
[tool:pytest]
|
|
||||||
filterwarnings =
|
|
||||||
ignore::FutureWarning
|
|
||||||
ignore:.*collections.*:DeprecationWarning
|
|
||||||
ignore:.*pep8.*:FutureWarning
|
|
||||||
|
|
||||||
[coverage:run]
|
|
||||||
omit = **/test/*
|
|
69
setup.py
69
setup.py
@ -1,69 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""Setup script for the package."""
|
|
||||||
|
|
||||||
import io
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
|
|
||||||
from setuptools import find_packages
|
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
PACKAGE_NAME = "ansibledoctor"
|
|
||||||
|
|
||||||
|
|
||||||
def get_property(prop, project):
|
|
||||||
current_dir = os.path.dirname(os.path.realpath(__file__))
|
|
||||||
result = re.search(
|
|
||||||
r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop),
|
|
||||||
open(os.path.join(current_dir, project, "__init__.py")).read()
|
|
||||||
)
|
|
||||||
return result.group(1)
|
|
||||||
|
|
||||||
|
|
||||||
def get_readme(filename="README.md"):
|
|
||||||
this = os.path.abspath(os.path.dirname(__file__))
|
|
||||||
with io.open(os.path.join(this, filename), encoding="utf-8") as f:
|
|
||||||
long_description = f.read()
|
|
||||||
return long_description
|
|
||||||
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name=get_property("__project__", PACKAGE_NAME),
|
|
||||||
version=get_property("__version__", PACKAGE_NAME),
|
|
||||||
description="Generate documentation from annotated Ansible roles using templates",
|
|
||||||
keywords="ansible role documentation",
|
|
||||||
author=get_property("__author__", PACKAGE_NAME),
|
|
||||||
author_email=get_property("__email__", PACKAGE_NAME),
|
|
||||||
url=get_property("__url__", PACKAGE_NAME),
|
|
||||||
license=get_property("__license__", PACKAGE_NAME),
|
|
||||||
long_description=get_readme(),
|
|
||||||
long_description_content_type="text/markdown",
|
|
||||||
packages=find_packages(exclude=["*.test", "test", "test.*"]),
|
|
||||||
include_package_data=True,
|
|
||||||
zip_safe=False,
|
|
||||||
python_requires=">=3.5,<4",
|
|
||||||
classifiers=[
|
|
||||||
"Development Status :: 5 - Production/Stable",
|
|
||||||
"Environment :: Console",
|
|
||||||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
|
||||||
"Intended Audience :: Developers",
|
|
||||||
"Intended Audience :: Information Technology",
|
|
||||||
"Intended Audience :: System Administrators",
|
|
||||||
"Natural Language :: English",
|
|
||||||
"Operating System :: POSIX",
|
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"Programming Language :: Python :: 3.5",
|
|
||||||
"Programming Language :: Python :: 3.6",
|
|
||||||
"Programming Language :: Python :: 3.7",
|
|
||||||
"Programming Language :: Python :: 3.8",
|
|
||||||
"Programming Language :: Python :: 3.9",
|
|
||||||
"Topic :: Utilities",
|
|
||||||
"Topic :: Software Development",
|
|
||||||
"Topic :: Software Development :: Documentation",
|
|
||||||
],
|
|
||||||
install_requires=[
|
|
||||||
"ruamel.yaml", "appdirs", "colorama", "anyconfig", "pathspec", "python-json-logger",
|
|
||||||
"jsonschema", "jinja2", "environs", "nested-lookup"
|
|
||||||
],
|
|
||||||
entry_points={"console_scripts": ["ansible-doctor = ansibledoctor.__main__:main"]},
|
|
||||||
)
|
|
Loading…
Reference in New Issue
Block a user