retab 0.1.8 → 0.1.10
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.
- checksums.yaml +4 -4
- data/lib/retab/base_client.rb +1 -5
- data/lib/retab/classifications/file_ref.rb +1 -22
- data/lib/retab/classifications.rb +1 -1
- data/lib/retab/edit_templates.rb +1 -1
- data/lib/retab/edits.rb +1 -1
- data/lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb +3 -3
- data/lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb +3 -3
- data/lib/retab/experiment_run_metrics/metrics_stale_error_last_run.rb +3 -3
- data/lib/retab/experiment_run_results/error_workflow_experiment_result.rb +1 -22
- data/lib/retab/experiment_run_results/pending_workflow_experiment_result.rb +1 -1
- data/lib/retab/experiment_run_results/queued_workflow_experiment_result.rb +1 -1
- data/lib/retab/experiment_run_results/running_workflow_experiment_result.rb +1 -1
- data/lib/retab/experiment_runs/create_experiment_run_request.rb +5 -2
- data/lib/retab/experiment_runs/error_workflow_experiment_run.rb +1 -1
- data/lib/retab/experiment_runs/experiment_run.rb +3 -3
- data/lib/retab/experiment_runs/pending_workflow_experiment_run.rb +1 -1
- data/lib/retab/experiment_runs/queued_workflow_experiment_run.rb +1 -1
- data/lib/retab/experiment_runs/running_workflow_experiment_run.rb +1 -1
- data/lib/retab/experiment_runs.rb +4 -1
- data/lib/retab/extractions/extraction.rb +0 -3
- data/lib/retab/extractions/extraction_request.rb +0 -3
- data/lib/retab/extractions.rb +53 -4
- data/lib/retab/files/create_file_blueprint_request.rb +3 -3
- data/lib/retab/files/file_blueprint.rb +5 -5
- data/lib/retab/files.rb +3 -3
- data/lib/retab/mime.rb +77 -6
- data/lib/retab/parses/parse.rb +0 -3
- data/lib/retab/parses/parse_request.rb +0 -3
- data/lib/retab/parses.rb +1 -4
- data/lib/retab/partitions.rb +1 -1
- data/lib/retab/schemas/generate_schema_request.rb +0 -3
- data/lib/retab/schemas.rb +1 -4
- data/lib/retab/splits.rb +1 -1
- data/lib/retab/types/{workflow_test_run_results_order.rb → eval_run_freshness_reasons.rb} +1 -1
- data/lib/retab/types/eval_run_freshness_status.rb +9 -0
- data/lib/retab/types/eval_run_trigger_type.rb +18 -0
- data/lib/retab/types/{latest_block_test_run_summary_outcome.rb → latest_block_eval_run_summary_outcome.rb} +1 -1
- data/lib/retab/types/{latest_block_test_run_summary_status.rb → latest_block_eval_run_summary_status.rb} +1 -1
- data/lib/retab/types/trigger_info_type.rb +1 -10
- data/lib/retab/types/{workflow_test_runs_order.rb → workflow_eval_result_verdict.rb} +1 -1
- data/lib/retab/types/workflow_eval_run_results_order.rb +9 -0
- data/lib/retab/types/{workflow_test_result_verdict.rb → workflow_eval_runs_order.rb} +1 -1
- data/lib/retab/types/workflow_eval_schema_drift.rb +9 -0
- data/lib/retab/types/{workflow_tests_order.rb → workflow_evals_order.rb} +1 -1
- data/lib/retab/types/workflow_experiment_freshness_state.rb +9 -0
- data/lib/retab/types/workflow_experiment_run_plan_mode.rb +15 -0
- data/lib/retab/types/workflow_experiments_exclude_status.rb +1 -1
- data/lib/retab/types/workflow_experiments_status.rb +1 -1
- data/lib/retab/version.rb +1 -1
- data/lib/retab/workflow_artifacts/extraction_workflow_artifact.rb +0 -3
- data/lib/retab/workflow_artifacts/parse_workflow_artifact.rb +0 -3
- data/lib/retab/workflow_artifacts/workflow_artifact.rb +5 -2
- data/lib/retab/{workflow_experiments/file_handle_input.rb → workflow_block_executions/block_exec_file_handle_input.rb} +6 -6
- data/lib/retab/workflow_block_executions/block_exec_file_ref.rb +28 -0
- data/lib/retab/{workflow_experiments/json_handle_input.rb → workflow_block_executions/block_exec_json_handle_input.rb} +6 -6
- data/lib/retab/workflow_block_executions/cancelled_block_execution_lifecycle.rb +25 -0
- data/lib/retab/workflow_block_executions/pending_block_execution_lifecycle.rb +20 -0
- data/lib/retab/workflow_block_executions/queued_block_execution_lifecycle.rb +20 -0
- data/lib/retab/workflow_block_executions/running_block_execution_lifecycle.rb +20 -0
- data/lib/retab/workflow_block_executions/stored_block_execution.rb +29 -0
- data/lib/retab/workflow_edges.rb +6 -0
- data/lib/retab/{workflow_test_run_results/cancelled_workflow_test_run.rb → workflow_eval_run_results/cancelled_workflow_eval_run.rb} +1 -1
- data/lib/retab/{workflow_test_run_results/completed_workflow_test_run.rb → workflow_eval_run_results/completed_workflow_eval_run.rb} +1 -1
- data/lib/retab/workflow_eval_run_results/error_workflow_eval_run.rb +28 -0
- data/lib/retab/{workflow_test_run_results/queued_workflow_test_run.rb → workflow_eval_run_results/file_handle_input.rb} +1 -1
- data/lib/retab/{workflow_test_run_results/workflow_test_run_timing.rb → workflow_eval_run_results/json_handle_input.rb} +1 -1
- data/lib/retab/workflow_eval_run_results/pending_workflow_eval_run.rb +7 -0
- data/lib/retab/{workflow_test_run_results/error_workflow_test_run.rb → workflow_eval_run_results/queued_workflow_eval_run.rb} +1 -1
- data/lib/retab/{workflow_test_run_results/pending_workflow_test_run.rb → workflow_eval_run_results/result_file_ref.rb} +1 -1
- data/lib/retab/workflow_eval_run_results/running_workflow_eval_run.rb +7 -0
- data/lib/retab/{workflow_test_run_results/workflow_test_result.rb → workflow_eval_run_results/workflow_eval_result.rb} +32 -41
- data/lib/retab/workflow_eval_run_results/workflow_eval_run_timing.rb +7 -0
- data/lib/retab/{workflow_test_run_results.rb → workflow_eval_run_results.rb} +10 -10
- data/lib/retab/{workflow_test_runs/block_test_batch_execution_counts.rb → workflow_eval_runs/block_eval_batch_execution_counts.rb} +3 -3
- data/lib/retab/{workflow_test_runs/block_test_lifecycle_counts.rb → workflow_eval_runs/block_eval_lifecycle_counts.rb} +1 -1
- data/lib/retab/{workflow_test_runs/block_test_outcome_counts.rb → workflow_eval_runs/block_eval_outcome_counts.rb} +1 -1
- data/lib/retab/{workflow_test_runs/create_workflow_test_run_request.rb → workflow_eval_runs/create_workflow_eval_run_request.rb} +4 -4
- data/lib/retab/{workflow_tests/workflow_test_block_target.rb → workflow_eval_runs/eval_run_block_target.rb} +1 -1
- data/lib/retab/workflow_eval_runs/eval_run_freshness.rb +34 -0
- data/lib/retab/{workflow_test_runs/workflow_test_run_workflow_scope.rb → workflow_eval_runs/eval_run_trigger.rb} +1 -1
- data/lib/retab/{workflow_test_runs/workflow_test_run.rb → workflow_eval_runs/workflow_eval_run.rb} +18 -18
- data/lib/retab/{workflow_test_runs/workflow_test_run_block_scope.rb → workflow_eval_runs/workflow_eval_run_block_scope.rb} +1 -1
- data/lib/retab/{workflow_test_runs/workflow_test_run_single_scope.rb → workflow_eval_runs/workflow_eval_run_single_scope.rb} +4 -4
- data/lib/retab/workflow_eval_runs/workflow_eval_run_workflow_scope.rb +20 -0
- data/lib/retab/{workflow_test_runs.rb → workflow_eval_runs.rb} +24 -24
- data/lib/retab/{workflow_tests/create_workflow_test_request.rb → workflow_evals/create_workflow_eval_request.rb} +4 -4
- data/lib/retab/workflow_evals/eval_file_handle_input.rb +7 -0
- data/lib/retab/workflow_evals/eval_json_handle_input.rb +7 -0
- data/lib/retab/{workflow_test_run_results/running_workflow_test_run.rb → workflow_evals/eval_public_file_ref.rb} +1 -1
- data/lib/retab/{workflow_tests/latest_block_test_run_summary.rb → workflow_evals/latest_block_eval_run_summary.rb} +4 -4
- data/lib/retab/{workflow_tests/manual_workflow_test_source.rb → workflow_evals/manual_workflow_eval_source.rb} +1 -1
- data/lib/retab/{workflow_tests/run_step_workflow_test_source.rb → workflow_evals/run_step_workflow_eval_source.rb} +1 -1
- data/lib/retab/{workflow_tests/update_workflow_test_request.rb → workflow_evals/update_workflow_eval_request.rb} +3 -3
- data/lib/retab/{workflow_tests/workflow_test.rb → workflow_evals/workflow_eval.rb} +7 -7
- data/lib/retab/workflow_evals/workflow_eval_block_target.rb +7 -0
- data/lib/retab/{workflow_tests.rb → workflow_evals.rb} +31 -31
- data/lib/retab/workflow_experiments/workflow_experiment.rb +12 -0
- data/lib/retab/workflow_runs/pending_run.rb +1 -14
- data/lib/retab/workflow_runs/running_run.rb +1 -14
- data/lib/retab/workflow_runs.rb +1 -1
- data/lib/retab/workflow_steps/pending_step_lifecycle.rb +1 -1
- data/lib/retab/workflow_steps/queued_step_lifecycle.rb +1 -14
- data/lib/retab/workflow_steps/running_step_lifecycle.rb +1 -1
- data/lib/retab/workflows.rb +2 -2
- data/lib/retab.rb +3 -3
- data/rbi/retab/{block_test_batch_execution_counts.rbi → block_eval_batch_execution_counts.rbi} +5 -5
- data/rbi/retab/{block_test_lifecycle_counts.rbi → block_eval_lifecycle_counts.rbi} +1 -1
- data/rbi/retab/{block_test_outcome_counts.rbi → block_eval_outcome_counts.rbi} +1 -1
- data/rbi/retab/block_exec_file_handle_input.rbi +30 -0
- data/rbi/retab/block_exec_file_ref.rbi +36 -0
- data/rbi/retab/block_exec_json_handle_input.rbi +30 -0
- data/rbi/retab/cancelled_block_execution_lifecycle.rbi +30 -0
- data/rbi/retab/{cancelled_workflow_test_run.rbi → cancelled_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/classification_request.rbi +2 -2
- data/rbi/retab/{completed_workflow_test_run.rbi → completed_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/create_experiment_run_request.rbi +6 -0
- data/rbi/retab/create_file_blueprint_request.rbi +4 -4
- data/rbi/retab/{create_workflow_test_request.rbi → create_workflow_eval_request.rbi} +5 -5
- data/rbi/retab/{create_workflow_test_run_request.rbi → create_workflow_eval_run_request.rbi} +3 -3
- data/rbi/retab/create_workflow_run_request.rbi +2 -2
- data/rbi/retab/edit_request.rbi +2 -2
- data/rbi/retab/{error_workflow_test_run.rbi → error_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/eval_file_handle_input.rbi +30 -0
- data/rbi/retab/eval_json_handle_input.rbi +30 -0
- data/rbi/retab/eval_public_file_ref.rbi +36 -0
- data/rbi/retab/{workflow_test_block_target.rbi → eval_run_block_target.rbi} +1 -1
- data/rbi/retab/eval_run_freshness.rbi +48 -0
- data/rbi/retab/{workflow_test_run_workflow_scope.rbi → eval_run_trigger.rbi} +1 -1
- data/rbi/retab/experiment_metrics_stale_error.rbi +2 -2
- data/rbi/retab/experiment_run.rbi +2 -2
- data/rbi/retab/experiment_runs.rbi +2 -1
- data/rbi/retab/experiment_summary_metrics_response.rbi +2 -2
- data/rbi/retab/extraction.rbi +0 -6
- data/rbi/retab/extraction_request.rbi +2 -8
- data/rbi/retab/extraction_workflow_artifact.rbi +0 -6
- data/rbi/retab/extractions.rbi +19 -2
- data/rbi/retab/file_blueprint.rbi +6 -6
- data/rbi/retab/file_handle_input.rbi +2 -2
- data/rbi/retab/files.rbi +2 -2
- data/rbi/retab/generate_schema_request.rbi +0 -6
- data/rbi/retab/{latest_block_test_run_summary.rbi → latest_block_eval_run_summary.rbi} +3 -3
- data/rbi/retab/{manual_workflow_test_source.rbi → manual_workflow_eval_source.rbi} +3 -3
- data/rbi/retab/metrics_stale_error_last_run.rbi +2 -2
- data/rbi/retab/parse.rbi +0 -6
- data/rbi/retab/parse_request.rbi +2 -8
- data/rbi/retab/parse_workflow_artifact.rbi +0 -6
- data/rbi/retab/parses.rbi +1 -2
- data/rbi/retab/partition_request.rbi +2 -2
- data/rbi/retab/pending_block_execution_lifecycle.rbi +24 -0
- data/rbi/retab/{pending_workflow_test_run.rbi → pending_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/queued_block_execution_lifecycle.rbi +24 -0
- data/rbi/retab/{queued_workflow_test_run.rbi → queued_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/result_file_ref.rbi +36 -0
- data/rbi/retab/{run_step_workflow_test_source.rbi → run_step_workflow_eval_source.rbi} +1 -1
- data/rbi/retab/running_block_execution_lifecycle.rbi +24 -0
- data/rbi/retab/{running_workflow_test_run.rbi → running_workflow_eval_run.rbi} +1 -1
- data/rbi/retab/schemas.rbi +1 -2
- data/rbi/retab/split_request.rbi +2 -2
- data/rbi/retab/stored_block_execution.rbi +48 -6
- data/rbi/retab/{update_workflow_test_request.rbi → update_workflow_eval_request.rbi} +3 -3
- data/rbi/retab/workflow_artifact.rbi +6 -0
- data/rbi/retab/workflow_edges.rbi +2 -1
- data/rbi/retab/{workflow_test.rbi → workflow_eval.rbi} +11 -11
- data/rbi/retab/workflow_eval_block_target.rbi +30 -0
- data/rbi/retab/{workflow_test_result.rbi → workflow_eval_result.rbi} +35 -35
- data/rbi/retab/workflow_eval_run.rbi +84 -0
- data/rbi/retab/{workflow_test_run_block_scope.rbi → workflow_eval_run_block_scope.rbi} +1 -1
- data/rbi/retab/{workflow_test_run_results.rbi → workflow_eval_run_results.rbi} +3 -3
- data/rbi/retab/{workflow_test_run_single_scope.rbi → workflow_eval_run_single_scope.rbi} +3 -3
- data/rbi/retab/{workflow_test_run_timing.rbi → workflow_eval_run_timing.rbi} +1 -1
- data/rbi/retab/workflow_eval_run_workflow_scope.rbi +24 -0
- data/rbi/retab/{workflow_test_runs.rbi → workflow_eval_runs.rbi} +8 -8
- data/rbi/retab/{workflow_tests.rbi → workflow_evals.rbi} +16 -16
- data/rbi/retab/workflow_experiment.rbi +24 -0
- data/rbi/retab/workflows.rbi +2 -2
- metadata +125 -92
- data/lib/retab/types/workflow_test_schema_drift.rb +0 -9
- data/rbi/retab/workflow_test_run.rbi +0 -84
- /data/lib/retab/{workflow_test_run_results → workflow_eval_run_results}/assertion_failure.rb +0 -0
- /data/lib/retab/{workflow_test_run_results → workflow_eval_run_results}/assertion_result.rb +0 -0
- /data/lib/retab/{workflow_test_run_results → workflow_eval_run_results}/verdict_summary.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/all_items_match_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/any_item_matches_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/array_contains_condition.rb +0 -0
- /data/lib/retab/{workflow_experiments → workflow_evals}/artifact_drift.rb +0 -0
- /data/lib/retab/{workflow_experiments → workflow_evals}/artifact_freshness.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/assertion_schema_dep.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/assertion_spec.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/between_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/contain_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/ends_with_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/equal_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/exist_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/json_schema_valid_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/length_compare_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/llm_judged_as_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/llm_not_judged_as_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/matche_regex_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/not_contains_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/not_equals_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/not_exists_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/number_compare_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/object_contains_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/output_target.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/similarity_gte_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/split_iou_condition.rb +0 -0
- /data/lib/retab/{workflow_tests → workflow_evals}/start_with_condition.rb +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Retab
|
|
6
|
+
class RunningBlockExecutionLifecycle < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
status: :status
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor :status
|
|
13
|
+
|
|
14
|
+
def initialize(json)
|
|
15
|
+
super()
|
|
16
|
+
hash = self.class.normalize(json)
|
|
17
|
+
@status = hash[:status].nil? ? "running" : hash[:status]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -8,6 +8,7 @@ module Retab
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
id: :id,
|
|
10
10
|
workflow_id: :workflow_id,
|
|
11
|
+
workflow_version_id: :workflow_version_id,
|
|
11
12
|
source_run_id: :source_run_id,
|
|
12
13
|
block_id: :block_id,
|
|
13
14
|
block_type: :block_type,
|
|
@@ -18,6 +19,12 @@ module Retab
|
|
|
18
19
|
routing_decisions: :routing_decisions,
|
|
19
20
|
duration_ms: :duration_ms,
|
|
20
21
|
created_at: :created_at,
|
|
22
|
+
started_at: :started_at,
|
|
23
|
+
completed_at: :completed_at,
|
|
24
|
+
handle_inputs_fingerprint: :handle_inputs_fingerprint,
|
|
25
|
+
workflow_draft_fingerprint: :workflow_draft_fingerprint,
|
|
26
|
+
block_execution_fingerprint: :block_execution_fingerprint,
|
|
27
|
+
execution_fingerprint: :execution_fingerprint,
|
|
21
28
|
block_config: :block_config,
|
|
22
29
|
source_step_id: :source_step_id,
|
|
23
30
|
available_iterations: :available_iterations
|
|
@@ -26,6 +33,7 @@ module Retab
|
|
|
26
33
|
attr_accessor(
|
|
27
34
|
:id,
|
|
28
35
|
:workflow_id,
|
|
36
|
+
:workflow_version_id,
|
|
29
37
|
:source_run_id,
|
|
30
38
|
:block_id,
|
|
31
39
|
:block_type,
|
|
@@ -36,6 +44,12 @@ module Retab
|
|
|
36
44
|
:routing_decisions,
|
|
37
45
|
:duration_ms,
|
|
38
46
|
:created_at,
|
|
47
|
+
:started_at,
|
|
48
|
+
:completed_at,
|
|
49
|
+
:handle_inputs_fingerprint,
|
|
50
|
+
:workflow_draft_fingerprint,
|
|
51
|
+
:block_execution_fingerprint,
|
|
52
|
+
:execution_fingerprint,
|
|
39
53
|
:block_config,
|
|
40
54
|
:source_step_id,
|
|
41
55
|
:available_iterations
|
|
@@ -46,15 +60,24 @@ module Retab
|
|
|
46
60
|
hash = self.class.normalize(json)
|
|
47
61
|
@id = hash[:id]
|
|
48
62
|
@workflow_id = hash[:workflow_id]
|
|
63
|
+
@workflow_version_id = hash[:workflow_version_id]
|
|
49
64
|
@source_run_id = hash[:source_run_id]
|
|
50
65
|
@block_id = hash[:block_id]
|
|
51
66
|
@block_type = hash[:block_type]
|
|
52
67
|
@lifecycle = hash[:lifecycle] ? (
|
|
53
68
|
case hash[:lifecycle][:status]
|
|
69
|
+
when "cancelled"
|
|
70
|
+
Retab::CancelledBlockExecutionLifecycle.new(hash[:lifecycle])
|
|
54
71
|
when "completed"
|
|
55
72
|
Retab::CompletedBlockExecutionLifecycle.new(hash[:lifecycle])
|
|
56
73
|
when "error"
|
|
57
74
|
Retab::ErrorBlockExecutionLifecycle.new(hash[:lifecycle])
|
|
75
|
+
when "pending"
|
|
76
|
+
Retab::PendingBlockExecutionLifecycle.new(hash[:lifecycle])
|
|
77
|
+
when "queued"
|
|
78
|
+
Retab::QueuedBlockExecutionLifecycle.new(hash[:lifecycle])
|
|
79
|
+
when "running"
|
|
80
|
+
Retab::RunningBlockExecutionLifecycle.new(hash[:lifecycle])
|
|
58
81
|
when "skipped"
|
|
59
82
|
Retab::SkippedBlockExecutionLifecycle.new(hash[:lifecycle])
|
|
60
83
|
else
|
|
@@ -67,6 +90,12 @@ module Retab
|
|
|
67
90
|
@routing_decisions = (hash[:routing_decisions] || [])
|
|
68
91
|
@duration_ms = hash[:duration_ms]
|
|
69
92
|
@created_at = hash[:created_at]
|
|
93
|
+
@started_at = hash[:started_at]
|
|
94
|
+
@completed_at = hash[:completed_at]
|
|
95
|
+
@handle_inputs_fingerprint = hash[:handle_inputs_fingerprint]
|
|
96
|
+
@workflow_draft_fingerprint = hash[:workflow_draft_fingerprint]
|
|
97
|
+
@block_execution_fingerprint = hash[:block_execution_fingerprint]
|
|
98
|
+
@execution_fingerprint = hash[:execution_fingerprint]
|
|
70
99
|
@block_config = hash[:block_config] || {}
|
|
71
100
|
@source_step_id = hash[:source_step_id]
|
|
72
101
|
@available_iterations = (hash[:available_iterations] || []).map { |item| item || {} }
|
data/lib/retab/workflow_edges.rb
CHANGED
|
@@ -246,16 +246,22 @@ module Retab
|
|
|
246
246
|
|
|
247
247
|
# Get Edge
|
|
248
248
|
# @param edge_id [String]
|
|
249
|
+
# @param workflow_id [String, nil]
|
|
249
250
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
250
251
|
# @return [Retab::WorkflowEdgeDoc]
|
|
251
252
|
def get(
|
|
252
253
|
edge_id:,
|
|
254
|
+
workflow_id: nil,
|
|
253
255
|
request_options: {}
|
|
254
256
|
)
|
|
257
|
+
params = {
|
|
258
|
+
"workflow_id" => workflow_id
|
|
259
|
+
}.compact
|
|
255
260
|
response = @client.request(
|
|
256
261
|
method: :get,
|
|
257
262
|
path: "/v1/workflows/edges/#{Retab::Util.encode_path(edge_id)}",
|
|
258
263
|
auth: true,
|
|
264
|
+
params: params,
|
|
259
265
|
request_options: request_options
|
|
260
266
|
)
|
|
261
267
|
result = Retab::WorkflowEdgeDoc.new(response.body)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Retab
|
|
6
|
+
class ErrorWorkflowEvalRun < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
status: :status,
|
|
10
|
+
message: :message,
|
|
11
|
+
details: :details
|
|
12
|
+
}.freeze
|
|
13
|
+
|
|
14
|
+
attr_accessor(
|
|
15
|
+
:status,
|
|
16
|
+
:message,
|
|
17
|
+
:details
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
def initialize(json)
|
|
21
|
+
super()
|
|
22
|
+
hash = self.class.normalize(json)
|
|
23
|
+
@status = hash[:status].nil? ? "error" : hash[:status]
|
|
24
|
+
@message = hash[:message].nil? ? "(no message)" : hash[:message]
|
|
25
|
+
@details = hash[:details] ? Retab::ErrorDetails.new(hash[:details]) : nil
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -3,50 +3,50 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class WorkflowEvalResult < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
id: :id,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
workflow_eval_run_id: :workflow_eval_run_id,
|
|
11
|
+
eval_id: :eval_id,
|
|
12
12
|
lifecycle: :lifecycle,
|
|
13
13
|
timing: :timing,
|
|
14
14
|
verdict: :verdict,
|
|
15
15
|
workflow_id: :workflow_id,
|
|
16
|
-
|
|
16
|
+
block_id: :block_id,
|
|
17
|
+
block_type: :block_type,
|
|
17
18
|
execution_fingerprint: :execution_fingerprint,
|
|
18
19
|
handle_inputs_fingerprint: :handle_inputs_fingerprint,
|
|
19
20
|
workflow_draft_fingerprint: :workflow_draft_fingerprint,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
block_execution_fingerprint: :block_execution_fingerprint,
|
|
22
|
+
artifact: :artifact,
|
|
23
|
+
handle_inputs: :handle_inputs,
|
|
24
|
+
handle_outputs: :handle_outputs,
|
|
23
25
|
routing_decisions: :routing_decisions,
|
|
24
26
|
warnings: :warnings,
|
|
25
|
-
error: :error,
|
|
26
|
-
skipped: :skipped,
|
|
27
27
|
assertion_result: :assertion_result,
|
|
28
28
|
verdict_summary: :verdict_summary
|
|
29
29
|
}.freeze
|
|
30
30
|
|
|
31
31
|
attr_accessor(
|
|
32
32
|
:id,
|
|
33
|
-
:
|
|
34
|
-
:
|
|
33
|
+
:workflow_eval_run_id,
|
|
34
|
+
:eval_id,
|
|
35
35
|
:lifecycle,
|
|
36
36
|
:timing,
|
|
37
37
|
:verdict,
|
|
38
38
|
:workflow_id,
|
|
39
|
-
:
|
|
39
|
+
:block_id,
|
|
40
|
+
:block_type,
|
|
40
41
|
:execution_fingerprint,
|
|
41
42
|
:handle_inputs_fingerprint,
|
|
42
43
|
:workflow_draft_fingerprint,
|
|
43
|
-
:
|
|
44
|
-
:
|
|
45
|
-
:
|
|
44
|
+
:block_execution_fingerprint,
|
|
45
|
+
:artifact,
|
|
46
|
+
:handle_inputs,
|
|
47
|
+
:handle_outputs,
|
|
46
48
|
:routing_decisions,
|
|
47
49
|
:warnings,
|
|
48
|
-
:error,
|
|
49
|
-
:skipped,
|
|
50
50
|
:assertion_result,
|
|
51
51
|
:verdict_summary
|
|
52
52
|
)
|
|
@@ -55,49 +55,40 @@ module Retab
|
|
|
55
55
|
super()
|
|
56
56
|
hash = self.class.normalize(json)
|
|
57
57
|
@id = hash[:id]
|
|
58
|
-
@
|
|
59
|
-
@
|
|
58
|
+
@workflow_eval_run_id = hash[:workflow_eval_run_id]
|
|
59
|
+
@eval_id = hash[:eval_id]
|
|
60
60
|
@lifecycle = hash[:lifecycle] ? (
|
|
61
61
|
case hash[:lifecycle][:status]
|
|
62
62
|
when "cancelled"
|
|
63
|
-
Retab::
|
|
63
|
+
Retab::CancelledWorkflowEvalRun.new(hash[:lifecycle])
|
|
64
64
|
when "completed"
|
|
65
|
-
Retab::
|
|
65
|
+
Retab::CompletedWorkflowEvalRun.new(hash[:lifecycle])
|
|
66
66
|
when "error"
|
|
67
|
-
Retab::
|
|
67
|
+
Retab::ErrorWorkflowEvalRun.new(hash[:lifecycle])
|
|
68
68
|
when "pending"
|
|
69
|
-
Retab::
|
|
69
|
+
Retab::PendingWorkflowEvalRun.new(hash[:lifecycle])
|
|
70
70
|
when "queued"
|
|
71
|
-
Retab::
|
|
71
|
+
Retab::QueuedWorkflowEvalRun.new(hash[:lifecycle])
|
|
72
72
|
when "running"
|
|
73
|
-
Retab::
|
|
73
|
+
Retab::RunningWorkflowEvalRun.new(hash[:lifecycle])
|
|
74
74
|
else
|
|
75
75
|
hash[:lifecycle]
|
|
76
76
|
end
|
|
77
77
|
) : nil
|
|
78
|
-
@timing = hash[:timing] ? Retab::
|
|
78
|
+
@timing = hash[:timing] ? Retab::WorkflowEvalRunTiming.new(hash[:timing]) : nil
|
|
79
79
|
@verdict = hash[:verdict]
|
|
80
80
|
@workflow_id = hash[:workflow_id]
|
|
81
|
-
@
|
|
81
|
+
@block_id = hash[:block_id]
|
|
82
|
+
@block_type = hash[:block_type]
|
|
82
83
|
@execution_fingerprint = hash[:execution_fingerprint]
|
|
83
84
|
@handle_inputs_fingerprint = hash[:handle_inputs_fingerprint]
|
|
84
85
|
@workflow_draft_fingerprint = hash[:workflow_draft_fingerprint]
|
|
85
|
-
@
|
|
86
|
-
@
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Retab::ManualWorkflowTestSource.new(hash[:source])
|
|
90
|
-
when "run_step"
|
|
91
|
-
Retab::RunStepWorkflowTestSource.new(hash[:source])
|
|
92
|
-
else
|
|
93
|
-
hash[:source]
|
|
94
|
-
end
|
|
95
|
-
) : nil
|
|
96
|
-
@outputs = hash[:outputs] || {}
|
|
86
|
+
@block_execution_fingerprint = hash[:block_execution_fingerprint]
|
|
87
|
+
@artifact = hash[:artifact] ? Retab::StepArtifactRef.new(hash[:artifact]) : nil
|
|
88
|
+
@handle_inputs = hash[:handle_inputs] || {}
|
|
89
|
+
@handle_outputs = hash[:handle_outputs] || {}
|
|
97
90
|
@routing_decisions = (hash[:routing_decisions] || [])
|
|
98
91
|
@warnings = (hash[:warnings] || [])
|
|
99
|
-
@error = hash[:error] ? Retab::ErrorDetails.new(hash[:error]) : nil
|
|
100
|
-
@skipped = hash[:skipped].nil? ? false : hash[:skipped]
|
|
101
92
|
@assertion_result = hash[:assertion_result] ? Retab::AssertionResult.new(hash[:assertion_result]) : nil
|
|
102
93
|
@verdict_summary = hash[:verdict_summary] ? Retab::VerdictSummary.new(hash[:verdict_summary]) : nil
|
|
103
94
|
end
|
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
require "json"
|
|
6
6
|
|
|
7
7
|
module Retab
|
|
8
|
-
class
|
|
8
|
+
class WorkflowEvalRunResults
|
|
9
9
|
def initialize(client)
|
|
10
10
|
@client = client
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
# List
|
|
13
|
+
# List Workflow Eval Results
|
|
14
14
|
# @param run_id [String]
|
|
15
15
|
# @param before [String, nil]
|
|
16
16
|
# @param after [String, nil]
|
|
17
17
|
# @param limit [Integer, nil]
|
|
18
|
-
# @param order [Retab::Types::
|
|
18
|
+
# @param order [Retab::Types::WorkflowEvalRunResultsOrder, nil]
|
|
19
19
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
20
|
-
# @return [Retab::PaginatedList<Retab::
|
|
20
|
+
# @return [Retab::PaginatedList<Retab::WorkflowEvalResult>]
|
|
21
21
|
def list(
|
|
22
22
|
run_id:,
|
|
23
23
|
before: nil,
|
|
@@ -35,7 +35,7 @@ module Retab
|
|
|
35
35
|
}.compact
|
|
36
36
|
response = @client.request(
|
|
37
37
|
method: :get,
|
|
38
|
-
path: "/v1/workflows/
|
|
38
|
+
path: "/v1/workflows/evals/results",
|
|
39
39
|
auth: true,
|
|
40
40
|
params: params,
|
|
41
41
|
request_options: request_options
|
|
@@ -52,27 +52,27 @@ module Retab
|
|
|
52
52
|
}
|
|
53
53
|
Retab::PaginatedList.from_response(
|
|
54
54
|
response,
|
|
55
|
-
model: Retab::
|
|
55
|
+
model: Retab::WorkflowEvalResult,
|
|
56
56
|
filters: {run_id: run_id, before: before, limit: limit, order: order},
|
|
57
57
|
fetch_next: fetch_next
|
|
58
58
|
)
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
-
# Get
|
|
61
|
+
# Get Workflow Eval Result
|
|
62
62
|
# @param result_id [String]
|
|
63
63
|
# @param request_options [Hash] (see Retab::Types::RequestOptions)
|
|
64
|
-
# @return [Retab::
|
|
64
|
+
# @return [Retab::WorkflowEvalResult]
|
|
65
65
|
def get(
|
|
66
66
|
result_id:,
|
|
67
67
|
request_options: {}
|
|
68
68
|
)
|
|
69
69
|
response = @client.request(
|
|
70
70
|
method: :get,
|
|
71
|
-
path: "/v1/workflows/
|
|
71
|
+
path: "/v1/workflows/evals/results/#{Retab::Util.encode_path(result_id)}",
|
|
72
72
|
auth: true,
|
|
73
73
|
request_options: request_options
|
|
74
74
|
)
|
|
75
|
-
result = Retab::
|
|
75
|
+
result = Retab::WorkflowEvalResult.new(response.body)
|
|
76
76
|
result.last_response = Retab::Types::ApiResponse.new(
|
|
77
77
|
http_status: response.code.to_i,
|
|
78
78
|
http_headers: response.each_header.to_h,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class BlockEvalBatchExecutionCounts < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
lifecycle_counts: :lifecycle_counts,
|
|
@@ -18,8 +18,8 @@ module Retab
|
|
|
18
18
|
def initialize(json)
|
|
19
19
|
super()
|
|
20
20
|
hash = self.class.normalize(json)
|
|
21
|
-
@lifecycle_counts = hash[:lifecycle_counts] ? Retab::
|
|
22
|
-
@outcome = hash[:outcome] ? Retab::
|
|
21
|
+
@lifecycle_counts = hash[:lifecycle_counts] ? Retab::BlockEvalLifecycleCounts.new(hash[:lifecycle_counts]) : nil
|
|
22
|
+
@outcome = hash[:outcome] ? Retab::BlockEvalOutcomeCounts.new(hash[:outcome]) : nil
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class CreateWorkflowEvalRunRequest < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
workflow_id: :workflow_id,
|
|
@@ -22,11 +22,11 @@ module Retab
|
|
|
22
22
|
@scope = hash[:scope] ? (
|
|
23
23
|
case hash[:scope][:type]
|
|
24
24
|
when "block"
|
|
25
|
-
Retab::
|
|
25
|
+
Retab::WorkflowEvalRunBlockScope.new(hash[:scope])
|
|
26
26
|
when "single"
|
|
27
|
-
Retab::
|
|
27
|
+
Retab::WorkflowEvalRunSingleScope.new(hash[:scope])
|
|
28
28
|
when "workflow"
|
|
29
|
-
Retab::
|
|
29
|
+
Retab::WorkflowEvalRunWorkflowScope.new(hash[:scope])
|
|
30
30
|
else
|
|
31
31
|
hash[:scope]
|
|
32
32
|
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module Retab
|
|
6
|
+
class EvalRunFreshness < Retab::Types::BaseModel
|
|
7
|
+
|
|
8
|
+
HASH_ATTRS = {
|
|
9
|
+
status: :status,
|
|
10
|
+
reasons: :reasons,
|
|
11
|
+
validity_fingerprint: :validity_fingerprint,
|
|
12
|
+
input_fingerprint: :input_fingerprint,
|
|
13
|
+
baseline_run_id: :baseline_run_id
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor(
|
|
17
|
+
:status,
|
|
18
|
+
:reasons,
|
|
19
|
+
:validity_fingerprint,
|
|
20
|
+
:input_fingerprint,
|
|
21
|
+
:baseline_run_id
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
super()
|
|
26
|
+
hash = self.class.normalize(json)
|
|
27
|
+
@status = hash[:status].nil? ? "unknown" : hash[:status]
|
|
28
|
+
@reasons = (hash[:reasons] || [])
|
|
29
|
+
@validity_fingerprint = hash[:validity_fingerprint]
|
|
30
|
+
@input_fingerprint = hash[:input_fingerprint]
|
|
31
|
+
@baseline_run_id = hash[:baseline_run_id]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
data/lib/retab/{workflow_test_runs/workflow_test_run.rb → workflow_eval_runs/workflow_eval_run.rb}
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class WorkflowEvalRun < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
id: :id,
|
|
@@ -13,8 +13,8 @@ module Retab
|
|
|
13
13
|
lifecycle: :lifecycle,
|
|
14
14
|
timing: :timing,
|
|
15
15
|
target: :target,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
eval_id: :eval_id,
|
|
17
|
+
total_evals: :total_evals,
|
|
18
18
|
counts: :counts,
|
|
19
19
|
freshness: :freshness
|
|
20
20
|
}.freeze
|
|
@@ -27,8 +27,8 @@ module Retab
|
|
|
27
27
|
:lifecycle,
|
|
28
28
|
:timing,
|
|
29
29
|
:target,
|
|
30
|
-
:
|
|
31
|
-
:
|
|
30
|
+
:eval_id,
|
|
31
|
+
:total_evals,
|
|
32
32
|
:counts,
|
|
33
33
|
:freshness
|
|
34
34
|
)
|
|
@@ -39,31 +39,31 @@ module Retab
|
|
|
39
39
|
@id = hash[:id]
|
|
40
40
|
@workflow_id = hash[:workflow_id]
|
|
41
41
|
@workflow_version_id = hash[:workflow_version_id]
|
|
42
|
-
@trigger = hash[:trigger] ? Retab::
|
|
42
|
+
@trigger = hash[:trigger] ? Retab::EvalRunTrigger.new(hash[:trigger]) : nil
|
|
43
43
|
@lifecycle = hash[:lifecycle] ? (
|
|
44
44
|
case hash[:lifecycle][:status]
|
|
45
45
|
when "cancelled"
|
|
46
|
-
Retab::
|
|
46
|
+
Retab::CancelledWorkflowEvalRun.new(hash[:lifecycle])
|
|
47
47
|
when "completed"
|
|
48
|
-
Retab::
|
|
48
|
+
Retab::CompletedWorkflowEvalRun.new(hash[:lifecycle])
|
|
49
49
|
when "error"
|
|
50
|
-
Retab::
|
|
50
|
+
Retab::ErrorWorkflowEvalRun.new(hash[:lifecycle])
|
|
51
51
|
when "pending"
|
|
52
|
-
Retab::
|
|
52
|
+
Retab::PendingWorkflowEvalRun.new(hash[:lifecycle])
|
|
53
53
|
when "queued"
|
|
54
|
-
Retab::
|
|
54
|
+
Retab::QueuedWorkflowEvalRun.new(hash[:lifecycle])
|
|
55
55
|
when "running"
|
|
56
|
-
Retab::
|
|
56
|
+
Retab::RunningWorkflowEvalRun.new(hash[:lifecycle])
|
|
57
57
|
else
|
|
58
58
|
hash[:lifecycle]
|
|
59
59
|
end
|
|
60
60
|
) : nil
|
|
61
|
-
@timing = hash[:timing] ? Retab::
|
|
62
|
-
@target = hash[:target] ? Retab::
|
|
63
|
-
@
|
|
64
|
-
@
|
|
65
|
-
@counts = hash[:counts] ? Retab::
|
|
66
|
-
@freshness = hash[:freshness] ? Retab::
|
|
61
|
+
@timing = hash[:timing] ? Retab::WorkflowEvalRunTiming.new(hash[:timing]) : nil
|
|
62
|
+
@target = hash[:target] ? Retab::EvalRunBlockTarget.new(hash[:target]) : nil
|
|
63
|
+
@eval_id = hash[:eval_id]
|
|
64
|
+
@total_evals = hash[:total_evals]
|
|
65
|
+
@counts = hash[:counts] ? Retab::BlockEvalBatchExecutionCounts.new(hash[:counts]) : nil
|
|
66
|
+
@freshness = hash[:freshness] ? Retab::EvalRunFreshness.new(hash[:freshness]) : nil
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
end
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module Retab
|
|
6
|
-
class
|
|
6
|
+
class WorkflowEvalRunSingleScope < Retab::Types::BaseModel
|
|
7
7
|
|
|
8
8
|
HASH_ATTRS = {
|
|
9
9
|
type: :type,
|
|
10
|
-
|
|
10
|
+
eval_id: :eval_id
|
|
11
11
|
}.freeze
|
|
12
12
|
|
|
13
13
|
attr_accessor(
|
|
14
14
|
:type,
|
|
15
|
-
:
|
|
15
|
+
:eval_id
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
def initialize(json)
|
|
19
19
|
super()
|
|
20
20
|
hash = self.class.normalize(json)
|
|
21
21
|
@type = hash[:type]
|
|
22
|
-
@
|
|
22
|
+
@eval_id = hash[:eval_id]
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|