DAQ/COMMON: update imports of aaredb
This commit is contained in:
@@ -4,11 +4,11 @@ import json
|
||||
import os
|
||||
from typing import List, Optional
|
||||
|
||||
import aareDBclient
|
||||
import aareDB
|
||||
import cv2
|
||||
import numpy as np
|
||||
import requests
|
||||
from aareDBclient import (
|
||||
from aareDB import (
|
||||
SetTellPosition,
|
||||
SampleEventCreate,
|
||||
SampleEventType,
|
||||
@@ -44,16 +44,16 @@ class AareWrapper:
|
||||
bl: MXBeamline,
|
||||
host: str = "https://mx-db-01.psi.ch/dispatcher",
|
||||
):
|
||||
configuration = aareDBclient.Configuration(host=host)
|
||||
configuration = aareDB.Configuration(host=host)
|
||||
configuration.verify_ssl = False # Disable SSL verification
|
||||
|
||||
self.client = aareDBclient.ApiClient(configuration)
|
||||
self.client = aareDB.ApiClient(configuration)
|
||||
self.client.default_headers["X-Shared-Password"] = os.getenv("AAREDB_SHARED_PASSWORD")
|
||||
self.__host = host
|
||||
self.__tell_api = aareDBclient.TellsRunnerApi(self.client)
|
||||
self.__sample_api = aareDBclient.SamplesRunnerApi(self.client)
|
||||
self.__proc_api = aareDBclient.ProcessingsRunnerApi(self.client)
|
||||
self.__raster_api = aareDBclient.GridscanRunnerApi(self.client)
|
||||
self.__tell_api = aareDB.TellsRunnerApi(self.client)
|
||||
self.__sample_api = aareDB.SamplesRunnerApi(self.client)
|
||||
self.__proc_api = aareDB.ProcessingsRunnerApi(self.client)
|
||||
self.__raster_api = aareDB.GridscanRunnerApi(self.client)
|
||||
self.__bl = bl
|
||||
|
||||
def set_pucks_beamline(self, input_list: List[PuckLoadedInfo]):
|
||||
@@ -73,7 +73,7 @@ class AareWrapper:
|
||||
print(ret)
|
||||
|
||||
def create_manual_sample(self, s: SampleShortInfo):
|
||||
from aareDBclient.models import ManualSampleCreate
|
||||
from aareDB.models import ManualSampleCreate
|
||||
|
||||
manual_sample = ManualSampleCreate(
|
||||
pgroup=s.user,
|
||||
|
||||
@@ -15,9 +15,8 @@ from aare.common.models import (
|
||||
SampleDewarAddress,
|
||||
#PuckInfo,
|
||||
)
|
||||
from aareDBclient import (
|
||||
PuckWithTellPosition,
|
||||
)
|
||||
from aareDB import PuckWithTellPosition
|
||||
|
||||
from aare.common.beamline import MXBeamline # noqa: F401
|
||||
from aare.devices.pshell_client import PShellClient
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from PySide6.QtCore import Signal, Slot
|
||||
from PySide6.QtWidgets import QWidget, QGridLayout, QLabel, QPushButton, QCheckBox, QLineEdit
|
||||
from aareDBclient import DataCollectionParameters
|
||||
from aareDB import DataCollectionParameters
|
||||
|
||||
from aare.common.models import SampleShortInfo, DAQStatusModel
|
||||
from aare.gui.widgets.number_line_edit import NumberLineEdit
|
||||
|
||||
Reference in New Issue
Block a user