openlayer 0.4.1 → 0.6.0

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.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/lib/openlayer/client.rb +4 -0
  5. data/lib/openlayer/internal/transport/base_client.rb +7 -1
  6. data/lib/openlayer/internal/transport/pooled_net_requester.rb +38 -26
  7. data/lib/openlayer/internal/util.rb +3 -2
  8. data/lib/openlayer/models/inference_pipeline_retrieve_response.rb +507 -1
  9. data/lib/openlayer/models/inference_pipeline_update_response.rb +507 -1
  10. data/lib/openlayer/models/projects/inference_pipeline_create_params.rb +609 -1
  11. data/lib/openlayer/models/projects/inference_pipeline_create_response.rb +507 -1
  12. data/lib/openlayer/models/projects/inference_pipeline_list_response.rb +507 -1
  13. data/lib/openlayer/models/projects/test_create_params.rb +49 -1
  14. data/lib/openlayer/models/projects/test_create_response.rb +49 -1
  15. data/lib/openlayer/models/projects/test_list_response.rb +49 -1
  16. data/lib/openlayer/models/test_evaluate_params.rb +50 -0
  17. data/lib/openlayer/models/test_evaluate_response.rb +75 -0
  18. data/lib/openlayer/models.rb +2 -0
  19. data/lib/openlayer/resources/projects/inference_pipelines.rb +3 -1
  20. data/lib/openlayer/resources/projects/tests.rb +9 -1
  21. data/lib/openlayer/resources/tests.rb +50 -0
  22. data/lib/openlayer/version.rb +1 -1
  23. data/lib/openlayer.rb +5 -0
  24. data/manifest.yaml +2 -0
  25. data/rbi/openlayer/client.rbi +3 -0
  26. data/rbi/openlayer/internal/transport/base_client.rbi +5 -0
  27. data/rbi/openlayer/internal/transport/pooled_net_requester.rbi +6 -2
  28. data/rbi/openlayer/internal/type/base_model.rbi +8 -4
  29. data/rbi/openlayer/models/inference_pipeline_retrieve_response.rbi +948 -0
  30. data/rbi/openlayer/models/inference_pipeline_update_response.rbi +948 -0
  31. data/rbi/openlayer/models/projects/inference_pipeline_create_params.rbi +1095 -0
  32. data/rbi/openlayer/models/projects/inference_pipeline_create_response.rbi +952 -0
  33. data/rbi/openlayer/models/projects/inference_pipeline_list_response.rbi +952 -0
  34. data/rbi/openlayer/models/projects/test_create_params.rbi +40 -0
  35. data/rbi/openlayer/models/projects/test_create_response.rbi +40 -0
  36. data/rbi/openlayer/models/projects/test_list_response.rbi +40 -0
  37. data/rbi/openlayer/models/test_evaluate_params.rbi +75 -0
  38. data/rbi/openlayer/models/test_evaluate_response.rbi +121 -0
  39. data/rbi/openlayer/models.rbi +2 -0
  40. data/rbi/openlayer/resources/projects/inference_pipelines.rbi +12 -0
  41. data/rbi/openlayer/resources/projects/tests.rbi +16 -0
  42. data/rbi/openlayer/resources/tests.rbi +42 -0
  43. data/sig/openlayer/client.rbs +2 -0
  44. data/sig/openlayer/internal/transport/base_client.rbs +2 -0
  45. data/sig/openlayer/internal/transport/pooled_net_requester.rbs +4 -1
  46. data/sig/openlayer/models/inference_pipeline_retrieve_response.rbs +473 -0
  47. data/sig/openlayer/models/inference_pipeline_update_response.rbs +473 -0
  48. data/sig/openlayer/models/projects/inference_pipeline_create_params.rbs +493 -0
  49. data/sig/openlayer/models/projects/inference_pipeline_create_response.rbs +473 -0
  50. data/sig/openlayer/models/projects/inference_pipeline_list_response.rbs +473 -0
  51. data/sig/openlayer/models/projects/test_create_params.rbs +20 -0
  52. data/sig/openlayer/models/projects/test_create_response.rbs +20 -0
  53. data/sig/openlayer/models/projects/test_list_response.rbs +20 -0
  54. data/sig/openlayer/models/test_evaluate_params.rbs +45 -0
  55. data/sig/openlayer/models/test_evaluate_response.rbs +63 -0
  56. data/sig/openlayer/models.rbs +2 -0
  57. data/sig/openlayer/resources/projects/inference_pipelines.rbs +1 -0
  58. data/sig/openlayer/resources/projects/tests.rbs +4 -0
  59. data/sig/openlayer/resources/tests.rbs +16 -0
  60. metadata +11 -2
@@ -41,6 +41,16 @@ module Openlayer
41
41
  # @return [Boolean, nil]
42
42
  optional :archived, Openlayer::Internal::Type::Boolean
43
43
 
44
+ # @!attribute default_to_all_pipelines
45
+ # Whether to apply the test to all pipelines (data sources) or to a specific set
46
+ # of pipelines. Only applies to tests that use production data.
47
+ #
48
+ # @return [Boolean, nil]
49
+ optional :default_to_all_pipelines,
50
+ Openlayer::Internal::Type::Boolean,
51
+ api_name: :defaultToAllPipelines,
52
+ nil?: true
53
+
44
54
  # @!attribute delay_window
45
55
  # The delay window in seconds. Only applies to tests that use production data.
46
56
  #
@@ -54,6 +64,36 @@ module Openlayer
54
64
  # @return [Float, nil]
55
65
  optional :evaluation_window, Float, api_name: :evaluationWindow, nil?: true
56
66
 
67
+ # @!attribute exclude_pipelines
68
+ # Array of pipelines (data sources) to which the test should not be applied. Only
69
+ # applies to tests that use production data.
70
+ #
71
+ # @return [Array<String>, nil]
72
+ optional :exclude_pipelines,
73
+ Openlayer::Internal::Type::ArrayOf[String],
74
+ api_name: :excludePipelines,
75
+ nil?: true
76
+
77
+ # @!attribute include_historical_data
78
+ # Whether to include historical data in the test result. Only applies to tests
79
+ # that use production data.
80
+ #
81
+ # @return [Boolean, nil]
82
+ optional :include_historical_data,
83
+ Openlayer::Internal::Type::Boolean,
84
+ api_name: :includeHistoricalData,
85
+ nil?: true
86
+
87
+ # @!attribute include_pipelines
88
+ # Array of pipelines (data sources) to which the test should be applied. Only
89
+ # applies to tests that use production data.
90
+ #
91
+ # @return [Array<String>, nil]
92
+ optional :include_pipelines,
93
+ Openlayer::Internal::Type::ArrayOf[String],
94
+ api_name: :includePipelines,
95
+ nil?: true
96
+
57
97
  # @!attribute uses_ml_model
58
98
  # Whether the test uses an ML model.
59
99
  #
@@ -142,7 +182,7 @@ module Openlayer
142
182
  required :suggested, Openlayer::Internal::Type::Boolean
143
183
  end
144
184
 
145
- # @!method initialize(id:, comment_count:, creator_id:, date_archived:, date_created:, date_updated:, description:, name:, number:, origin_project_version_id:, subtype:, suggested:, thresholds:, type:, archived: nil, delay_window: nil, evaluation_window: nil, uses_ml_model: nil, uses_production_data: nil, uses_reference_dataset: nil, uses_training_dataset: nil, uses_validation_dataset: nil)
185
+ # @!method initialize(id:, comment_count:, creator_id:, date_archived:, date_created:, date_updated:, description:, name:, number:, origin_project_version_id:, subtype:, suggested:, thresholds:, type:, archived: nil, default_to_all_pipelines: nil, delay_window: nil, evaluation_window: nil, exclude_pipelines: nil, include_historical_data: nil, include_pipelines: nil, uses_ml_model: nil, uses_production_data: nil, uses_reference_dataset: nil, uses_training_dataset: nil, uses_validation_dataset: nil)
146
186
  # Some parameter documentations has been truncated, see
147
187
  # {Openlayer::Models::Projects::TestCreateResponse} for more details.
148
188
  #
@@ -176,10 +216,18 @@ module Openlayer
176
216
  #
177
217
  # @param archived [Boolean] Whether the test is archived.
178
218
  #
219
+ # @param default_to_all_pipelines [Boolean, nil] Whether to apply the test to all pipelines (data sources) or to a specific set o
220
+ #
179
221
  # @param delay_window [Float, nil] The delay window in seconds. Only applies to tests that use production data.
180
222
  #
181
223
  # @param evaluation_window [Float, nil] The evaluation window in seconds. Only applies to tests that use production data
182
224
  #
225
+ # @param exclude_pipelines [Array<String>, nil] Array of pipelines (data sources) to which the test should not be applied. Only
226
+ #
227
+ # @param include_historical_data [Boolean, nil] Whether to include historical data in the test result. Only applies to tests tha
228
+ #
229
+ # @param include_pipelines [Array<String>, nil] Array of pipelines (data sources) to which the test should be applied. Only appl
230
+ #
183
231
  # @param uses_ml_model [Boolean] Whether the test uses an ML model.
184
232
  #
185
233
  # @param uses_production_data [Boolean] Whether the test uses production data (monitoring mode only).
@@ -51,6 +51,16 @@ module Openlayer
51
51
  # @return [Boolean, nil]
52
52
  optional :archived, Openlayer::Internal::Type::Boolean
53
53
 
54
+ # @!attribute default_to_all_pipelines
55
+ # Whether to apply the test to all pipelines (data sources) or to a specific set
56
+ # of pipelines. Only applies to tests that use production data.
57
+ #
58
+ # @return [Boolean, nil]
59
+ optional :default_to_all_pipelines,
60
+ Openlayer::Internal::Type::Boolean,
61
+ api_name: :defaultToAllPipelines,
62
+ nil?: true
63
+
54
64
  # @!attribute delay_window
55
65
  # The delay window in seconds. Only applies to tests that use production data.
56
66
  #
@@ -64,6 +74,36 @@ module Openlayer
64
74
  # @return [Float, nil]
65
75
  optional :evaluation_window, Float, api_name: :evaluationWindow, nil?: true
66
76
 
77
+ # @!attribute exclude_pipelines
78
+ # Array of pipelines (data sources) to which the test should not be applied. Only
79
+ # applies to tests that use production data.
80
+ #
81
+ # @return [Array<String>, nil]
82
+ optional :exclude_pipelines,
83
+ Openlayer::Internal::Type::ArrayOf[String],
84
+ api_name: :excludePipelines,
85
+ nil?: true
86
+
87
+ # @!attribute include_historical_data
88
+ # Whether to include historical data in the test result. Only applies to tests
89
+ # that use production data.
90
+ #
91
+ # @return [Boolean, nil]
92
+ optional :include_historical_data,
93
+ Openlayer::Internal::Type::Boolean,
94
+ api_name: :includeHistoricalData,
95
+ nil?: true
96
+
97
+ # @!attribute include_pipelines
98
+ # Array of pipelines (data sources) to which the test should be applied. Only
99
+ # applies to tests that use production data.
100
+ #
101
+ # @return [Array<String>, nil]
102
+ optional :include_pipelines,
103
+ Openlayer::Internal::Type::ArrayOf[String],
104
+ api_name: :includePipelines,
105
+ nil?: true
106
+
67
107
  # @!attribute uses_ml_model
68
108
  # Whether the test uses an ML model.
69
109
  #
@@ -154,7 +194,7 @@ module Openlayer
154
194
  required :suggested, Openlayer::Internal::Type::Boolean
155
195
  end
156
196
 
157
- # @!method initialize(id:, comment_count:, creator_id:, date_archived:, date_created:, date_updated:, description:, name:, number:, origin_project_version_id:, subtype:, suggested:, thresholds:, type:, archived: nil, delay_window: nil, evaluation_window: nil, uses_ml_model: nil, uses_production_data: nil, uses_reference_dataset: nil, uses_training_dataset: nil, uses_validation_dataset: nil)
197
+ # @!method initialize(id:, comment_count:, creator_id:, date_archived:, date_created:, date_updated:, description:, name:, number:, origin_project_version_id:, subtype:, suggested:, thresholds:, type:, archived: nil, default_to_all_pipelines: nil, delay_window: nil, evaluation_window: nil, exclude_pipelines: nil, include_historical_data: nil, include_pipelines: nil, uses_ml_model: nil, uses_production_data: nil, uses_reference_dataset: nil, uses_training_dataset: nil, uses_validation_dataset: nil)
158
198
  # Some parameter documentations has been truncated, see
159
199
  # {Openlayer::Models::Projects::TestListResponse::Item} for more details.
160
200
  #
@@ -188,10 +228,18 @@ module Openlayer
188
228
  #
189
229
  # @param archived [Boolean] Whether the test is archived.
190
230
  #
231
+ # @param default_to_all_pipelines [Boolean, nil] Whether to apply the test to all pipelines (data sources) or to a specific set o
232
+ #
191
233
  # @param delay_window [Float, nil] The delay window in seconds. Only applies to tests that use production data.
192
234
  #
193
235
  # @param evaluation_window [Float, nil] The evaluation window in seconds. Only applies to tests that use production data
194
236
  #
237
+ # @param exclude_pipelines [Array<String>, nil] Array of pipelines (data sources) to which the test should not be applied. Only
238
+ #
239
+ # @param include_historical_data [Boolean, nil] Whether to include historical data in the test result. Only applies to tests tha
240
+ #
241
+ # @param include_pipelines [Array<String>, nil] Array of pipelines (data sources) to which the test should be applied. Only appl
242
+ #
195
243
  # @param uses_ml_model [Boolean] Whether the test uses an ML model.
196
244
  #
197
245
  # @param uses_production_data [Boolean] Whether the test uses production data (monitoring mode only).
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ # @see Openlayer::Resources::Tests#evaluate
6
+ class TestEvaluateParams < Openlayer::Internal::Type::BaseModel
7
+ extend Openlayer::Internal::Type::RequestParameters::Converter
8
+ include Openlayer::Internal::Type::RequestParameters
9
+
10
+ # @!attribute end_timestamp
11
+ # End timestamp in seconds (Unix epoch)
12
+ #
13
+ # @return [Integer]
14
+ required :end_timestamp, Integer, api_name: :endTimestamp
15
+
16
+ # @!attribute start_timestamp
17
+ # Start timestamp in seconds (Unix epoch)
18
+ #
19
+ # @return [Integer]
20
+ required :start_timestamp, Integer, api_name: :startTimestamp
21
+
22
+ # @!attribute inference_pipeline_id
23
+ # ID of the inference pipeline to evaluate. If not provided, all inference
24
+ # pipelines the test applies to will be evaluated.
25
+ #
26
+ # @return [String, nil]
27
+ optional :inference_pipeline_id, String, api_name: :inferencePipelineId
28
+
29
+ # @!attribute overwrite_results
30
+ # Whether to overwrite existing test results
31
+ #
32
+ # @return [Boolean, nil]
33
+ optional :overwrite_results, Openlayer::Internal::Type::Boolean, api_name: :overwriteResults
34
+
35
+ # @!method initialize(end_timestamp:, start_timestamp:, inference_pipeline_id: nil, overwrite_results: nil, request_options: {})
36
+ # Some parameter documentations has been truncated, see
37
+ # {Openlayer::Models::TestEvaluateParams} for more details.
38
+ #
39
+ # @param end_timestamp [Integer] End timestamp in seconds (Unix epoch)
40
+ #
41
+ # @param start_timestamp [Integer] Start timestamp in seconds (Unix epoch)
42
+ #
43
+ # @param inference_pipeline_id [String] ID of the inference pipeline to evaluate. If not provided, all inference pipelin
44
+ #
45
+ # @param overwrite_results [Boolean] Whether to overwrite existing test results
46
+ #
47
+ # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}]
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ # @see Openlayer::Resources::Tests#evaluate
6
+ class TestEvaluateResponse < Openlayer::Internal::Type::BaseModel
7
+ # @!attribute message
8
+ #
9
+ # @return [String]
10
+ required :message, String
11
+
12
+ # @!attribute pipeline_count
13
+ # Number of inference pipelines the test was queued for evaluation on
14
+ #
15
+ # @return [Integer]
16
+ required :pipeline_count, Integer, api_name: :pipelineCount
17
+
18
+ # @!attribute requested_end_timestamp
19
+ # The end timestamp you requested (in seconds)
20
+ #
21
+ # @return [Integer]
22
+ required :requested_end_timestamp, Integer, api_name: :requestedEndTimestamp
23
+
24
+ # @!attribute requested_start_timestamp
25
+ # The start timestamp you requested (in seconds)
26
+ #
27
+ # @return [Integer]
28
+ required :requested_start_timestamp, Integer, api_name: :requestedStartTimestamp
29
+
30
+ # @!attribute tasks
31
+ # Array of background task information for each pipeline evaluation
32
+ #
33
+ # @return [Array<Openlayer::Models::TestEvaluateResponse::Task>]
34
+ required :tasks, -> { Openlayer::Internal::Type::ArrayOf[Openlayer::Models::TestEvaluateResponse::Task] }
35
+
36
+ # @!method initialize(message:, pipeline_count:, requested_end_timestamp:, requested_start_timestamp:, tasks:)
37
+ # @param message [String]
38
+ #
39
+ # @param pipeline_count [Integer] Number of inference pipelines the test was queued for evaluation on
40
+ #
41
+ # @param requested_end_timestamp [Integer] The end timestamp you requested (in seconds)
42
+ #
43
+ # @param requested_start_timestamp [Integer] The start timestamp you requested (in seconds)
44
+ #
45
+ # @param tasks [Array<Openlayer::Models::TestEvaluateResponse::Task>] Array of background task information for each pipeline evaluation
46
+
47
+ class Task < Openlayer::Internal::Type::BaseModel
48
+ # @!attribute pipeline_id
49
+ # ID of the inference pipeline this task is for
50
+ #
51
+ # @return [String]
52
+ required :pipeline_id, String, api_name: :pipelineId
53
+
54
+ # @!attribute task_result_id
55
+ # ID of the background task
56
+ #
57
+ # @return [String]
58
+ required :task_result_id, String, api_name: :taskResultId
59
+
60
+ # @!attribute task_result_url
61
+ # URL to check the status of this background task
62
+ #
63
+ # @return [String]
64
+ required :task_result_url, String, api_name: :taskResultUrl
65
+
66
+ # @!method initialize(pipeline_id:, task_result_id:, task_result_url:)
67
+ # @param pipeline_id [String] ID of the inference pipeline this task is for
68
+ #
69
+ # @param task_result_id [String] ID of the background task
70
+ #
71
+ # @param task_result_url [String] URL to check the status of this background task
72
+ end
73
+ end
74
+ end
75
+ end
@@ -58,4 +58,6 @@ module Openlayer
58
58
  Projects = Openlayer::Models::Projects
59
59
 
60
60
  Storage = Openlayer::Models::Storage
61
+
62
+ TestEvaluateParams = Openlayer::Models::TestEvaluateParams
61
63
  end
@@ -6,7 +6,7 @@ module Openlayer
6
6
  class InferencePipelines
7
7
  # Create an inference pipeline in a project.
8
8
  #
9
- # @overload create(project_id, description:, name:, project: nil, workspace: nil, request_options: {})
9
+ # @overload create(project_id, description:, name:, data_backend: nil, project: nil, workspace: nil, request_options: {})
10
10
  #
11
11
  # @param project_id [String] The project id.
12
12
  #
@@ -14,6 +14,8 @@ module Openlayer
14
14
  #
15
15
  # @param name [String] The inference pipeline name.
16
16
  #
17
+ # @param data_backend [Openlayer::Models::Projects::InferencePipelineCreateParams::DataBackend::UnionMember0, Openlayer::Models::Projects::InferencePipelineCreateParams::DataBackend::BackendType, Openlayer::Models::Projects::InferencePipelineCreateParams::DataBackend::UnionMember2, Openlayer::Models::Projects::InferencePipelineCreateParams::DataBackend::UnionMember3, Openlayer::Models::Projects::InferencePipelineCreateParams::DataBackend::UnionMember4, Openlayer::Models::Projects::InferencePipelineCreateParams::DataBackend::UnionMember5, nil]
18
+ #
17
19
  # @param project [Openlayer::Models::Projects::InferencePipelineCreateParams::Project, nil]
18
20
  #
19
21
  # @param workspace [Openlayer::Models::Projects::InferencePipelineCreateParams::Workspace, nil]
@@ -9,7 +9,7 @@ module Openlayer
9
9
  #
10
10
  # Create a test.
11
11
  #
12
- # @overload create(project_id, description:, name:, subtype:, thresholds:, type:, archived: nil, delay_window: nil, evaluation_window: nil, uses_ml_model: nil, uses_production_data: nil, uses_reference_dataset: nil, uses_training_dataset: nil, uses_validation_dataset: nil, request_options: {})
12
+ # @overload create(project_id, description:, name:, subtype:, thresholds:, type:, archived: nil, default_to_all_pipelines: nil, delay_window: nil, evaluation_window: nil, exclude_pipelines: nil, include_historical_data: nil, include_pipelines: nil, uses_ml_model: nil, uses_production_data: nil, uses_reference_dataset: nil, uses_training_dataset: nil, uses_validation_dataset: nil, request_options: {})
13
13
  #
14
14
  # @param project_id [String] The project id.
15
15
  #
@@ -25,10 +25,18 @@ module Openlayer
25
25
  #
26
26
  # @param archived [Boolean] Whether the test is archived.
27
27
  #
28
+ # @param default_to_all_pipelines [Boolean, nil] Whether to apply the test to all pipelines (data sources) or to a specific set o
29
+ #
28
30
  # @param delay_window [Float, nil] The delay window in seconds. Only applies to tests that use production data.
29
31
  #
30
32
  # @param evaluation_window [Float, nil] The evaluation window in seconds. Only applies to tests that use production data
31
33
  #
34
+ # @param exclude_pipelines [Array<String>, nil] Array of pipelines (data sources) to which the test should not be applied. Only
35
+ #
36
+ # @param include_historical_data [Boolean, nil] Whether to include historical data in the test result. Only applies to tests tha
37
+ #
38
+ # @param include_pipelines [Array<String>, nil] Array of pipelines (data sources) to which the test should be applied. Only appl
39
+ #
32
40
  # @param uses_ml_model [Boolean] Whether the test uses an ML model.
33
41
  #
34
42
  # @param uses_production_data [Boolean] Whether the test uses production data (monitoring mode only).
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Resources
5
+ class Tests
6
+ # Some parameter documentations has been truncated, see
7
+ # {Openlayer::Models::TestEvaluateParams} for more details.
8
+ #
9
+ # Triggers one-off evaluation of a specific monitoring test for a custom timestamp
10
+ # range. This allows evaluating tests for historical data or custom time periods
11
+ # outside the regular evaluation window schedule. It also allows overwriting the
12
+ # existing test results.
13
+ #
14
+ # @overload evaluate(test_id, end_timestamp:, start_timestamp:, inference_pipeline_id: nil, overwrite_results: nil, request_options: {})
15
+ #
16
+ # @param test_id [String] The test id.
17
+ #
18
+ # @param end_timestamp [Integer] End timestamp in seconds (Unix epoch)
19
+ #
20
+ # @param start_timestamp [Integer] Start timestamp in seconds (Unix epoch)
21
+ #
22
+ # @param inference_pipeline_id [String] ID of the inference pipeline to evaluate. If not provided, all inference pipelin
23
+ #
24
+ # @param overwrite_results [Boolean] Whether to overwrite existing test results
25
+ #
26
+ # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}, nil]
27
+ #
28
+ # @return [Openlayer::Models::TestEvaluateResponse]
29
+ #
30
+ # @see Openlayer::Models::TestEvaluateParams
31
+ def evaluate(test_id, params)
32
+ parsed, options = Openlayer::TestEvaluateParams.dump_request(params)
33
+ @client.request(
34
+ method: :post,
35
+ path: ["tests/%1$s/evaluate", test_id],
36
+ body: parsed,
37
+ model: Openlayer::Models::TestEvaluateResponse,
38
+ options: options
39
+ )
40
+ end
41
+
42
+ # @api private
43
+ #
44
+ # @param client [Openlayer::Client]
45
+ def initialize(client:)
46
+ @client = client
47
+ end
48
+ end
49
+ end
50
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Openlayer
4
- VERSION = "0.4.1"
4
+ VERSION = "0.6.0"
5
5
  end
data/lib/openlayer.rb CHANGED
@@ -3,12 +3,14 @@
3
3
  # Standard libraries.
4
4
  # rubocop:disable Lint/RedundantRequireStatement
5
5
  require "English"
6
+ require "base64"
6
7
  require "cgi"
7
8
  require "date"
8
9
  require "erb"
9
10
  require "etc"
10
11
  require "json"
11
12
  require "net/http"
13
+ require "openssl"
12
14
  require "pathname"
13
15
  require "rbconfig"
14
16
  require "securerandom"
@@ -85,6 +87,8 @@ require_relative "openlayer/models/projects/test_update_params"
85
87
  require_relative "openlayer/models/projects/test_update_response"
86
88
  require_relative "openlayer/models/storage/presigned_url_create_params"
87
89
  require_relative "openlayer/models/storage/presigned_url_create_response"
90
+ require_relative "openlayer/models/test_evaluate_params"
91
+ require_relative "openlayer/models/test_evaluate_response"
88
92
  require_relative "openlayer/models"
89
93
  require_relative "openlayer/resources/commits"
90
94
  require_relative "openlayer/resources/commits/test_results"
@@ -98,3 +102,4 @@ require_relative "openlayer/resources/projects/inference_pipelines"
98
102
  require_relative "openlayer/resources/projects/tests"
99
103
  require_relative "openlayer/resources/storage"
100
104
  require_relative "openlayer/resources/storage/presigned_url"
105
+ require_relative "openlayer/resources/tests"
data/manifest.yaml CHANGED
@@ -1,11 +1,13 @@
1
1
  dependencies:
2
2
  - English
3
+ - base64
3
4
  - cgi
4
5
  - date
5
6
  - erb
6
7
  - etc
7
8
  - json
8
9
  - net/http
10
+ - openssl
9
11
  - pathname
10
12
  - rbconfig
11
13
  - securerandom
@@ -25,6 +25,9 @@ module Openlayer
25
25
  sig { returns(Openlayer::Resources::Storage) }
26
26
  attr_reader :storage
27
27
 
28
+ sig { returns(Openlayer::Resources::Tests) }
29
+ attr_reader :tests
30
+
28
31
  # @api private
29
32
  sig { override.returns(T::Hash[String, String]) }
30
33
  private def auth_headers
@@ -176,6 +176,11 @@ module Openlayer
176
176
  private def auth_headers
177
177
  end
178
178
 
179
+ # @api private
180
+ sig { returns(String) }
181
+ private def user_agent
182
+ end
183
+
179
184
  # @api private
180
185
  sig { returns(String) }
181
186
  private def generate_idempotency_key
@@ -26,8 +26,12 @@ module Openlayer
26
26
 
27
27
  class << self
28
28
  # @api private
29
- sig { params(url: URI::Generic).returns(Net::HTTP) }
30
- def connect(url)
29
+ sig do
30
+ params(cert_store: OpenSSL::X509::Store, url: URI::Generic).returns(
31
+ Net::HTTP
32
+ )
33
+ end
34
+ def connect(cert_store:, url:)
31
35
  end
32
36
 
33
37
  # @api private
@@ -31,7 +31,7 @@ module Openlayer
31
31
  #
32
32
  # Assumes superclass fields are totally defined before fields are accessed /
33
33
  # defined on subclasses.
34
- sig { params(child: T.self_type).void }
34
+ sig { params(child: Openlayer::Internal::Type::BaseModel).void }
35
35
  def inherited(child)
36
36
  end
37
37
 
@@ -276,9 +276,13 @@ module Openlayer
276
276
 
277
277
  # Create a new instance of a model.
278
278
  sig do
279
- params(data: T.any(T::Hash[Symbol, T.anything], T.self_type)).returns(
280
- T.attached_class
281
- )
279
+ params(
280
+ data:
281
+ T.any(
282
+ T::Hash[Symbol, T.anything],
283
+ Openlayer::Internal::Type::BaseModel
284
+ )
285
+ ).returns(T.attached_class)
282
286
  end
283
287
  def self.new(data = {})
284
288
  end