Commit ca10fde
authored
[editor] Added support for displaying and editing
Currently those features are not observable or editable in the editor,
but they are important to give clearer meaning to the records and
fields.
- For now the RecordSet dataTypes are shown in 1 text box with each data
type separated by a comma. It could be changed to a button and multiple
fields, but that would be a lot more code without necessarily be more
readable, let us know how do you feel. Ideally there should be some kind
of autocomplete combobox that takes multiples values, with a predefined
list of types to select from, and still the possibility to add any types
the user wants. But we could not find such component for now, so we went
for the simpler solution.
- The `equivalentProperty` has been added right after the Field dataType
in the table on the left side in the Record Sets tab, as well as in the
field details on the right side. We can remove it from the left side
table if you feel it is too much and should only be shown in the details
Doing so made us realize some confusing things with the editor example,
e.g. with the titanic dataset the RecordSets `genders` and
`embarkation_ports` have the type https://schema.org/Enumeration but the
checkbox "The RecordSet is an enumeration" is not checked. Wouldn't it
make sense to be automatically checked in this case?
We did this during a short hackathon at the https://www.swat4ls.org/
conference (semantic web for life sciences).
It is a beginning of answer to this issue:
#739 raised by @benjelloun
A lot of people in our community (semantic web for life science
research) are interested by the features requested in this issue
We followed the official specs definition for `RecordSet` and `Field`:
https://docs.mlcommons.org/croissant/docs/croissant-spec.html#field
We tested the new features using the docker deployment locally and they
work as expected. RecordSet Data types and Field equivalentProperty are
properly added to the exported JSON-LD file
It was done with @vemonet
Also note that in the code for `Field` you use camelcase
`equivalentProperty` instead of the usual snake case that is used
elsewhere, might want to fix this for overall consistency
https://github.com/mlcommons/croissant/blob/main/python/mlcroissant/mlcroissant/_src/structure_graph/nodes/field.py#L71RecordSet data types and Field equivalentProperty (#819)1 parent 87866ec commit ca10fde
File tree
5 files changed
+46
-1
lines changed- editor
- core
- events
- views
5 files changed
+46
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| 99 | + | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
| 205 | + | |
203 | 206 | | |
204 | 207 | | |
205 | 208 | | |
| |||
217 | 220 | | |
218 | 221 | | |
219 | 222 | | |
| 223 | + | |
220 | 224 | | |
221 | 225 | | |
222 | 226 | | |
| |||
273 | 277 | | |
274 | 278 | | |
275 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
276 | 295 | | |
277 | 296 | | |
278 | 297 | | |
| |||
350 | 369 | | |
351 | 370 | | |
352 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
353 | 375 | | |
354 | 376 | | |
355 | 377 | | |
| |||
386 | 408 | | |
387 | 409 | | |
388 | 410 | | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
389 | 416 | | |
390 | 417 | | |
391 | 418 | | |
| |||
469 | 496 | | |
470 | 497 | | |
471 | 498 | | |
472 | | - | |
| 499 | + | |
473 | 500 | | |
474 | 501 | | |
475 | 502 | | |
| |||
521 | 548 | | |
522 | 549 | | |
523 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
524 | 561 | | |
525 | 562 | | |
526 | 563 | | |
| |||
0 commit comments