Skip to content

Commit

Permalink
Merge pull request #84 from open-zaak/feature/update-zgw-consumers
Browse files Browse the repository at this point in the history
🔥 Remove unused notifications code
  • Loading branch information
stevenbal authored Nov 14, 2024
2 parents fa3feb4 + ee889ea commit e3ad9d8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
python-version: ${{ matrix.python }}

- name: Bring up Alfresco
run: cd alfresco && docker-compose up -d
run: cd alfresco && docker compose up -d

- name: Install dependencies
run: pip install tox tox-gh-actions
Expand Down
33 changes: 1 addition & 32 deletions drc_cmis/client_builder.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
from typing import Type, Union

from django.conf import settings
from django.utils.module_loading import import_string

from vng_api_common.models import APICredential
from zds_client.client import Client
from typing import Union

from drc_cmis.browser.client import CMISDRCClient
from drc_cmis.models import CMISConfig
from drc_cmis.webservice.client import SOAPCMISClient

try:
from zgw_consumers.client import get_client_class
except (ImportError, RuntimeError):

def get_client_class() -> Type[Client]:
return Client


def get_cmis_client() -> Union[CMISDRCClient, SOAPCMISClient]:
"""Build the CMIS client with the binding specified in the configuration"""
Expand All @@ -25,21 +12,3 @@ def get_cmis_client() -> Union[CMISDRCClient, SOAPCMISClient]:
return SOAPCMISClient()
else:
return CMISDRCClient()


def get_zds_client(url: str):
"""
Retrieve a ZDS Client instance for the given API URL.
The client respects the setting ``CUSTOM_CLIENT_FETCHER`` as used by vng-api-common,
and will have the auth configured.
"""
Client = get_client_class()
default = Client.from_url(url)

if getattr(settings, "CUSTOM_CLIENT_FETCHER", None):
client = import_string(settings.CUSTOM_CLIENT_FETCHER)(default.base_url)
return client
else:
default.auth = APICredential.get_auth(url)
return default
31 changes: 0 additions & 31 deletions drc_cmis/notifications.py

This file was deleted.

0 comments on commit e3ad9d8

Please sign in to comment.