preparation for release 0.1.0

This commit is contained in:
Jörn-Michael Miehe 2023-09-02 15:02:17 +00:00
parent 4205b04b05
commit a5b0cbe396
5 changed files with 29 additions and 34 deletions

2
.vscode/launch.json vendored
View file

@ -13,7 +13,7 @@
"METRIC__INTERVAL": "5",
"METRIC__LOG__ENABLED": "True",
"METRIC__DISK__PATHS": "[\"/var\", \"/\", \"/dev\"]",
"METRIC__EXTERNAL__EXECUTABLES": "[\"${workspaceFolder}/dummy-metric\"]",
"METRIC__EXTERNAL__EXECUTABLES": "[\"${workspaceFolder}/example/dummy-metric\"]",
},
"justMyCode": true
}

20
Dockerfile Normal file
View file

@ -0,0 +1,20 @@
FROM python:3.11-alpine
ENV \
PYTHONUNBUFFERED=1
COPY . /usr/src/app
RUN set -ex; \
# buildtime deps
apk add --no-cache \
--virtual .build-deps \
build-base \
gcc \
linux-headers \
;
RUN set -ex; \
pip3 --no-cache-dir install /usr/src/app
ENTRYPOINT ["kiwi-simple-metrics"]

View file

@ -1,8 +0,0 @@
#!/bin/sh
echo "Dummy"
echo "95"
echo "normal"
awk "BEGIN{srand(); r=rand(); print r * 100}"
exit 0

8
example/dummy-metric Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
echo "Dummy" # name
echo "95" # threshold
echo "normal" # inversion
awk "BEGIN{srand(); r=rand(); print r * 100}" # value
exit 0

View file

@ -1,25 +0,0 @@
from pydantic import BaseModel
class SubModel(BaseModel):
optional: int = 42
required: str
class Settings(BaseModel):
sub: SubModel = SubModel(required="foo")
sub2: SubModel = SubModel(required="bar")
def main() -> None:
settings = Settings.model_validate({
"sub": {"optional": "69"},
})
# settings = Settings()
print(settings.model_dump())
if __name__ == "__main__":
main()