Commit 6c5d5e9
authored
refactor: add
# Description
A small refactor moving validation logic for `publish_dataset` context
function to `DatasetPublishValidator` class. Once we merge this PR then
I can do changes to the validations so we can increase flexibility to
import datasets from the Hub.
I was bored of creating "helper functions" for counting queries for
database so I have added `count_by` function into our database models
mixin class. I hope it can be useful.
**Type of change**
- Refactor (change restructuring the codebase without changing
functionality)
**How Has This Been Tested**
- [x] Running test suite.
**Checklist**
- 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/)DatasetPublishValidator class (#5568)1 parent 9677435 commit 6c5d5e9
File tree
4 files changed
+34
-24
lines changed- argilla-server
- src/argilla_server
- contexts
- models
- validators
- tests/unit/api/handlers/v1
4 files changed
+34
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 148 | | |
159 | 149 | | |
160 | 150 | | |
| |||
163 | 153 | | |
164 | 154 | | |
165 | 155 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 156 | + | |
174 | 157 | | |
175 | 158 | | |
176 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
44 | 67 | | |
45 | 68 | | |
46 | 69 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4672 | 4672 | | |
4673 | 4673 | | |
4674 | 4674 | | |
4675 | | - | |
| 4675 | + | |
4676 | 4676 | | |
4677 | 4677 | | |
4678 | | - | |
| 4678 | + | |
4679 | 4679 | | |
4680 | 4680 | | |
4681 | 4681 | | |
| |||
4688 | 4688 | | |
4689 | 4689 | | |
4690 | 4690 | | |
4691 | | - | |
| 4691 | + | |
4692 | 4692 | | |
4693 | 4693 | | |
4694 | 4694 | | |
| |||
0 commit comments