Commit 1a34f54
authored
[BUGFIX]
# Description
<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. List any
dependencies that are required for this change. -->
In some environments, working with enun instances as string values may
lead to some validation errors. See [this discord
discussion](https://discord.com/channels/879548962464493619/1300936213531983882/1300936213531983882).
This PR reviews how metadata settings classes are defined, and defines
type directly as a literal string, in the same way we do fo questions or
fields, instead of using the MetadataPropertyType class.
**Type of change**
<!-- Please delete options that are not relevant. Remember to title the
PR according to the type of change -->
- Bug fix (non-breaking change which fixes an issue)
- Refactor (change restructuring the codebase without changing
functionality)
**How Has This Been Tested**
<!-- Please add some reference about how your feature has been tested.
-->
**Checklist**
<!-- Please go over the list and make sure you've taken everything into
account -->
- I added relevant documentation
- I followed the style guidelines of this project
- I did a self-review of my code
- I made corresponding changes to the documentation
- I confirm My changes generate no new warnings
- I have added tests that prove my fix is effective or that my feature
works
- I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)argilla: prevent enum literal validation errors (#5679)1 parent 0cbbdeb commit 1a34f54
File tree
4 files changed
+18
-50
lines changed- argilla
- src/argilla
- _models
- _settings
- settings
- tests/unit/test_settings
4 files changed
+18
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 24 | | |
32 | | - | |
33 | 25 | | |
34 | 26 | | |
35 | 27 | | |
36 | 28 | | |
37 | | - | |
| 29 | + | |
38 | 30 | | |
39 | 31 | | |
40 | 32 | | |
| |||
64 | 56 | | |
65 | 57 | | |
66 | 58 | | |
67 | | - | |
| 59 | + | |
68 | 60 | | |
69 | 61 | | |
70 | 62 | | |
| |||
78 | 70 | | |
79 | 71 | | |
80 | 72 | | |
81 | | - | |
| 73 | + | |
82 | 74 | | |
83 | 75 | | |
84 | 76 | | |
| |||
97 | 89 | | |
98 | 90 | | |
99 | 91 | | |
100 | | - | |
101 | 92 | | |
102 | 93 | | |
103 | 94 | | |
104 | 95 | | |
105 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
106 | 101 | | |
107 | 102 | | |
108 | 103 | | |
| |||
112 | 107 | | |
113 | 108 | | |
114 | 109 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
122 | 121 | | |
123 | 122 | | |
124 | 123 | | |
125 | | - | |
| 124 | + | |
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
131 | | - | |
132 | 130 | | |
133 | 131 | | |
134 | 132 | | |
| |||
176 | 174 | | |
177 | 175 | | |
178 | 176 | | |
179 | | - | |
| 177 | + | |
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
183 | 181 | | |
184 | 182 | | |
185 | | - | |
186 | 183 | | |
187 | 184 | | |
188 | 185 | | |
| |||
237 | 234 | | |
238 | 235 | | |
239 | 236 | | |
240 | | - | |
| 237 | + | |
241 | 238 | | |
242 | 239 | | |
243 | 240 | | |
244 | 241 | | |
245 | 242 | | |
246 | | - | |
247 | 243 | | |
248 | 244 | | |
249 | 245 | | |
| |||
283 | 279 | | |
284 | 280 | | |
285 | 281 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
296 | 289 | | |
297 | 290 | | |
298 | 291 | | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
| 292 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | | - | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
| |||
0 commit comments