nexusLIMS.exporters.destinations.labarchives#
LabArchives export destination plugin.
Exports NexusLIMS XML records to a LabArchives electronic lab notebook by creating a page per session with an HTML summary entry and the full XML record attached as a file.
Module Contents#
Classes#
LabArchives export destination plugin. |
API#
- class nexusLIMS.exporters.destinations.labarchives.LabArchivesDestination[source]#
LabArchives export destination plugin.
Uploads NexusLIMS XML records to a LabArchives instance. For each session, creates a page under
NexusLIMS Records/{instrument}/in the configured notebook (or the user’s Inbox if no notebook is configured) with:An HTML-formatted session summary as a text entry
The full XML record attached as a file
- Variables:
- name#
‘labarchives’
- priority#
90
- property enabled: bool#
Check if LabArchives is configured and enabled.
- Returns:
True if
NX_LABARCHIVES_ACCESS_KEY_ID,NX_LABARCHIVES_ACCESS_PASSWORD,NX_LABARCHIVES_USER_ID, andNX_LABARCHIVES_URLare all configured.- Return type:
- validate_config() tuple[bool, str | None][source]#
Validate LabArchives configuration.
Checks that required fields are present and tests authentication by making a lightweight API call.
- export(context: ExportContext) ExportResult[source]#
Export record to LabArchives.
Creates a notebook page with an HTML summary entry and attaches the XML record file. Never raises exceptions — all errors are caught and returned as
ExportResultwithsuccess=False.- Parameters:
context (ExportContext) – Export context with file path, session metadata, and results from higher-priority destinations (e.g., CDCS).
- Returns:
Result of the export attempt.
- Return type: