pulp_hugging_face_client 0.2.2 → 0.3.1
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/README.md +4 -4
- data/docs/ContentHuggingFaceApi.md +6 -6
- data/docs/DistributionsHuggingFaceApi.md +4 -4
- data/docs/HuggingFaceHuggingFaceContent.md +2 -0
- data/docs/HuggingFaceHuggingFaceDistribution.md +2 -0
- data/docs/HuggingFaceHuggingFaceDistributionResponse.md +4 -0
- data/docs/HuggingFaceHuggingFaceRemote.md +6 -6
- data/docs/HuggingFaceHuggingFaceRemoteResponse.md +8 -8
- data/docs/HuggingFaceHuggingFaceRepository.md +2 -0
- data/docs/HuggingFaceHuggingFaceRepositoryResponse.md +2 -0
- data/docs/PatchedhuggingFaceHuggingFaceDistribution.md +2 -0
- data/docs/PatchedhuggingFaceHuggingFaceRemote.md +6 -6
- data/docs/PatchedhuggingFaceHuggingFaceRepository.md +2 -0
- data/docs/PublicationsHuggingFaceApi.md +2 -2
- data/docs/RepositoriesHuggingFaceApi.md +20 -4
- data/docs/RepositoryAddRemoveContent.md +3 -1
- data/lib/pulp_hugging_face_client/api/content_hugging_face_api.rb +6 -6
- data/lib/pulp_hugging_face_client/api/distributions_hugging_face_api.rb +4 -4
- data/lib/pulp_hugging_face_client/api/publications_hugging_face_api.rb +2 -2
- data/lib/pulp_hugging_face_client/api/repositories_hugging_face_api.rb +29 -5
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_content.rb +11 -1
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_distribution.rb +12 -1
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_distribution_response.rb +22 -1
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_remote.rb +48 -33
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_remote_response.rb +60 -45
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_repository.rb +42 -1
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_repository_response.rb +42 -1
- data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_distribution.rb +12 -1
- data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_remote.rb +48 -33
- data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_repository.rb +42 -1
- data/lib/pulp_hugging_face_client/models/repository_add_remove_content.rb +16 -4
- data/lib/pulp_hugging_face_client/models/set_label.rb +0 -11
- data/lib/pulp_hugging_face_client/models/set_label_response.rb +0 -21
- data/lib/pulp_hugging_face_client/models/unset_label.rb +0 -11
- data/lib/pulp_hugging_face_client/models/unset_label_response.rb +0 -21
- data/lib/pulp_hugging_face_client/version.rb +1 -1
- data/spec/api/content_hugging_face_api_spec.rb +3 -3
- data/spec/api/distributions_hugging_face_api_spec.rb +2 -2
- data/spec/api/publications_hugging_face_api_spec.rb +1 -1
- data/spec/api/repositories_hugging_face_api_spec.rb +10 -2
- data/spec/models/hugging_face_hugging_face_content_spec.rb +6 -0
- data/spec/models/hugging_face_hugging_face_distribution_response_spec.rb +12 -0
- data/spec/models/hugging_face_hugging_face_distribution_spec.rb +6 -0
- data/spec/models/hugging_face_hugging_face_remote_response_spec.rb +10 -10
- data/spec/models/hugging_face_hugging_face_remote_spec.rb +17 -17
- data/spec/models/hugging_face_hugging_face_repository_response_spec.rb +6 -0
- data/spec/models/hugging_face_hugging_face_repository_spec.rb +6 -0
- data/spec/models/patchedhugging_face_hugging_face_distribution_spec.rb +6 -0
- data/spec/models/patchedhugging_face_hugging_face_remote_spec.rb +17 -17
- data/spec/models/patchedhugging_face_hugging_face_repository_spec.rb +6 -0
- data/spec/models/repository_add_remove_content_spec.rb +6 -0
- metadata +30 -30
|
@@ -22,6 +22,11 @@ module PulpHuggingFaceClient
|
|
|
22
22
|
# The URL of an external content source.
|
|
23
23
|
attr_accessor :url
|
|
24
24
|
|
|
25
|
+
attr_accessor :pulp_labels
|
|
26
|
+
|
|
27
|
+
# The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'on_demand' enables pull-through caching. * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.
|
|
28
|
+
attr_accessor :policy
|
|
29
|
+
|
|
25
30
|
# A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
|
|
26
31
|
attr_accessor :ca_cert
|
|
27
32
|
|
|
@@ -49,17 +54,9 @@ module PulpHuggingFaceClient
|
|
|
49
54
|
# The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed.
|
|
50
55
|
attr_accessor :password
|
|
51
56
|
|
|
52
|
-
attr_accessor :pulp_labels
|
|
53
|
-
|
|
54
|
-
# Total number of simultaneous connections. If not set then the default value will be used.
|
|
55
|
-
attr_accessor :download_concurrency
|
|
56
|
-
|
|
57
57
|
# Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
|
|
58
58
|
attr_accessor :max_retries
|
|
59
59
|
|
|
60
|
-
# The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'on_demand' enables pull-through caching. * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.
|
|
61
|
-
attr_accessor :policy
|
|
62
|
-
|
|
63
60
|
# aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
|
|
64
61
|
attr_accessor :total_timeout
|
|
65
62
|
|
|
@@ -75,6 +72,9 @@ module PulpHuggingFaceClient
|
|
|
75
72
|
# Headers for aiohttp.Clientsession
|
|
76
73
|
attr_accessor :headers
|
|
77
74
|
|
|
75
|
+
# Total number of simultaneous connections. If not set then the default value will be used.
|
|
76
|
+
attr_accessor :download_concurrency
|
|
77
|
+
|
|
78
78
|
# Limits requests per second for each concurrent downloader
|
|
79
79
|
attr_accessor :rate_limit
|
|
80
80
|
|
|
@@ -111,6 +111,8 @@ module PulpHuggingFaceClient
|
|
|
111
111
|
{
|
|
112
112
|
:'name' => :'name',
|
|
113
113
|
:'url' => :'url',
|
|
114
|
+
:'pulp_labels' => :'pulp_labels',
|
|
115
|
+
:'policy' => :'policy',
|
|
114
116
|
:'ca_cert' => :'ca_cert',
|
|
115
117
|
:'client_cert' => :'client_cert',
|
|
116
118
|
:'client_key' => :'client_key',
|
|
@@ -120,15 +122,13 @@ module PulpHuggingFaceClient
|
|
|
120
122
|
:'proxy_password' => :'proxy_password',
|
|
121
123
|
:'username' => :'username',
|
|
122
124
|
:'password' => :'password',
|
|
123
|
-
:'pulp_labels' => :'pulp_labels',
|
|
124
|
-
:'download_concurrency' => :'download_concurrency',
|
|
125
125
|
:'max_retries' => :'max_retries',
|
|
126
|
-
:'policy' => :'policy',
|
|
127
126
|
:'total_timeout' => :'total_timeout',
|
|
128
127
|
:'connect_timeout' => :'connect_timeout',
|
|
129
128
|
:'sock_connect_timeout' => :'sock_connect_timeout',
|
|
130
129
|
:'sock_read_timeout' => :'sock_read_timeout',
|
|
131
130
|
:'headers' => :'headers',
|
|
131
|
+
:'download_concurrency' => :'download_concurrency',
|
|
132
132
|
:'rate_limit' => :'rate_limit',
|
|
133
133
|
:'hf_hub_url' => :'hf_hub_url',
|
|
134
134
|
:'hf_token' => :'hf_token'
|
|
@@ -145,6 +145,8 @@ module PulpHuggingFaceClient
|
|
|
145
145
|
{
|
|
146
146
|
:'name' => :'String',
|
|
147
147
|
:'url' => :'String',
|
|
148
|
+
:'pulp_labels' => :'Hash<String, String>',
|
|
149
|
+
:'policy' => :'PolicyEnum',
|
|
148
150
|
:'ca_cert' => :'String',
|
|
149
151
|
:'client_cert' => :'String',
|
|
150
152
|
:'client_key' => :'String',
|
|
@@ -154,15 +156,13 @@ module PulpHuggingFaceClient
|
|
|
154
156
|
:'proxy_password' => :'String',
|
|
155
157
|
:'username' => :'String',
|
|
156
158
|
:'password' => :'String',
|
|
157
|
-
:'pulp_labels' => :'Hash<String, String>',
|
|
158
|
-
:'download_concurrency' => :'Integer',
|
|
159
159
|
:'max_retries' => :'Integer',
|
|
160
|
-
:'policy' => :'PolicyEnum',
|
|
161
160
|
:'total_timeout' => :'Float',
|
|
162
161
|
:'connect_timeout' => :'Float',
|
|
163
162
|
:'sock_connect_timeout' => :'Float',
|
|
164
163
|
:'sock_read_timeout' => :'Float',
|
|
165
164
|
:'headers' => :'Array<Object>',
|
|
165
|
+
:'download_concurrency' => :'Integer',
|
|
166
166
|
:'rate_limit' => :'Integer',
|
|
167
167
|
:'hf_hub_url' => :'String',
|
|
168
168
|
:'hf_token' => :'String'
|
|
@@ -180,12 +180,12 @@ module PulpHuggingFaceClient
|
|
|
180
180
|
:'proxy_password',
|
|
181
181
|
:'username',
|
|
182
182
|
:'password',
|
|
183
|
-
:'download_concurrency',
|
|
184
183
|
:'max_retries',
|
|
185
184
|
:'total_timeout',
|
|
186
185
|
:'connect_timeout',
|
|
187
186
|
:'sock_connect_timeout',
|
|
188
187
|
:'sock_read_timeout',
|
|
188
|
+
:'download_concurrency',
|
|
189
189
|
:'rate_limit',
|
|
190
190
|
:'hf_token'
|
|
191
191
|
])
|
|
@@ -214,6 +214,16 @@ module PulpHuggingFaceClient
|
|
|
214
214
|
self.url = attributes[:'url']
|
|
215
215
|
end
|
|
216
216
|
|
|
217
|
+
if attributes.key?(:'pulp_labels')
|
|
218
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
219
|
+
self.pulp_labels = value
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'policy')
|
|
224
|
+
self.policy = attributes[:'policy']
|
|
225
|
+
end
|
|
226
|
+
|
|
217
227
|
if attributes.key?(:'ca_cert')
|
|
218
228
|
self.ca_cert = attributes[:'ca_cert']
|
|
219
229
|
end
|
|
@@ -250,24 +260,10 @@ module PulpHuggingFaceClient
|
|
|
250
260
|
self.password = attributes[:'password']
|
|
251
261
|
end
|
|
252
262
|
|
|
253
|
-
if attributes.key?(:'pulp_labels')
|
|
254
|
-
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
255
|
-
self.pulp_labels = value
|
|
256
|
-
end
|
|
257
|
-
end
|
|
258
|
-
|
|
259
|
-
if attributes.key?(:'download_concurrency')
|
|
260
|
-
self.download_concurrency = attributes[:'download_concurrency']
|
|
261
|
-
end
|
|
262
|
-
|
|
263
263
|
if attributes.key?(:'max_retries')
|
|
264
264
|
self.max_retries = attributes[:'max_retries']
|
|
265
265
|
end
|
|
266
266
|
|
|
267
|
-
if attributes.key?(:'policy')
|
|
268
|
-
self.policy = attributes[:'policy']
|
|
269
|
-
end
|
|
270
|
-
|
|
271
267
|
if attributes.key?(:'total_timeout')
|
|
272
268
|
self.total_timeout = attributes[:'total_timeout']
|
|
273
269
|
end
|
|
@@ -290,6 +286,10 @@ module PulpHuggingFaceClient
|
|
|
290
286
|
end
|
|
291
287
|
end
|
|
292
288
|
|
|
289
|
+
if attributes.key?(:'download_concurrency')
|
|
290
|
+
self.download_concurrency = attributes[:'download_concurrency']
|
|
291
|
+
end
|
|
292
|
+
|
|
293
293
|
if attributes.key?(:'rate_limit')
|
|
294
294
|
self.rate_limit = attributes[:'rate_limit']
|
|
295
295
|
end
|
|
@@ -366,6 +366,10 @@ module PulpHuggingFaceClient
|
|
|
366
366
|
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
|
367
367
|
end
|
|
368
368
|
|
|
369
|
+
if !@download_concurrency.nil? && @download_concurrency < 1
|
|
370
|
+
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
|
371
|
+
end
|
|
372
|
+
|
|
369
373
|
if !@hf_hub_url.nil? && @hf_hub_url.to_s.length < 1
|
|
370
374
|
invalid_properties.push('invalid value for "hf_hub_url", the character length must be great than or equal to 1.')
|
|
371
375
|
end
|
|
@@ -391,6 +395,7 @@ module PulpHuggingFaceClient
|
|
|
391
395
|
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
392
396
|
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
393
397
|
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
398
|
+
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
|
394
399
|
return false if !@hf_hub_url.nil? && @hf_hub_url.to_s.length < 1
|
|
395
400
|
true
|
|
396
401
|
end
|
|
@@ -543,6 +548,16 @@ module PulpHuggingFaceClient
|
|
|
543
548
|
@sock_read_timeout = sock_read_timeout
|
|
544
549
|
end
|
|
545
550
|
|
|
551
|
+
# Custom attribute writer method with validation
|
|
552
|
+
# @param [Object] download_concurrency Value to be assigned
|
|
553
|
+
def download_concurrency=(download_concurrency)
|
|
554
|
+
if !download_concurrency.nil? && download_concurrency < 1
|
|
555
|
+
fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
@download_concurrency = download_concurrency
|
|
559
|
+
end
|
|
560
|
+
|
|
546
561
|
# Custom attribute writer method with validation
|
|
547
562
|
# @param [Object] hf_hub_url Value to be assigned
|
|
548
563
|
def hf_hub_url=(hf_hub_url)
|
|
@@ -564,6 +579,8 @@ module PulpHuggingFaceClient
|
|
|
564
579
|
self.class == o.class &&
|
|
565
580
|
name == o.name &&
|
|
566
581
|
url == o.url &&
|
|
582
|
+
pulp_labels == o.pulp_labels &&
|
|
583
|
+
policy == o.policy &&
|
|
567
584
|
ca_cert == o.ca_cert &&
|
|
568
585
|
client_cert == o.client_cert &&
|
|
569
586
|
client_key == o.client_key &&
|
|
@@ -573,15 +590,13 @@ module PulpHuggingFaceClient
|
|
|
573
590
|
proxy_password == o.proxy_password &&
|
|
574
591
|
username == o.username &&
|
|
575
592
|
password == o.password &&
|
|
576
|
-
pulp_labels == o.pulp_labels &&
|
|
577
|
-
download_concurrency == o.download_concurrency &&
|
|
578
593
|
max_retries == o.max_retries &&
|
|
579
|
-
policy == o.policy &&
|
|
580
594
|
total_timeout == o.total_timeout &&
|
|
581
595
|
connect_timeout == o.connect_timeout &&
|
|
582
596
|
sock_connect_timeout == o.sock_connect_timeout &&
|
|
583
597
|
sock_read_timeout == o.sock_read_timeout &&
|
|
584
598
|
headers == o.headers &&
|
|
599
|
+
download_concurrency == o.download_concurrency &&
|
|
585
600
|
rate_limit == o.rate_limit &&
|
|
586
601
|
hf_hub_url == o.hf_hub_url &&
|
|
587
602
|
hf_token == o.hf_token
|
|
@@ -596,7 +611,7 @@ module PulpHuggingFaceClient
|
|
|
596
611
|
# Calculates hash code according to all attributes.
|
|
597
612
|
# @return [Integer] Hash code
|
|
598
613
|
def hash
|
|
599
|
-
[name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password,
|
|
614
|
+
[name, url, pulp_labels, policy, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password, max_retries, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, download_concurrency, rate_limit, hf_hub_url, hf_token].hash
|
|
600
615
|
end
|
|
601
616
|
|
|
602
617
|
# Builds the object from hash
|
|
@@ -27,6 +27,9 @@ module PulpHuggingFaceClient
|
|
|
27
27
|
# Retain X versions of the repository. Default is null which retains all versions.
|
|
28
28
|
attr_accessor :retain_repo_versions
|
|
29
29
|
|
|
30
|
+
# Retain X checkpoint publications for the repository. Default is null which retains all checkpoints.
|
|
31
|
+
attr_accessor :retain_checkpoints
|
|
32
|
+
|
|
30
33
|
# An optional remote to use by default when syncing.
|
|
31
34
|
attr_accessor :remote
|
|
32
35
|
|
|
@@ -37,6 +40,7 @@ module PulpHuggingFaceClient
|
|
|
37
40
|
:'name' => :'name',
|
|
38
41
|
:'description' => :'description',
|
|
39
42
|
:'retain_repo_versions' => :'retain_repo_versions',
|
|
43
|
+
:'retain_checkpoints' => :'retain_checkpoints',
|
|
40
44
|
:'remote' => :'remote'
|
|
41
45
|
}
|
|
42
46
|
end
|
|
@@ -53,6 +57,7 @@ module PulpHuggingFaceClient
|
|
|
53
57
|
:'name' => :'String',
|
|
54
58
|
:'description' => :'String',
|
|
55
59
|
:'retain_repo_versions' => :'Integer',
|
|
60
|
+
:'retain_checkpoints' => :'Integer',
|
|
56
61
|
:'remote' => :'String'
|
|
57
62
|
}
|
|
58
63
|
end
|
|
@@ -62,6 +67,7 @@ module PulpHuggingFaceClient
|
|
|
62
67
|
Set.new([
|
|
63
68
|
:'description',
|
|
64
69
|
:'retain_repo_versions',
|
|
70
|
+
:'retain_checkpoints',
|
|
65
71
|
:'remote'
|
|
66
72
|
])
|
|
67
73
|
end
|
|
@@ -99,6 +105,10 @@ module PulpHuggingFaceClient
|
|
|
99
105
|
self.retain_repo_versions = attributes[:'retain_repo_versions']
|
|
100
106
|
end
|
|
101
107
|
|
|
108
|
+
if attributes.key?(:'retain_checkpoints')
|
|
109
|
+
self.retain_checkpoints = attributes[:'retain_checkpoints']
|
|
110
|
+
end
|
|
111
|
+
|
|
102
112
|
if attributes.key?(:'remote')
|
|
103
113
|
self.remote = attributes[:'remote']
|
|
104
114
|
end
|
|
@@ -117,6 +127,14 @@ module PulpHuggingFaceClient
|
|
|
117
127
|
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
|
118
128
|
end
|
|
119
129
|
|
|
130
|
+
if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
|
131
|
+
invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if !@retain_checkpoints.nil? && @retain_checkpoints < 1
|
|
135
|
+
invalid_properties.push('invalid value for "retain_checkpoints", must be greater than or equal to 1.')
|
|
136
|
+
end
|
|
137
|
+
|
|
120
138
|
invalid_properties
|
|
121
139
|
end
|
|
122
140
|
|
|
@@ -126,6 +144,8 @@ module PulpHuggingFaceClient
|
|
|
126
144
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
127
145
|
return false if !@name.nil? && @name.to_s.length < 1
|
|
128
146
|
return false if !@description.nil? && @description.to_s.length < 1
|
|
147
|
+
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
|
148
|
+
return false if !@retain_checkpoints.nil? && @retain_checkpoints < 1
|
|
129
149
|
true
|
|
130
150
|
end
|
|
131
151
|
|
|
@@ -153,6 +173,26 @@ module PulpHuggingFaceClient
|
|
|
153
173
|
@description = description
|
|
154
174
|
end
|
|
155
175
|
|
|
176
|
+
# Custom attribute writer method with validation
|
|
177
|
+
# @param [Object] retain_repo_versions Value to be assigned
|
|
178
|
+
def retain_repo_versions=(retain_repo_versions)
|
|
179
|
+
if !retain_repo_versions.nil? && retain_repo_versions < 1
|
|
180
|
+
fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
@retain_repo_versions = retain_repo_versions
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Custom attribute writer method with validation
|
|
187
|
+
# @param [Object] retain_checkpoints Value to be assigned
|
|
188
|
+
def retain_checkpoints=(retain_checkpoints)
|
|
189
|
+
if !retain_checkpoints.nil? && retain_checkpoints < 1
|
|
190
|
+
fail ArgumentError, 'invalid value for "retain_checkpoints", must be greater than or equal to 1.'
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
@retain_checkpoints = retain_checkpoints
|
|
194
|
+
end
|
|
195
|
+
|
|
156
196
|
# Checks equality by comparing each attribute.
|
|
157
197
|
# @param [Object] Object to be compared
|
|
158
198
|
def ==(o)
|
|
@@ -162,6 +202,7 @@ module PulpHuggingFaceClient
|
|
|
162
202
|
name == o.name &&
|
|
163
203
|
description == o.description &&
|
|
164
204
|
retain_repo_versions == o.retain_repo_versions &&
|
|
205
|
+
retain_checkpoints == o.retain_checkpoints &&
|
|
165
206
|
remote == o.remote
|
|
166
207
|
end
|
|
167
208
|
|
|
@@ -174,7 +215,7 @@ module PulpHuggingFaceClient
|
|
|
174
215
|
# Calculates hash code according to all attributes.
|
|
175
216
|
# @return [Integer] Hash code
|
|
176
217
|
def hash
|
|
177
|
-
[pulp_labels, name, description, retain_repo_versions, remote].hash
|
|
218
|
+
[pulp_labels, name, description, retain_repo_versions, retain_checkpoints, remote].hash
|
|
178
219
|
end
|
|
179
220
|
|
|
180
221
|
# Builds the object from hash
|
|
@@ -25,12 +25,16 @@ module PulpHuggingFaceClient
|
|
|
25
25
|
# A repository version whose content will be used as the initial set of content for the new repository version
|
|
26
26
|
attr_accessor :base_version
|
|
27
27
|
|
|
28
|
+
# When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Defaults to true.
|
|
29
|
+
attr_accessor :overwrite
|
|
30
|
+
|
|
28
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
32
|
def self.attribute_map
|
|
30
33
|
{
|
|
31
34
|
:'add_content_units' => :'add_content_units',
|
|
32
35
|
:'remove_content_units' => :'remove_content_units',
|
|
33
|
-
:'base_version' => :'base_version'
|
|
36
|
+
:'base_version' => :'base_version',
|
|
37
|
+
:'overwrite' => :'overwrite'
|
|
34
38
|
}
|
|
35
39
|
end
|
|
36
40
|
|
|
@@ -44,7 +48,8 @@ module PulpHuggingFaceClient
|
|
|
44
48
|
{
|
|
45
49
|
:'add_content_units' => :'Array<String>',
|
|
46
50
|
:'remove_content_units' => :'Array<String>',
|
|
47
|
-
:'base_version' => :'String'
|
|
51
|
+
:'base_version' => :'String',
|
|
52
|
+
:'overwrite' => :'Boolean'
|
|
48
53
|
}
|
|
49
54
|
end
|
|
50
55
|
|
|
@@ -84,6 +89,12 @@ module PulpHuggingFaceClient
|
|
|
84
89
|
if attributes.key?(:'base_version')
|
|
85
90
|
self.base_version = attributes[:'base_version']
|
|
86
91
|
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'overwrite')
|
|
94
|
+
self.overwrite = attributes[:'overwrite']
|
|
95
|
+
else
|
|
96
|
+
self.overwrite = true
|
|
97
|
+
end
|
|
87
98
|
end
|
|
88
99
|
|
|
89
100
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -108,7 +119,8 @@ module PulpHuggingFaceClient
|
|
|
108
119
|
self.class == o.class &&
|
|
109
120
|
add_content_units == o.add_content_units &&
|
|
110
121
|
remove_content_units == o.remove_content_units &&
|
|
111
|
-
base_version == o.base_version
|
|
122
|
+
base_version == o.base_version &&
|
|
123
|
+
overwrite == o.overwrite
|
|
112
124
|
end
|
|
113
125
|
|
|
114
126
|
# @see the `==` method
|
|
@@ -120,7 +132,7 @@ module PulpHuggingFaceClient
|
|
|
120
132
|
# Calculates hash code according to all attributes.
|
|
121
133
|
# @return [Integer] Hash code
|
|
122
134
|
def hash
|
|
123
|
-
[add_content_units, remove_content_units, base_version].hash
|
|
135
|
+
[add_content_units, remove_content_units, base_version, overwrite].hash
|
|
124
136
|
end
|
|
125
137
|
|
|
126
138
|
# Builds the object from hash
|
|
@@ -89,11 +89,6 @@ module PulpHuggingFaceClient
|
|
|
89
89
|
invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.')
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
93
|
-
if @key !~ pattern
|
|
94
|
-
invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
|
|
95
|
-
end
|
|
96
|
-
|
|
97
92
|
invalid_properties
|
|
98
93
|
end
|
|
99
94
|
|
|
@@ -103,7 +98,6 @@ module PulpHuggingFaceClient
|
|
|
103
98
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
104
99
|
return false if @key.nil?
|
|
105
100
|
return false if @key.to_s.length < 1
|
|
106
|
-
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
107
101
|
true
|
|
108
102
|
end
|
|
109
103
|
|
|
@@ -118,11 +112,6 @@ module PulpHuggingFaceClient
|
|
|
118
112
|
fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.'
|
|
119
113
|
end
|
|
120
114
|
|
|
121
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
122
|
-
if key !~ pattern
|
|
123
|
-
fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
|
|
124
|
-
end
|
|
125
|
-
|
|
126
115
|
@key = key
|
|
127
116
|
end
|
|
128
117
|
|
|
@@ -85,11 +85,6 @@ module PulpHuggingFaceClient
|
|
|
85
85
|
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
89
|
-
if @key !~ pattern
|
|
90
|
-
invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
|
|
91
|
-
end
|
|
92
|
-
|
|
93
88
|
invalid_properties
|
|
94
89
|
end
|
|
95
90
|
|
|
@@ -98,25 +93,9 @@ module PulpHuggingFaceClient
|
|
|
98
93
|
def valid?
|
|
99
94
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
100
95
|
return false if @key.nil?
|
|
101
|
-
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
102
96
|
true
|
|
103
97
|
end
|
|
104
98
|
|
|
105
|
-
# Custom attribute writer method with validation
|
|
106
|
-
# @param [Object] key Value to be assigned
|
|
107
|
-
def key=(key)
|
|
108
|
-
if key.nil?
|
|
109
|
-
fail ArgumentError, 'key cannot be nil'
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
113
|
-
if key !~ pattern
|
|
114
|
-
fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
@key = key
|
|
118
|
-
end
|
|
119
|
-
|
|
120
99
|
# Checks equality by comparing each attribute.
|
|
121
100
|
# @param [Object] Object to be compared
|
|
122
101
|
def ==(o)
|
|
@@ -78,11 +78,6 @@ module PulpHuggingFaceClient
|
|
|
78
78
|
invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.')
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
82
|
-
if @key !~ pattern
|
|
83
|
-
invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
|
|
84
|
-
end
|
|
85
|
-
|
|
86
81
|
invalid_properties
|
|
87
82
|
end
|
|
88
83
|
|
|
@@ -92,7 +87,6 @@ module PulpHuggingFaceClient
|
|
|
92
87
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
88
|
return false if @key.nil?
|
|
94
89
|
return false if @key.to_s.length < 1
|
|
95
|
-
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
96
90
|
true
|
|
97
91
|
end
|
|
98
92
|
|
|
@@ -107,11 +101,6 @@ module PulpHuggingFaceClient
|
|
|
107
101
|
fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.'
|
|
108
102
|
end
|
|
109
103
|
|
|
110
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
111
|
-
if key !~ pattern
|
|
112
|
-
fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
|
|
113
|
-
end
|
|
114
|
-
|
|
115
104
|
@key = key
|
|
116
105
|
end
|
|
117
106
|
|
|
@@ -82,11 +82,6 @@ module PulpHuggingFaceClient
|
|
|
82
82
|
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
86
|
-
if @key !~ pattern
|
|
87
|
-
invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
|
|
88
|
-
end
|
|
89
|
-
|
|
90
85
|
invalid_properties
|
|
91
86
|
end
|
|
92
87
|
|
|
@@ -95,25 +90,9 @@ module PulpHuggingFaceClient
|
|
|
95
90
|
def valid?
|
|
96
91
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
97
92
|
return false if @key.nil?
|
|
98
|
-
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
99
93
|
true
|
|
100
94
|
end
|
|
101
95
|
|
|
102
|
-
# Custom attribute writer method with validation
|
|
103
|
-
# @param [Object] key Value to be assigned
|
|
104
|
-
def key=(key)
|
|
105
|
-
if key.nil?
|
|
106
|
-
fail ArgumentError, 'key cannot be nil'
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
|
110
|
-
if key !~ pattern
|
|
111
|
-
fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
@key = key
|
|
115
|
-
end
|
|
116
|
-
|
|
117
96
|
# Checks equality by comparing each attribute.
|
|
118
97
|
# @param [Object] Object to be compared
|
|
119
98
|
def ==(o)
|
|
@@ -62,9 +62,9 @@ describe 'ContentHuggingFaceApi' do
|
|
|
62
62
|
# @option opts [String] :relative_path Filter results where relative_path matches value
|
|
63
63
|
# @option opts [String] :repo_id Filter results where repo_id matches value
|
|
64
64
|
# @option opts [String] :repo_type Filter results where repo_type matches value * `models` - Models * `datasets` - Datasets * `spaces` - Spaces
|
|
65
|
-
# @option opts [String] :repository_version
|
|
66
|
-
# @option opts [String] :repository_version_added
|
|
67
|
-
# @option opts [String] :repository_version_removed
|
|
65
|
+
# @option opts [String] :repository_version
|
|
66
|
+
# @option opts [String] :repository_version_added
|
|
67
|
+
# @option opts [String] :repository_version_removed
|
|
68
68
|
# @option opts [String] :revision Filter results where revision matches value
|
|
69
69
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
70
70
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
@@ -85,8 +85,8 @@ describe 'DistributionsHuggingFaceApi' do
|
|
|
85
85
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
86
86
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
87
87
|
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
88
|
-
# @option opts [String] :repository
|
|
89
|
-
# @option opts [Array<String>] :repository__in
|
|
88
|
+
# @option opts [String] :repository
|
|
89
|
+
# @option opts [Array<String>] :repository__in
|
|
90
90
|
# @option opts [String] :with_content Filter distributions based on the content served by them
|
|
91
91
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
92
92
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
@@ -81,7 +81,7 @@ describe 'PublicationsHuggingFaceApi' do
|
|
|
81
81
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
82
82
|
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
83
83
|
# @option opts [String] :repository Repository referenced by HREF/PRN
|
|
84
|
-
# @option opts [String] :repository_version
|
|
84
|
+
# @option opts [String] :repository_version
|
|
85
85
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
86
86
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
87
87
|
# @return [PaginatedhuggingFaceHuggingFacePublicationResponseList]
|
|
@@ -75,13 +75,21 @@ describe 'RepositoriesHuggingFaceApi' do
|
|
|
75
75
|
# @option opts [String] :name__regex Filter results where name matches regex value
|
|
76
76
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
|
77
77
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
78
|
-
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
78
|
+
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `retain_checkpoints` - Retain checkpoints * `-retain_checkpoints` - Retain checkpoints (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
79
79
|
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
80
80
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
81
81
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
82
82
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
83
83
|
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
84
|
-
# @option opts [String] :remote
|
|
84
|
+
# @option opts [String] :remote
|
|
85
|
+
# @option opts [Integer] :retain_checkpoints Filter results where retain_checkpoints matches value
|
|
86
|
+
# @option opts [Integer] :retain_checkpoints__gt Filter results where retain_checkpoints is greater than value
|
|
87
|
+
# @option opts [Integer] :retain_checkpoints__gte Filter results where retain_checkpoints is greater than or equal to value
|
|
88
|
+
# @option opts [Boolean] :retain_checkpoints__isnull Filter results where retain_checkpoints has a null value
|
|
89
|
+
# @option opts [Integer] :retain_checkpoints__lt Filter results where retain_checkpoints is less than value
|
|
90
|
+
# @option opts [Integer] :retain_checkpoints__lte Filter results where retain_checkpoints is less than or equal to value
|
|
91
|
+
# @option opts [Integer] :retain_checkpoints__ne Filter results where retain_checkpoints not equal to value
|
|
92
|
+
# @option opts [Array<Integer>] :retain_checkpoints__range Filter results where retain_checkpoints is between two comma separated values
|
|
85
93
|
# @option opts [Integer] :retain_repo_versions Filter results where retain_repo_versions matches value
|
|
86
94
|
# @option opts [Integer] :retain_repo_versions__gt Filter results where retain_repo_versions is greater than value
|
|
87
95
|
# @option opts [Integer] :retain_repo_versions__gte Filter results where retain_repo_versions is greater than or equal to value
|
|
@@ -33,6 +33,12 @@ describe PulpHuggingFaceClient::HuggingFaceHuggingFaceContent do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "overwrite"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
describe 'test attribute "pulp_labels"' do
|
|
37
43
|
it 'should work' do
|
|
38
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -69,6 +69,12 @@ describe PulpHuggingFaceClient::HuggingFaceHuggingFaceDistributionResponse do
|
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
describe 'test attribute "content_guard_prn"' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
72
78
|
describe 'test attribute "no_content_change_since"' do
|
|
73
79
|
it 'should work' do
|
|
74
80
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -99,6 +105,12 @@ describe PulpHuggingFaceClient::HuggingFaceHuggingFaceDistributionResponse do
|
|
|
99
105
|
end
|
|
100
106
|
end
|
|
101
107
|
|
|
108
|
+
describe 'test attribute "repository_version"' do
|
|
109
|
+
it 'should work' do
|
|
110
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
102
114
|
describe 'test attribute "publication"' do
|
|
103
115
|
it 'should work' do
|
|
104
116
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -63,6 +63,12 @@ describe PulpHuggingFaceClient::HuggingFaceHuggingFaceDistribution do
|
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
+
describe 'test attribute "repository_version"' do
|
|
67
|
+
it 'should work' do
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
66
72
|
describe 'test attribute "publication"' do
|
|
67
73
|
it 'should work' do
|
|
68
74
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|