Merge branch 'feature/version-upgrade-knutils-logging' into 'master'
Upgrade python version & change logger See merge request knecon/research/pyinfra!80
This commit is contained in:
commit
3a3a8e4ce1
@ -3,6 +3,9 @@ include:
|
|||||||
ref: 0.2.6
|
ref: 0.2.6
|
||||||
file: "/ci-templates/research/python_pkg_venv_test_build_release_gitlab-ci.yml"
|
file: "/ci-templates/research/python_pkg_venv_test_build_release_gitlab-ci.yml"
|
||||||
|
|
||||||
|
default:
|
||||||
|
image: python:3.10
|
||||||
|
|
||||||
run-tests:
|
run-tests:
|
||||||
script:
|
script:
|
||||||
- pytest .
|
- pytest .
|
||||||
|
|||||||
1221
poetry.lock
generated
1221
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
import sys
|
import sys
|
||||||
from loguru import logger
|
from kn_utils.logging import logger
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from pyinfra.queue.queue_manager import token_file_name
|
from pyinfra.queue.queue_manager import token_file_name
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from loguru import logger
|
from kn_utils.logging import logger
|
||||||
from dataclasses import asdict
|
from dataclasses import asdict
|
||||||
from typing import Callable, List
|
from typing import Callable, List
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import logging
|
|||||||
import pika
|
import pika
|
||||||
import pika.exceptions
|
import pika.exceptions
|
||||||
import signal
|
import signal
|
||||||
from loguru import logger
|
from kn_utils.logging import logger
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from pika.adapters.blocking_connection import BlockingChannel
|
from pika.adapters.blocking_connection import BlockingChannel
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from dataclasses import asdict
|
from dataclasses import asdict
|
||||||
from functools import partial, lru_cache
|
from functools import partial, lru_cache
|
||||||
from loguru import logger
|
from kn_utils.logging import logger
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
|
||||||
from pyinfra.config import Config
|
from pyinfra.config import Config
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
from azure.storage.blob import BlobServiceClient, ContainerClient
|
from azure.storage.blob import BlobServiceClient, ContainerClient
|
||||||
from itertools import repeat
|
from itertools import repeat
|
||||||
from loguru import logger
|
from kn_utils.logging import logger
|
||||||
from operator import attrgetter
|
from operator import attrgetter
|
||||||
from retry import retry
|
from retry import retry
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import io
|
import io
|
||||||
from itertools import repeat
|
from itertools import repeat
|
||||||
from loguru import logger
|
from kn_utils.logging import logger
|
||||||
from minio import Minio
|
from minio import Minio
|
||||||
from operator import attrgetter
|
from operator import attrgetter
|
||||||
from retry import retry
|
from retry import retry
|
||||||
|
|||||||
@ -1,36 +1,40 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "pyinfra"
|
name = "pyinfra"
|
||||||
version = "1.8.0"
|
version = "1.9.0"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Team Research <research@knecon.com>"]
|
authors = ["Team Research <research@knecon.com>"]
|
||||||
license = "All rights reseverd"
|
license = "All rights reseverd"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.8"
|
python = "^3.10"
|
||||||
pika = "^1.2.0"
|
# infra, deployment
|
||||||
retry = "^0.9.2"
|
pika = "^1.3"
|
||||||
minio = "^7.1.3"
|
retry = "^0.9"
|
||||||
azure-core = "^1.22.1"
|
minio = "^7.1"
|
||||||
azure-storage-blob = "^12.9.0"
|
prometheus-client = "^0.18"
|
||||||
funcy = "^1.17"
|
# azure
|
||||||
prometheus-client = "^0.16.0"
|
azure-core = "^1.29"
|
||||||
pycryptodome = "^3.17"
|
azure-storage-blob = "^12.13"
|
||||||
loguru = "^0.6.0"
|
# misc utils
|
||||||
|
funcy = "^2"
|
||||||
|
pycryptodome = "^3.19"
|
||||||
|
# research shared packages
|
||||||
|
kn-utils = { version = "^0.2.3", source = "gitlab-research" }
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
pytest = "^7.1.3"
|
pytest = "^7"
|
||||||
ipykernel = "^6.16.0"
|
ipykernel = "^6.26.0"
|
||||||
black = { version = "^23.1a1", allow-prereleases = true }
|
black = "^23.10"
|
||||||
pylint = "^2.15.10"
|
pylint = "^3"
|
||||||
coverage = "^7.2.0"
|
coverage = "^7.3"
|
||||||
requests = "^2.28.2"
|
requests = "^2.31"
|
||||||
testcontainers = "^3.7.1"
|
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
minversion = "6.0"
|
minversion = "6.0"
|
||||||
addopts = "-ra -q"
|
addopts = "-ra -q"
|
||||||
testpaths = ["tests", "integration"]
|
testpaths = ["tests", "integration"]
|
||||||
|
norecursedirs = "tests/tests_with_docker_compose"
|
||||||
log_cli = 1
|
log_cli = 1
|
||||||
log_cli_level = "DEBUG"
|
log_cli_level = "DEBUG"
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
[pytest]
|
|
||||||
norecursedirs = tests/tests_with_docker_compose
|
|
||||||
; storage tests and queue manager tests are disabled, since docker compose takes too long to start for regular tests.
|
|
||||||
; They should be run though once before a release.
|
|
||||||
; The queue manager tests are also disabled because they are not stable.
|
|
||||||
14
tests/unit_tests/test_knutils.py
Normal file
14
tests/unit_tests/test_knutils.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
def test_necessary_log_levels_are_supported_by_kn_utils():
|
||||||
|
from kn_utils.logging import logger
|
||||||
|
|
||||||
|
logger.setLevel("TRACE")
|
||||||
|
|
||||||
|
logger.trace("trace")
|
||||||
|
logger.debug("debug")
|
||||||
|
logger.info("info")
|
||||||
|
logger.warning("warning")
|
||||||
|
logger.critical("critical")
|
||||||
|
|
||||||
|
err = Exception("exception")
|
||||||
|
logger.exception(err)
|
||||||
|
logger.error(err)
|
||||||
Loading…
x
Reference in New Issue
Block a user