mirror of
https://github.com/cmur2/kube-stale-resources.git
synced 2024-12-22 02:54:24 +01:00
module: adopt Poetry dependency manager
This commit is contained in:
parent
64b19885e9
commit
5851cd4e37
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -16,14 +16,8 @@ jobs:
|
|||||||
python-version: 3.8
|
python-version: 3.8
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
pip install poetry
|
||||||
pip install pipenv
|
poetry install
|
||||||
pipenv install --dev --deploy
|
|
||||||
- name: Formatting
|
|
||||||
run: |
|
|
||||||
# check that the source files are formatted correctly
|
|
||||||
pipenv run yapf -q *.py
|
|
||||||
- name: Linting
|
- name: Linting
|
||||||
run: |
|
run: |
|
||||||
pipenv run mypy *.py
|
make lint
|
||||||
pipenv run pylint *.py
|
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
.mypy_cache
|
.mypy_cache
|
||||||
|
poetry.lock
|
||||||
|
23
Makefile
Normal file
23
Makefile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
# https://tech.davis-hansson.com/p/make/
|
||||||
|
SHELL := bash
|
||||||
|
.ONESHELL:
|
||||||
|
.SILENT:
|
||||||
|
.SHELLFLAGS := -eux -o pipefail -c
|
||||||
|
.DELETE_ON_ERROR:
|
||||||
|
.DEFAULT_GOAL := all
|
||||||
|
MAKEFLAGS += --warn-undefined-variables
|
||||||
|
MAKEFLAGS += --no-builtin-rules
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: lint ## Run lint and test (default goal)
|
||||||
|
|
||||||
|
.PHONY: lint
|
||||||
|
lint: ## Lint all source code
|
||||||
|
poetry run yapf -q *.py
|
||||||
|
poetry run pylint *.py
|
||||||
|
poetry run mypy *.py
|
||||||
|
|
||||||
|
.PHONY: help
|
||||||
|
help: ## Print this help text
|
||||||
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
|
15
Pipfile
15
Pipfile
@ -1,15 +0,0 @@
|
|||||||
[[source]]
|
|
||||||
url = 'https://pypi.python.org/simple'
|
|
||||||
|
|
||||||
[requires]
|
|
||||||
python_version = '3.8'
|
|
||||||
|
|
||||||
[packages]
|
|
||||||
pyyaml = '*'
|
|
||||||
requests = '*'
|
|
||||||
|
|
||||||
[dev-packages]
|
|
||||||
rope = '==0.17.0'
|
|
||||||
pylint = '==2.5.3'
|
|
||||||
yapf = '==0.30.0'
|
|
||||||
mypy = '== 0.782'
|
|
22
pyproject.toml
Normal file
22
pyproject.toml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["poetry>=1.0"]
|
||||||
|
build-backend = "poetry.masonry.api"
|
||||||
|
|
||||||
|
[tool.poetry]
|
||||||
|
name = "kube-stale-resources"
|
||||||
|
version = "1.0.0"
|
||||||
|
description = "Utility augmenting 'kubectl diff' to detect stale resources in Kubernetes clusters between local YAML manifests (target state) and the cluster (live state)."
|
||||||
|
authors = ["Christian Nicolai"]
|
||||||
|
license = "Apache-2.0"
|
||||||
|
homepage = "https://dev.mycrobase.de/gitea/cn/kube-stale-resources"
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.8"
|
||||||
|
pyyaml = "5.3.1"
|
||||||
|
requests = "2.24.0"
|
||||||
|
|
||||||
|
[tool.poetry.dev-dependencies]
|
||||||
|
mypy = "0.782"
|
||||||
|
pylint = "2.5.3"
|
||||||
|
rope = "0.17.0"
|
||||||
|
yapf = "0.30.0"
|
Loading…
Reference in New Issue
Block a user