Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔥 Remove unused notifications code #84

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading