iqm-station-control-client 4.2.0__py3-none-any.whl → 6.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,7 +55,7 @@ from iqm.station_control.interface.models import (
55
55
  SweepDefinition,
56
56
  SweepResults,
57
57
  )
58
- from iqm.station_control.interface.models.jobs import JobData, JobResult
58
+ from iqm.station_control.interface.models.jobs import JobData, JobError, JobResult
59
59
  from iqm.station_control.interface.models.sweep import SweepBase
60
60
 
61
61
  logger = logging.getLogger(__name__)
@@ -169,7 +169,9 @@ class IqmServerClient(StationControlClient, metaclass=IqmServerClientMeta):
169
169
  parallel_sweep_progress=[],
170
170
  interrupted=False,
171
171
  ),
172
- job_error=job.error if job.HasField("error") else "",
172
+ job_error=JobError(full_error_log=job.error, user_error_message=job.error)
173
+ if job.HasField("error")
174
+ else None,
173
175
  position=job.queue_position if job.HasField("queue_position") else None,
174
176
  )
175
177
 
@@ -293,9 +295,9 @@ def payload_to_sweep(job_payload: bytes) -> SweepDefinition:
293
295
  def to_job_status(job_status: proto.JobStatus) -> JobStatus:
294
296
  match job_status:
295
297
  case proto.JobStatus.IN_QUEUE:
296
- return JobStatus.PENDING_EXECUTION
298
+ return JobStatus.EXECUTION_PENDING
297
299
  case proto.JobStatus.EXECUTING:
298
- return JobStatus.EXECUTION_START
300
+ return JobStatus.EXECUTION_STARTED
299
301
  case proto.JobStatus.FAILED:
300
302
  return JobStatus.FAILED
301
303
  case proto.JobStatus.COMPLETED:
@@ -699,7 +699,7 @@ class StationControlClient:
699
699
  max_seen_position = 0
700
700
  while True:
701
701
  job = self._poll_job(job_id)
702
- if job.job_status >= JobStatus.EXECUTION_START:
702
+ if job.job_status >= JobStatus.EXECUTION_STARTED:
703
703
  if max_seen_position:
704
704
  update_progress_callback([("Progress in queue", max_seen_position, max_seen_position)])
705
705
  return job.job_status
@@ -38,13 +38,20 @@ class JobResult(PydanticBase):
38
38
  interrupted: bool
39
39
 
40
40
 
41
+ class JobError(PydanticBase):
42
+ """Error log for a job."""
43
+
44
+ full_error_log: str
45
+ user_error_message: str
46
+
47
+
41
48
  class JobData(PydanticBase):
42
49
  """Job response data model"""
43
50
 
44
51
  job_id: UUID
45
52
  job_status: JobStatus
46
53
  job_result: JobResult
47
- job_error: str | None
54
+ job_error: JobError | None
48
55
  position: int | None
49
56
 
50
57
 
@@ -59,24 +66,29 @@ class JobStatus(Enum):
59
66
  RECEIVED = "received"
60
67
 
61
68
  # Validating the job
62
- VALIDATING = "validating"
63
- ACCEPTED = "accepted"
64
69
 
65
- PREPARING_CALIBRATION = "preparing_calibration"
70
+ VALIDATION_STARTED = "validation_started"
71
+ VALIDATION_ENDED = "validation_ended"
72
+
73
+ FETCH_CALIBRATION_STARTED = "fetch_calibration_started"
74
+ FETCH_CALIBRATION_ENDED = "fetch_calibration_ended"
66
75
 
67
76
  # Running PulLA
68
- PENDING_COMPILATION = "pending_compilation"
69
- COMPILING = "compiling"
70
- COMPILED = "compiled"
77
+ COMPILATION_STARTED = "compilation_started"
78
+ COMPILATION_ENDED = "compilation_ended"
71
79
 
72
80
  # Executing sweep
73
- STORING_SWEEP_METADATA = "storing_sweep_metadata"
74
- METADATA_STORED = "metadata_stored"
75
- PENDING_EXECUTION = "pending_execution"
76
- EXECUTION_START = "execution_start"
77
- EXECUTION_END = "execution_end"
78
- PENDING_POST_PROCESSING = "pending_post_processing"
79
- POST_PROCESSING = "post_processing"
81
+ SAVE_SWEEP_METADATA_STARTED = "save_sweep_metadata_started"
82
+ SAVE_SWEEP_METADATA_ENDED = "save_sweep_metadata_ended"
83
+ EXECUTION_PENDING = "execution_pending"
84
+ EXECUTION_STARTED = "execution_started"
85
+ EXECUTION_ENDED = "execution_ended"
86
+ EXECUTION_STAGE_COMPLETED = "execution_completed"
87
+
88
+ # Extracting artifacts from results
89
+ POST_PROCESSING_STARTED = "post_processing_started"
90
+ POST_PROCESSING_ENDED = "post_processing_ended"
91
+
80
92
  READY = "ready"
81
93
 
82
94
  # Job failed, can happen at any stage
@@ -105,7 +117,7 @@ class JobStatus(Enum):
105
117
  """Enable comparison according to definition order.
106
118
 
107
119
  Examples:
108
- >>> JobStatus.ACCEPTED < JobStatus.COMPILED
120
+ >>> JobStatus.VALIDATION_STARTED < JobStatus.COMPILATION_ENDED
109
121
  True
110
122
 
111
123
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-station-control-client
3
- Version: 4.2.0
3
+ Version: 6.0.0
4
4
  Summary: Python client for communicating with Station Control Service
5
5
  Author-email: IQM Finland Oy <info@meetiqm.com>
6
6
  License: Apache License
@@ -1,11 +1,11 @@
1
1
  iqm/station_control/client/__init__.py,sha256=BmBIBdZa10r-IWCFzZ1-0DG6GQKPIXqGXltfXop4ZeQ,942
2
2
  iqm/station_control/client/list_models.py,sha256=SjD0DbCrM9z1SSuGoQS83lyJmDLuMOatpJUoW8itW9s,2335
3
- iqm/station_control/client/station_control.py,sha256=F9snzBp0u4xsg0f5_FzXh-21aP4BXM0a_f79aMC0ACE,39601
3
+ iqm/station_control/client/station_control.py,sha256=Iedc-uJ-XOTyAM3K4w1iktTp0FK3yTSPZfA6NZNh2uk,39603
4
4
  iqm/station_control/client/utils.py,sha256=cpS3hXEeeIXeqd_vBnnwo3JHS83FrNpG07SiTUwUx-I,1650
5
5
  iqm/station_control/client/iqm_server/__init__.py,sha256=nLsRHN1rnOKXwuzaq_liUpAYV3sis5jkyHccSdacV7U,624
6
6
  iqm/station_control/client/iqm_server/error.py,sha256=ZLV2-gxFLHZjZVkI3L5sWcBMiay7NT-ijIEvrXgVJT8,1166
7
7
  iqm/station_control/client/iqm_server/grpc_utils.py,sha256=ee42C31_JIXlP6ikZQbohgUQjqCvcSSxIW_9lm9MMV8,5727
8
- iqm/station_control/client/iqm_server/iqm_server_client.py,sha256=ZSon3fHpgfAF8M3tymSu9LfVG-LAxDY_ddQhbrR4uAU,14612
8
+ iqm/station_control/client/iqm_server/iqm_server_client.py,sha256=a7eEw0cmuVwwCaHe3TPi9juwpgofoEGjlF7ATwndYKk,14713
9
9
  iqm/station_control/client/iqm_server/meta_class.py,sha256=pePJ0Xy0aiJg-bZWK8D87gblq6imfXLsZHjpZkf5D9s,1399
10
10
  iqm/station_control/client/iqm_server/proto/__init__.py,sha256=mOJQ_H-NEyJMffRaDSSZeXrScHaHaHEXULv-O_OJA3A,1345
11
11
  iqm/station_control/client/iqm_server/proto/calibration_pb2.py,sha256=gum0DGmqxhbfaar8SqahmSif1pB6hgo0pVcnoi3VMUo,3017
@@ -39,7 +39,7 @@ iqm/station_control/interface/list_with_meta.py,sha256=GAXIDEXKeua6-2FoQ_O1tkhx-
39
39
  iqm/station_control/interface/pydantic_base.py,sha256=MVzcsH7wG1DON-qTw6KLpUDay7_b_9CDQgymVzg9HwI,1303
40
40
  iqm/station_control/interface/models/__init__.py,sha256=JeXFg-ltPOoSY6qVclUKCVyt-7okNgCptLb3h3t3JD4,1587
41
41
  iqm/station_control/interface/models/dut.py,sha256=dd1SpcsBe4P057jvcPqv39SjzekewwP07hThFe5ulNA,1216
42
- iqm/station_control/interface/models/jobs.py,sha256=nQNyMauQu99LTUK38meVWXSMdX3D-Fgn8VsYDMTwYN8,3611
42
+ iqm/station_control/interface/models/jobs.py,sha256=D7u4ZW-d86G0GYHzXHVlI_kUEvVV_Ol40oYvZWu91pE,3984
43
43
  iqm/station_control/interface/models/monitor.py,sha256=9p-hg5DWrlbCIrJ0GyQ90DrHr1Yc9DCQyfpsQCm0cDE,1328
44
44
  iqm/station_control/interface/models/observation.py,sha256=Jce4lIsUtHRIFT3nr-cbKvh3dbR2Y_yM5x0yyvUdjF8,3261
45
45
  iqm/station_control/interface/models/observation_set.py,sha256=Ko2o3-9I38NfjNF2IQPcwfbwpkTQ3PIU7fUiSaDleX8,3031
@@ -47,8 +47,8 @@ iqm/station_control/interface/models/run.py,sha256=m-iE3QMPQUOF7bsw8JCAM1Bd6bDVh
47
47
  iqm/station_control/interface/models/sequence.py,sha256=uOqMwF1x-vW6UHs2WnPD3PsuSgV3a8OTAsgn_4UENLw,2723
48
48
  iqm/station_control/interface/models/sweep.py,sha256=ZV_1zcEF5_NY0nPgC75tU7s14TE1o0croBSClIVSmCE,2493
49
49
  iqm/station_control/interface/models/type_aliases.py,sha256=3LB9viZVi8osavY5kKF8TH1crayG7-MLjgBqXDCqL2s,1018
50
- iqm_station_control_client-4.2.0.dist-info/LICENSE.txt,sha256=R6Q7eUrLyoCQgWYorQ8WJmVmWKYU3dxA3jYUp0wwQAw,11332
51
- iqm_station_control_client-4.2.0.dist-info/METADATA,sha256=8ZkaMqyQU3no5urP6e7d2AkXoYRj2aiPb23vF_1oubA,14009
52
- iqm_station_control_client-4.2.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
53
- iqm_station_control_client-4.2.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
54
- iqm_station_control_client-4.2.0.dist-info/RECORD,,
50
+ iqm_station_control_client-6.0.0.dist-info/LICENSE.txt,sha256=R6Q7eUrLyoCQgWYorQ8WJmVmWKYU3dxA3jYUp0wwQAw,11332
51
+ iqm_station_control_client-6.0.0.dist-info/METADATA,sha256=yNHetZ300tB5Zv4ggHLq_3DJS8rXz1ghdHOpJsTM8RA,14009
52
+ iqm_station_control_client-6.0.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
53
+ iqm_station_control_client-6.0.0.dist-info/top_level.txt,sha256=NB4XRfyDS6_wG9gMsyX-9LTU7kWnTQxNvkbzIxGv3-c,4
54
+ iqm_station_control_client-6.0.0.dist-info/RECORD,,