nexusLIMS.exporters.destinations.cdcs#

CDCS export destination plugin.

Exports NexusLIMS XML records to a CDCS (Configurable Data Curation System) instance using the CDCS REST API.

Module Contents#

Classes#

CDCSDestination

CDCS export destination plugin.

API#

class nexusLIMS.exporters.destinations.cdcs.CDCSDestination[source]#

CDCS export destination plugin.

Uploads NexusLIMS XML records to a CDCS instance and assigns them to the configured workspace.

Variables:
  • name (str) – Destination identifier: “cdcs”

  • priority (int) – Export priority: 100 (high priority, runs first)

name#

‘cdcs’

priority#

100

property enabled: bool#

Check if CDCS is configured and enabled.

Returns:

True if both NX_CDCS_TOKEN and NX_CDCS_URL are configured

Return type:

bool

validate_config() tuple[bool, str | None][source]#

Validate CDCS configuration.

Tests:

  • NX_CDCS_TOKEN is configured

  • NX_CDCS_URL is configured

  • Can authenticate to CDCS API

Returns:

(is_valid, error_message)

Return type:

tuple[bool, str | None]

export(context: ExportContext) ExportResult[source]#

Export record to CDCS.

Reads the XML file, uploads it to CDCS, and assigns it to the configured workspace. Never raises exceptions - all errors are caught and returned as ExportResult with success=False.

Parameters:

context – Export context with file path and session metadata

Returns:

Result of the export attempt

Return type:

ExportResult