update dependencies

This commit is contained in:
Henning Jacobs
2023-02-09 22:04:18 +01:00
parent 6876dbe0e0
commit 5f139bbac0
8 changed files with 741 additions and 784 deletions

1
.gitignore vendored
View File

@@ -14,3 +14,4 @@ scm-source.json
.coverage
.pytest_cache/
.mypy_cache
.python-version

View File

@@ -17,17 +17,17 @@ repos:
# formatters
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.1.0
rev: v3.9.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/ambv/black
rev: 22.3.0
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
rev: v3.3.1
hooks:
- id: pyupgrade
stages: [push]
@@ -42,7 +42,7 @@ repos:
stages: [push]
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
rev: 6.3.0
hooks:
- id: pydocstyle
args: ["--ignore=D10,D21,D202"]
@@ -68,19 +68,19 @@ repos:
stages: [push]
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
rev: v1.29.0
hooks:
- id: yamllint
args: ["--strict", "-d", "{rules: {line-length: {max: 180}}}"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.950
rev: v1.0.0
hooks:
- id: mypy
additional_dependencies: ["types-requests", "types-PyYAML", "types-redis"]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
@@ -93,7 +93,7 @@ repos:
# miscellaneous
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-docstring-first
@@ -108,7 +108,7 @@ repos:
args: ["--django"]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
rev: v1.10.0
hooks:
# - id: rst-backticks
- id: python-use-type-annotations
@@ -121,6 +121,6 @@ repos:
# http://jorisroovers.com/gitlint/#using-gitlint-through-pre-commit
- repo: https://github.com/jorisroovers/gitlint
rev: v0.17.0
rev: v0.19.0dev
hooks:
- id: gitlint

View File

@@ -2,9 +2,12 @@ FROM python:3.10-slim
WORKDIR /
RUN apt-get update && apt-get install --yes --no-install-recommends gcc && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install --yes --no-install-recommends curl gcc libc-dev libffi-dev && rm -rf /var/lib/apt/lists/*
RUN pip3 install poetry
# https://github.com/rust-lang/cargo/issues/8719#issuecomment-1253575253
#ENV PATH=/root/.cargo/bin:$PATH
#RUN --mount=type=tmpfs,target=/root/.cargo curl https://sh.rustup.rs -sSf | bash -s -- -y && pip install poetry
COPY poetry.lock /
COPY pyproject.toml /

View File

@@ -19,7 +19,7 @@ lint: install
poetry run pre-commit run --all-files
test: lint install
poetry run coverage run --source=kube_ops_view -m py.test -v
poetry run coverage run --source=kube_ops_view -m pytest -v
poetry run coverage report
version:
@@ -37,6 +37,7 @@ docker-arm: appjs
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --name arm-node --append --use --platform "linux/arm"
docker buildx build --build-arg "VERSION=$(VERSION)" --platform "linux/arm" -t $(IMAGE):$(TAG) --load .
docker buildx rm arm-node
@echo 'Docker image $(IMAGE):$(TAG) can now be used.'
push: docker

327
app/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,12 +6,10 @@ def expo(n: int, base=2, factor=1, max_value=None):
Adapted from https://github.com/litl/backoff/blob/master/backoff.py (MIT License)
Args:
----
n: The exponent.
base: The mathematical base of the exponentiation operation
factor: Factor to multiply the exponentation by.
max_value: The maximum value to yield. Once the value in the
:param int n: The exponent.
:param int base: The mathematical base of the exponentiation operation
:param int factor: Factor to multiply the exponentation by.
:param int max_value: The maximum value to yield. Once the value in the
true exponential sequence exceeds this, the value
of max_value will forever after be yielded.
@@ -31,10 +29,8 @@ def random_jitter(value, jitter=1):
This adds up to 1 second of additional time to the original value.
Prior to backoff version 1.2 this was the default jitter behavior.
Args:
----
value: The unadulterated backoff value.
jitter: Jitter amount.
:param float value: The unadulterated backoff value.
:param float jitter: Jitter amount.
"""
return value + random.uniform(0, jitter)
@@ -49,9 +45,7 @@ def full_jitter(value):
AWS blog's post on the performance of various jitter algorithms.
(http://www.awsarchitectureblog.com/2015/03/backoff.html)
Args:
----
value: The unadulterated backoff value.
:param float value: The unadulterated backoff value.
"""
return random.uniform(0, value)

View File

@@ -18,7 +18,6 @@ session = requests.Session()
# https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/resource-metrics-api.md
class NodeMetrics(APIObject):
version = "metrics.k8s.io/v1beta1"
endpoint = "nodes"
kind = "NodeMetrics"
@@ -26,7 +25,6 @@ class NodeMetrics(APIObject):
# https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/resource-metrics-api.md
class PodMetrics(NamespacedAPIObject):
version = "metrics.k8s.io/v1beta1"
endpoint = "pods"
kind = "PodMetrics"

1145
poetry.lock generated

File diff suppressed because it is too large Load Diff