Skip to content

Commit

Permalink
Merge pull request #144 from walkIT-nl/dependency-updates
Browse files Browse the repository at this point in the history
Upgrade all dev dependencies to fix dependabot alerts
  • Loading branch information
walcovanloon authored Jan 9, 2024
2 parents 81d5dcd + 877d7a9 commit 7785b39
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 87 deletions.
15 changes: 9 additions & 6 deletions orthanc_ext/scripts/kafka_event_publisher.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from dataclasses import dataclass

from aiokafka import AIOKafkaProducer
from kafka.admin import KafkaAdminClient, NewTopic
from aiokafka.admin import AIOKafkaAdminClient, NewTopic

from orthanc_ext.scripts.event_publisher import convert_change_event_to_message

Expand All @@ -24,8 +24,11 @@ async def publish_to_kafka(kafka_config: KafkaConfig, evt, _):
await producer.stop()


def create_stream(kafka_config: KafkaConfig, *_):
admin_client = KafkaAdminClient(bootstrap_servers=kafka_config.bootstrap_server)
admin_client.create_topics(
new_topics=[NewTopic(name=kafka_config.topic, num_partitions=1, replication_factor=1)],
validate_only=False)
async def create_stream(kafka_config: KafkaConfig, *_):
async with AIOKafkaAdminClient(bootstrap_servers=kafka_config.bootstrap_server,
request_timeout_ms=10000) as admin_client:
await admin_client.start()

await admin_client.create_topics(
new_topics=[NewTopic(name=kafka_config.topic, num_partitions=1, replication_factor=1)],
validate_only=False)
160 changes: 80 additions & 80 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,91 +1,88 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile requirements_dev.in
#
alabaster==0.7.13
alabaster==0.7.15
# via sphinx
anyio==3.7.0
# via httpcore
babel==2.12.1
anyio==4.2.0
# via httpx
babel==2.14.0
# via sphinx
bleach==6.0.0
# via readme-renderer
bump2version==1.0.1
# via -r requirements_dev.in
cachetools==5.3.1
cachetools==5.3.2
# via tox
certifi==2023.7.22
certifi==2023.11.17
# via
# httpcore
# httpx
# requests
cffi==1.16.0
# via cryptography
cfgv==3.3.1
cfgv==3.4.0
# via pre-commit
chardet==5.1.0
chardet==5.2.0
# via tox
charset-normalizer==3.1.0
charset-normalizer==3.3.2
# via requests
colorama==0.4.6
# via tox
coverage[toml]==7.2.7
coverage[toml]==7.4.0
# via
# -r requirements_dev.in
# pytest-cov
cryptography==41.0.4
# via secretstorage
distlib==0.3.6
distlib==0.3.8
# via virtualenv
docker==6.1.3
docker==7.0.0
# via dockercontext
dockercontext==0.1
# via -r requirements_dev.in
docutils==0.20.1
# via
# readme-renderer
# sphinx
filelock==3.12.2
exceptiongroup==1.2.0
# via
# anyio
# pytest
filelock==3.13.1
# via
# tox
# virtualenv
flake8==6.0.0
flake8==7.0.0
# via -r requirements_dev.in
h11==0.14.0
# via httpcore
httpcore==0.17.2
httpcore==1.0.2
# via httpx
httpx==0.24.1
httpx==0.26.0
# via
# -r requirements_dev.in
# respx
identify==2.5.24
identify==2.5.33
# via pre-commit
idna==3.4
idna==3.6
# via
# anyio
# httpx
# requests
imagesize==1.4.1
# via sphinx
importlib-metadata==6.7.0
importlib-metadata==7.0.1
# via
# keyring
# sphinx
# twine
# yapf
iniconfig==2.0.0
# via pytest
jaraco-classes==3.2.3
jaraco-classes==3.3.0
# via keyring
jeepney==0.8.0
# via
# keyring
# secretstorage
jinja2==3.1.2
# via sphinx
keyring==24.0.0
# via
# pytest-html
# sphinx
keyring==24.3.0
# via twine
markdown-it-py==3.0.0
# via rich
Expand All @@ -95,15 +92,17 @@ mccabe==0.7.0
# via flake8
mdurl==0.1.2
# via markdown-it-py
more-itertools==9.1.0
more-itertools==10.2.0
# via jaraco-classes
mypy==1.3.0
mypy==1.8.0
# via -r requirements_dev.in
mypy-extensions==1.0.0
# via mypy
nh3==0.2.15
# via readme-renderer
nodeenv==1.8.0
# via pre-commit
packaging==23.1
packaging==23.2
# via
# docker
# pyproject-api
Expand All @@ -112,50 +111,46 @@ packaging==23.1
# tox
pkginfo==1.9.6
# via twine
platformdirs==3.6.0
platformdirs==4.1.0
# via
# tox
# virtualenv
# yapf
pluggy==1.0.0
pluggy==1.3.0
# via
# pytest
# tox
pre-commit==3.3.3
pre-commit==3.6.0
# via -r requirements_dev.in
py==1.11.0
# via pytest-html
pycodestyle==2.10.0
pycodestyle==2.11.1
# via flake8
pycparser==2.21
# via cffi
pyflakes==3.0.1
pyflakes==3.2.0
# via flake8
pygments==2.15.1
pygments==2.17.2
# via
# readme-renderer
# rich
# sphinx
pyproject-api==1.5.2
pyproject-api==1.6.1
# via tox
pytest==7.3.2
pytest==7.4.4
# via
# -r requirements_dev.in
# pytest-asyncio
# pytest-cov
# pytest-html
# pytest-metadata
pytest-asyncio==0.21.0
pytest-asyncio==0.23.3
# via -r requirements_dev.in
pytest-cov==4.1.0
# via -r requirements_dev.in
pytest-html==3.2.0
pytest-html==4.1.1
# via -r requirements_dev.in
pytest-metadata==3.0.0
# via pytest-html
pyyaml==6.0
pyyaml==6.0.1
# via pre-commit
readme-renderer==40.0
readme-renderer==42.0
# via twine
requests==2.31.0
# via
Expand All @@ -165,65 +160,70 @@ requests==2.31.0
# twine
requests-toolbelt==1.0.0
# via twine
respx==0.20.1
respx==0.20.2
# via -r requirements_dev.in
rfc3986==2.0.0
# via twine
rich==13.4.2
rich==13.7.0
# via twine
secretstorage==3.3.3
# via keyring
six==1.16.0
# via bleach
sniffio==1.3.0
# via
# anyio
# httpcore
# httpx
snowballstemmer==2.2.0
# via sphinx
sphinx==7.0.1
# via -r requirements_dev.in
sphinxcontrib-applehelp==1.0.4
sphinx==7.2.6
# via
# -r requirements_dev.in
# sphinxcontrib-applehelp
# sphinxcontrib-devhelp
# sphinxcontrib-htmlhelp
# sphinxcontrib-qthelp
# sphinxcontrib-serializinghtml
sphinxcontrib-applehelp==1.0.7
# via sphinx
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-devhelp==1.0.5
# via sphinx
sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-htmlhelp==2.0.4
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-qthelp==1.0.6
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
sphinxcontrib-serializinghtml==1.1.9
# via sphinx
tomli==2.0.1
# via yapf
tox==4.6.2
# via
# coverage
# mypy
# pyproject-api
# pytest
# tox
# yapf
tox==4.11.4
# via -r requirements_dev.in
twine==4.0.2
# via -r requirements_dev.in
typing-extensions==4.6.3
# via mypy
urllib3==2.0.6
typing-extensions==4.9.0
# via
# anyio
# mypy
urllib3==2.1.0
# via
# docker
# requests
# twine
virtualenv==20.23.1
virtualenv==20.25.0
# via
# pre-commit
# tox
watchdog==3.0.0
# via -r requirements_dev.in
webencodings==0.5.1
# via bleach
websocket-client==1.6.0
# via docker
wheel==0.40.0
wheel==0.42.0
# via -r requirements_dev.in
yapf==0.40.0
yapf==0.40.2
# via -r requirements_dev.in
zipp==3.15.0
zipp==3.17.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_orthanc_api_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_resource_type_list_should_be_complete():

def get_type_enum_values(type_under_test):
resp = httpx.get(
f'https://hg.orthanc-server.com/orthanc-python/raw-file/'
f'https://orthanc.uclouvain.be/hg/orthanc-python/raw-file/'
f'tip/Sources/Autogenerated/sdk_{type_under_test}.impl.h')
resp.raise_for_status()
return re.findall(f'sdk_{type_under_test}_Type.tp_dict, "([A-Z_]+)"', resp.text)

0 comments on commit 7785b39

Please sign in to comment.