diff --git a/docker-compose.yml b/docker-compose.yml index 5f139bd..52cc820 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -67,7 +67,7 @@ services: ports: - 127.0.0.1:8005:8000 # Unstructured API runs on port 8000 internally - # We expose it on 8002 externally to avoid conflict + # We expose it on 8005 externally to avoid conflict profiles: - unstructured @@ -324,26 +324,6 @@ services: profiles: - login-flow - # Smithery stateless deployment mode (ADR-016) - # Test with: docker compose --profile smithery up smithery - # Then: curl http://localhost:8081/.well-known/mcp-config - #smithery: - #build: - #context: . - #dockerfile: Dockerfile.smithery - #restart: always - #depends_on: - #app: - #condition: service_healthy - #ports: - #- 127.0.0.1:8081:8081 - #environment: - #- SMITHERY_DEPLOYMENT=true - #- ENABLE_SEMANTIC_SEARCH=false - #- PORT=8081 - #profiles: - #- smithery - qdrant: image: docker.io/qdrant/qdrant:v1.17.0@sha256:f1c7272cdac52b38c1a0e89313922d940ba50afd90d593a1605dbbc214e66ffb restart: always diff --git a/nextcloud_mcp_server/client/calendar.py b/nextcloud_mcp_server/client/calendar.py index 7a9c8c0..c72258e 100644 --- a/nextcloud_mcp_server/client/calendar.py +++ b/nextcloud_mcp_server/client/calendar.py @@ -51,7 +51,7 @@ class CalendarClient: url=f"{base_url}/remote.php/dav/", username=username, auth=auth, - ssl_verify_cert=get_nextcloud_ssl_verify(), # type: ignore[arg-type] # caldav types say bool|str but passes through to httpx which accepts SSLContext + ssl_verify_cert=get_nextcloud_ssl_verify(), # type: ignore[arg-type] # caldav types say bool|str but passes through to niquests which accepts SSLContext ) self._calendar_home_url = f"{base_url}/remote.php/dav/calendars/{username}/" diff --git a/tests/client/calendar/test_field_preservation.py b/tests/client/calendar/test_field_preservation.py index fe684be..4102208 100644 --- a/tests/client/calendar/test_field_preservation.py +++ b/tests/client/calendar/test_field_preservation.py @@ -4,13 +4,14 @@ This test module demonstrates data loss issues when non-supported fields are present in calendar events and contacts during round-trip operations. """ -import inspect import logging import uuid from datetime import datetime, timedelta import pytest +from nextcloud_mcp_server.client.calendar import _maybe_await + logger = logging.getLogger(__name__) @@ -36,9 +37,7 @@ async def test_calendar_event_custom_fields_preservation(nc_client): # Get the calendar object from the caldav library calendar = nc_client.calendar._get_calendar(calendar_name) event = await nc_client.calendar._async_object_by_uid(calendar, event_uid) - result = event.load() - if inspect.isawaitable(result): - await result + await _maybe_await(event.load()) # Now manually inject custom iCal properties into the raw data # This simulates what would happen if the event was created by another CalDAV client @@ -310,9 +309,7 @@ async def test_calendar_event_roundtrip_data_loss_demonstration(nc_client): # Get the calendar object and event calendar = nc_client.calendar._get_calendar(calendar_name) event = await nc_client.calendar._async_object_by_uid(calendar, event_uid) - result = event.load() - if inspect.isawaitable(result): - await result + await _maybe_await(event.load()) # Inject additional iCal properties that are valid but not supported by our parser extended_ical = f"""BEGIN:VCALENDAR