fix: address PR #632 review comments
- Update stale httpx reference to niquests in calendar.py type comment - Replace inline inspect.isawaitable with _maybe_await helper in tests - Fix incorrect port number in docker-compose unstructured comment - Remove commented-out smithery service block (dead code) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
d9b010ab26
commit
945b01cbf5
+1
-21
@@ -67,7 +67,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:8005:8000
|
- 127.0.0.1:8005:8000
|
||||||
# Unstructured API runs on port 8000 internally
|
# 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:
|
profiles:
|
||||||
- unstructured
|
- unstructured
|
||||||
|
|
||||||
@@ -324,26 +324,6 @@ services:
|
|||||||
profiles:
|
profiles:
|
||||||
- login-flow
|
- 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:
|
qdrant:
|
||||||
image: docker.io/qdrant/qdrant:v1.17.0@sha256:f1c7272cdac52b38c1a0e89313922d940ba50afd90d593a1605dbbc214e66ffb
|
image: docker.io/qdrant/qdrant:v1.17.0@sha256:f1c7272cdac52b38c1a0e89313922d940ba50afd90d593a1605dbbc214e66ffb
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class CalendarClient:
|
|||||||
url=f"{base_url}/remote.php/dav/",
|
url=f"{base_url}/remote.php/dav/",
|
||||||
username=username,
|
username=username,
|
||||||
auth=auth,
|
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}/"
|
self._calendar_home_url = f"{base_url}/remote.php/dav/calendars/{username}/"
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
are present in calendar events and contacts during round-trip operations.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import inspect
|
|
||||||
import logging
|
import logging
|
||||||
import uuid
|
import uuid
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from nextcloud_mcp_server.client.calendar import _maybe_await
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
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
|
# Get the calendar object from the caldav library
|
||||||
calendar = nc_client.calendar._get_calendar(calendar_name)
|
calendar = nc_client.calendar._get_calendar(calendar_name)
|
||||||
event = await nc_client.calendar._async_object_by_uid(calendar, event_uid)
|
event = await nc_client.calendar._async_object_by_uid(calendar, event_uid)
|
||||||
result = event.load()
|
await _maybe_await(event.load())
|
||||||
if inspect.isawaitable(result):
|
|
||||||
await result
|
|
||||||
|
|
||||||
# Now manually inject custom iCal properties into the raw data
|
# Now manually inject custom iCal properties into the raw data
|
||||||
# This simulates what would happen if the event was created by another CalDAV client
|
# 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
|
# Get the calendar object and event
|
||||||
calendar = nc_client.calendar._get_calendar(calendar_name)
|
calendar = nc_client.calendar._get_calendar(calendar_name)
|
||||||
event = await nc_client.calendar._async_object_by_uid(calendar, event_uid)
|
event = await nc_client.calendar._async_object_by_uid(calendar, event_uid)
|
||||||
result = event.load()
|
await _maybe_await(event.load())
|
||||||
if inspect.isawaitable(result):
|
|
||||||
await result
|
|
||||||
|
|
||||||
# Inject additional iCal properties that are valid but not supported by our parser
|
# Inject additional iCal properties that are valid but not supported by our parser
|
||||||
extended_ical = f"""BEGIN:VCALENDAR
|
extended_ical = f"""BEGIN:VCALENDAR
|
||||||
|
|||||||
Reference in New Issue
Block a user