mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-22 04:00:40 +00:00
switch to poetry
This commit is contained in:
parent
1d1d45d5e0
commit
8f9d40a31e
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
|
20
Makefile
Normal file
20
Makefile
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# renovate: datasource=github-releases depName=thegeeklab/hugo-geekdoc
|
||||||
|
THEME_VERSION := v0.5.0
|
||||||
|
THEME := hugo-geekdoc
|
||||||
|
BASEDIR := docs
|
||||||
|
THEMEDIR := $(BASEDIR)/themes
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: doc
|
||||||
|
|
||||||
|
.PHONY: doc
|
||||||
|
doc: doc-assets
|
||||||
|
|
||||||
|
.PHONY: doc-assets
|
||||||
|
doc-assets:
|
||||||
|
mkdir -p $(THEMEDIR)/$(THEME)/ ; \
|
||||||
|
curl -sSL "https://github.com/thegeeklab/$(THEME)/releases/download/${THEME_VERSION}/$(THEME).tar.gz" | tar -xz -C $(THEMEDIR)/$(THEME)/ --strip-components=1
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf $(THEMEDIR) && \
|
51
Pipfile
51
Pipfile
@ -1,51 +0,0 @@
|
|||||||
[[source]]
|
|
||||||
name = "pypi"
|
|
||||||
url = "https://pypi.org/simple"
|
|
||||||
verify_ssl = true
|
|
||||||
|
|
||||||
[dev-packages]
|
|
||||||
pipenv-setup = "*"
|
|
||||||
pydocstyle = "<4.0.0"
|
|
||||||
flake8 = "*"
|
|
||||||
flake8-colors = "*"
|
|
||||||
flake8-blind-except = "*"
|
|
||||||
flake8-builtins = "*"
|
|
||||||
flake8-docstrings = "<=3.0.0"
|
|
||||||
flake8-isort = "*"
|
|
||||||
flake8-logging-format = "*"
|
|
||||||
flake8-polyfill = "*"
|
|
||||||
flake8-quotes = "*"
|
|
||||||
flake8-pep3101 = "*"
|
|
||||||
flake8-eradicate = {version = "*",markers = "python_version>='3.6'"}
|
|
||||||
pep8-naming = "*"
|
|
||||||
pytest = "*"
|
|
||||||
pytest-mock = "*"
|
|
||||||
pytest-cov = "*"
|
|
||||||
bandit = "*"
|
|
||||||
docker-tidy = {editable = true,path = "."}
|
|
||||||
autopep8 = "*"
|
|
||||||
yapf = "*"
|
|
||||||
pathlib2 = "*"
|
|
||||||
|
|
||||||
[packages]
|
|
||||||
zipp = "<2.0.0"
|
|
||||||
importlib-metadata = {version = "*",markers = "python_version<'3.8'"}
|
|
||||||
certifi = "*"
|
|
||||||
chardet = "*"
|
|
||||||
docker = "*"
|
|
||||||
docker-pycreds = "*"
|
|
||||||
idna = "*"
|
|
||||||
ipaddress = "*"
|
|
||||||
python-dateutil = "*"
|
|
||||||
requests = "*"
|
|
||||||
appdirs = "*"
|
|
||||||
colorama = "*"
|
|
||||||
anyconfig = "*"
|
|
||||||
pathspec = "*"
|
|
||||||
python-json-logger = "*"
|
|
||||||
jsonschema = "*"
|
|
||||||
environs = "*"
|
|
||||||
nested-lookup = "*"
|
|
||||||
"ruamel.yaml" = "*"
|
|
||||||
websocket-client = "*"
|
|
||||||
dateparser = "*"
|
|
1087
Pipfile.lock
generated
1087
Pipfile.lock
generated
File diff suppressed because it is too large
Load Diff
@ -143,3 +143,7 @@ class DockerTidy:
|
|||||||
self.gc.run()
|
self.gc.run()
|
||||||
elif self.config.config["command"] == "stop":
|
elif self.config.config["command"] == "stop":
|
||||||
self.stop.run()
|
self.stop.run()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
DockerTidy()
|
||||||
|
@ -1,15 +1,3 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""Default package."""
|
"""Default package."""
|
||||||
|
|
||||||
try:
|
__version__ = "0.0.0"
|
||||||
from importlib import metadata
|
|
||||||
except ImportError: # for Python<3.8
|
|
||||||
import importlib_metadata as metadata
|
|
||||||
|
|
||||||
__author__ = "Robert Kaussow"
|
|
||||||
__project__ = "docker-tidy"
|
|
||||||
__license__ = "Apache-2.0"
|
|
||||||
__maintainer__ = "Robert Kaussow"
|
|
||||||
__email__ = "mail@thegeeklab.de"
|
|
||||||
__url__ = "https://github.com/thegeeklab/docker-tidy"
|
|
||||||
__version__ = metadata.version("docker-tidy")
|
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""Main program."""
|
|
||||||
|
|
||||||
from dockertidy.Cli import DockerTidy
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
DockerTidy()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
1530
poetry.lock
generated
Normal file
1530
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
113
pyproject.toml
Normal file
113
pyproject.toml
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
[tool.poetry]
|
||||||
|
authors = ["Robert Kaussow <mail@thegeeklab.de>"]
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 5 - Production/Stable",
|
||||||
|
"Environment :: Console",
|
||||||
|
"License :: OSI Approved :: Apache Software License",
|
||||||
|
"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 :: System :: Systems Administration",
|
||||||
|
"Topic :: Utilities",
|
||||||
|
"Topic :: Software Development",
|
||||||
|
]
|
||||||
|
description = "Keep docker hosts tidy"
|
||||||
|
documentation = "https://docker-tidy.geekdocs.de/"
|
||||||
|
homepage = "https://docker-tidy.geekdocs.de/"
|
||||||
|
include = [
|
||||||
|
"LICENSE",
|
||||||
|
]
|
||||||
|
keywords = ["docker", "gc", "prune", "garbage"]
|
||||||
|
license = "Apache-2.0"
|
||||||
|
name = "docker-tidy"
|
||||||
|
packages = [
|
||||||
|
{include = "dockertidy"},
|
||||||
|
]
|
||||||
|
readme = "README.md"
|
||||||
|
repository = "https://github.com/thegeeklab/docker-tidy/"
|
||||||
|
version = "0.0.0"
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
anyconfig = "*"
|
||||||
|
appdirs = "*"
|
||||||
|
certifi = "*"
|
||||||
|
chardet = "*"
|
||||||
|
colorama = "*"
|
||||||
|
dateparser = "*"
|
||||||
|
docker = "*"
|
||||||
|
docker-pycreds = "*"
|
||||||
|
environs = "*"
|
||||||
|
idna = "*"
|
||||||
|
importlib-metadata = {version = "*", markers = "python_version<'3.8'"}
|
||||||
|
ipaddress = "*"
|
||||||
|
jsonschema = "*"
|
||||||
|
nested-lookup = "*"
|
||||||
|
pathspec = "*"
|
||||||
|
python = "^3.5.0"
|
||||||
|
python-dateutil = "*"
|
||||||
|
python-json-logger = "*"
|
||||||
|
requests = "*"
|
||||||
|
"ruamel.yaml" = "*"
|
||||||
|
websocket-client = "*"
|
||||||
|
zipp = "<2.0.0"
|
||||||
|
|
||||||
|
[tool.poetry.dev-dependencies]
|
||||||
|
autopep8 = "*"
|
||||||
|
bandit = "*"
|
||||||
|
flake8 = "*"
|
||||||
|
flake8-blind-except = "*"
|
||||||
|
flake8-builtins = "*"
|
||||||
|
flake8-colors = "*"
|
||||||
|
flake8-docstrings = "<=3.0.0"
|
||||||
|
flake8-eradicate = {version = "*", markers = "python_version>='3.6'"}
|
||||||
|
flake8-isort = "*"
|
||||||
|
flake8-logging-format = "*"
|
||||||
|
flake8-pep3101 = "*"
|
||||||
|
flake8-polyfill = "*"
|
||||||
|
flake8-quotes = "*"
|
||||||
|
pathlib2 = "*"
|
||||||
|
pep8-naming = "*"
|
||||||
|
pipenv-setup = "*"
|
||||||
|
pydocstyle = "<4.0.0"
|
||||||
|
pytest = "*"
|
||||||
|
pytest-cov = "*"
|
||||||
|
pytest-mock = "*"
|
||||||
|
yapf = "*"
|
||||||
|
|
||||||
|
[tool.poetry.scripts]
|
||||||
|
docker-tidy = "dockertidy.Cli:main"
|
||||||
|
|
||||||
|
[tool.poetry-dynamic-versioning]
|
||||||
|
enable = true
|
||||||
|
style = "semver"
|
||||||
|
vcs = "git"
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
default_section = "THIRDPARTY"
|
||||||
|
force_single_line = true
|
||||||
|
known_first_party = "dockertidy"
|
||||||
|
line_length = 99
|
||||||
|
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
|
||||||
|
skip_glob = ["**/.env*", "**/env/*", "**/docs/*"]
|
||||||
|
|
||||||
|
[tool.pytest]
|
||||||
|
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 = dockertidy
|
|
||||||
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/*
|
|
103
setup.py
103
setup.py
@ -1,103 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
"""Setup script for the package."""
|
|
||||||
|
|
||||||
import io
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
|
|
||||||
from setuptools import find_packages
|
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
PACKAGE_NAME = "dockertidy"
|
|
||||||
|
|
||||||
|
|
||||||
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),
|
|
||||||
use_scm_version={
|
|
||||||
"version_scheme": "python-simplified-semver",
|
|
||||||
"local_scheme": "no-local-version",
|
|
||||||
"fallback_version": "unknown",
|
|
||||||
},
|
|
||||||
description="Keep docker hosts tidy",
|
|
||||||
keywords="docker gc prune garbage",
|
|
||||||
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 :: Apache Software License",
|
|
||||||
"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",
|
|
||||||
"Topic :: System :: Systems Administration",
|
|
||||||
"Topic :: Utilities",
|
|
||||||
"Topic :: Software Development",
|
|
||||||
],
|
|
||||||
install_requires=[
|
|
||||||
"anyconfig==0.9.11",
|
|
||||||
"appdirs==1.4.4",
|
|
||||||
"attrs==19.3.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
|
||||||
"certifi==2020.4.5.1",
|
|
||||||
"chardet==3.0.4",
|
|
||||||
"colorama==0.4.3",
|
|
||||||
"dateparser==0.7.4",
|
|
||||||
"docker==4.2.1",
|
|
||||||
"docker-pycreds==0.4.0",
|
|
||||||
"environs==8.0.0",
|
|
||||||
"idna==2.9",
|
|
||||||
"importlib-metadata==1.6.0; python_version < '3.8'",
|
|
||||||
"ipaddress==1.0.23",
|
|
||||||
"jsonschema==3.2.0",
|
|
||||||
"marshmallow==3.6.1; python_version >= '3.5'",
|
|
||||||
"nested-lookup==0.2.21",
|
|
||||||
"pathspec==0.8.0",
|
|
||||||
"pyrsistent==0.16.0",
|
|
||||||
"python-dateutil==2.8.1",
|
|
||||||
"python-dotenv==0.13.0",
|
|
||||||
"python-json-logger==0.1.11",
|
|
||||||
"pytz==2020.1",
|
|
||||||
"regex==2020.5.14",
|
|
||||||
"requests==2.23.0",
|
|
||||||
"ruamel.yaml==0.16.10",
|
|
||||||
"ruamel.yaml.clib==0.2.0; python_version < '3.9' and platform_python_implementation == 'CPython'",
|
|
||||||
"six==1.15.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
|
|
||||||
"tzlocal==2.1",
|
|
||||||
"urllib3==1.25.9; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'",
|
|
||||||
"websocket-client==0.57.0",
|
|
||||||
"zipp==1.2.0",
|
|
||||||
],
|
|
||||||
dependency_links=[],
|
|
||||||
setup_requires=["setuptools_scm"],
|
|
||||||
entry_points={"console_scripts": ["docker-tidy = dockertidy.__main__:main"]},
|
|
||||||
)
|
|
Loading…
Reference in New Issue
Block a user