|
128 | 128 | { |
129 | 129 | "cell_type": "code", |
130 | 130 | "execution_count": 4, |
131 | | - "id": "d6837d44-1064-4d0b-aa37-09df20f5bbb8", |
| 131 | + "id": "1ff37233-79f8-4da2-92d3-a705281520ba", |
132 | 132 | "metadata": {}, |
133 | 133 | "outputs": [ |
134 | 134 | { |
135 | | - "name": "stderr", |
136 | | - "output_type": "stream", |
137 | | - "text": [ |
138 | | - "C:\\Users\\da4323\\Documents\\programming\\GitHub\\h5RDMtoolbox\\h5rdmtoolbox\\conventions\\standard_attributes.py:297: StandardAttributeValidationWarning: The attribute \"creator\" could not be validated due to: 1 validation error for personOrOrganization\n", |
139 | | - "role.value\n", |
140 | | - " Input should be a valid string [type=string_type, input_value={'value': 'Researcher'}, input_type=dict]\n", |
141 | | - " For further information visit https://errors.pydantic.dev/2.3/v/string_type\n", |
142 | | - " warnings.warn(f'The attribute \"{self.name}\" could not be validated due to: {err}',\n", |
143 | | - "C:\\Users\\da4323\\Documents\\programming\\GitHub\\h5RDMtoolbox\\h5rdmtoolbox\\conventions\\standard_attributes.py:297: StandardAttributeValidationWarning: The attribute \"pid\" could not be validated due to: 1 validation error for pid\n", |
144 | | - "type.value\n", |
145 | | - " Input should be a valid string [type=string_type, input_value={'value': 'other'}, input_type=dict]\n", |
146 | | - " For further information visit https://errors.pydantic.dev/2.3/v/string_type\n", |
147 | | - " warnings.warn(f'The attribute \"{self.name}\" could not be validated due to: {err}',\n" |
148 | | - ] |
149 | | - }, |
| 135 | + "data": { |
| 136 | + "text/plain": [ |
| 137 | + "personOrOrganization(name='Matthias Probst', givenName=None, familyName=None, address=None, affiliation=None, email=None, id='https://orcid.org/0000-0001-8729-0482', role=contributorType(value=<contributorType.Researcher: 'Researcher'>))" |
| 138 | + ] |
| 139 | + }, |
| 140 | + "execution_count": 4, |
| 141 | + "metadata": {}, |
| 142 | + "output_type": "execute_result" |
| 143 | + } |
| 144 | + ], |
| 145 | + "source": [ |
| 146 | + "contact.validate(dict(name='Matthias Probst',\n", |
| 147 | + " id='https://orcid.org/0000-0001-8729-0482',\n", |
| 148 | + " role='Researcher'\n", |
| 149 | + " ), None)" |
| 150 | + ] |
| 151 | + }, |
| 152 | + { |
| 153 | + "cell_type": "code", |
| 154 | + "execution_count": 5, |
| 155 | + "id": "94d4146a-726c-4c46-aca6-7a771748c864", |
| 156 | + "metadata": {}, |
| 157 | + "outputs": [ |
| 158 | + { |
| 159 | + "data": { |
| 160 | + "text/plain": [ |
| 161 | + "personOrOrganization(name='Matthias Probst', givenName=None, familyName=None, address=None, affiliation=None, email=None, id=None, role=None)" |
| 162 | + ] |
| 163 | + }, |
| 164 | + "execution_count": 5, |
| 165 | + "metadata": {}, |
| 166 | + "output_type": "execute_result" |
| 167 | + } |
| 168 | + ], |
| 169 | + "source": [ |
| 170 | + "contact.validate(dict(name='Matthias Probst',\n", |
| 171 | + " ), None)" |
| 172 | + ] |
| 173 | + }, |
| 174 | + { |
| 175 | + "cell_type": "code", |
| 176 | + "execution_count": 10, |
| 177 | + "id": "d6837d44-1064-4d0b-aa37-09df20f5bbb8", |
| 178 | + "metadata": {}, |
| 179 | + "outputs": [ |
150 | 180 | { |
151 | 181 | "data": { |
152 | 182 | "text/html": [ |
|
338 | 368 | "\n", |
339 | 369 | " <ul style=\"list-style-type: none;\" class=\"h5grp-sections\">\n", |
340 | 370 | " <li>\n", |
341 | | - " <input id=\"group-ds--6465795800\" type=\"checkbox\" checked>\n", |
342 | | - " <label style=\"font-weight: bold\" for=\"group-ds--6465795800\">\n", |
| 371 | + " <input id=\"group-ds--15793881400\" type=\"checkbox\" checked>\n", |
| 372 | + " <label style=\"font-weight: bold\" for=\"group-ds--15793881400\">\n", |
343 | 373 | " /<span>(0)</span></label>\n", |
344 | 374 | " \n", |
345 | 375 | "\n", |
346 | | - " <ul class=\"h5tb-attr-list\"><li style=\"list-style-type: none; font-style: italic\">__h5rdmtoolbox_version__ : 0.10.0</li><li style=\"list-style-type: none; font-style: italic\">contact : name='Matthias Probst' givenName=None familyName=None address=None affiliation=None email=None id...</li><li style=\"list-style-type: none; font-style: italic\">creator : {'name': 'Matthias Probst', 'id': 'https://orcid.org/0000-0001-8729-0482', 'role': {'value': 'Res...</li><li style=\"list-style-type: none; font-style: italic\">pid : {'id': '123', 'type': {'value': 'other'}}</li><li style=\"list-style-type: none; font-style: italic\">title : Test file to demonstrate usage of EngMeta schema</li>\n", |
| 376 | + " <ul class=\"h5tb-attr-list\"><li style=\"list-style-type: none; font-style: italic\">__h5rdmtoolbox_version__ : 0.11.0</li><li style=\"list-style-type: none; font-style: italic\">contact : name='Matthias Probst' givenName=None familyName=None address=None affiliation=None email=None id...</li><li style=\"list-style-type: none; font-style: italic\">creator : name='Matthias Probst' givenName=None familyName=None address=None affiliation=None email=None id...</li><li style=\"list-style-type: none; font-style: italic\">pid : id='123' type=pidTypes(value=<pidTypes.other: 'other'>) scheme=None</li><li style=\"list-style-type: none; font-style: italic\">title : Test file to demonstrate usage of EngMeta schema</li>\n", |
347 | 377 | " </ul>\n", |
348 | 378 | "</li>\n", |
349 | 379 | "</ul>\n", |
|
381 | 411 | }, |
382 | 412 | { |
383 | 413 | "cell_type": "code", |
384 | | - "execution_count": 5, |
| 414 | + "execution_count": 11, |
385 | 415 | "id": "206c6ca0-35ac-4221-b626-d27e3abe4a02", |
386 | 416 | "metadata": {}, |
387 | 417 | "outputs": [], |
|
396 | 426 | }, |
397 | 427 | { |
398 | 428 | "cell_type": "code", |
399 | | - "execution_count": 6, |
| 429 | + "execution_count": 12, |
400 | 430 | "id": "6258751b-b488-45fd-a0b1-1f8dacca3b64", |
401 | 431 | "metadata": {}, |
402 | 432 | "outputs": [ |
|
405 | 435 | "text/plain": [ |
406 | 436 | "{'file_size': array(10552) <Unit('byte')>,\n", |
407 | 437 | " 'file_type': 'hdf5',\n", |
408 | | - " 'checksum': '64b4e38830dbffc210f256b3cd469774'}" |
| 438 | + " 'checksum': '72a399d75914328a923e8d22c3276270'}" |
409 | 439 | ] |
410 | 440 | }, |
411 | | - "execution_count": 6, |
| 441 | + "execution_count": 12, |
412 | 442 | "metadata": {}, |
413 | 443 | "output_type": "execute_result" |
414 | 444 | } |
|
420 | 450 | { |
421 | 451 | "cell_type": "code", |
422 | 452 | "execution_count": null, |
423 | | - "id": "34a7f701-24de-4404-8015-f7c035e1548c", |
| 453 | + "id": "3452fe5a-707a-41b1-b937-fb93036eec54", |
424 | 454 | "metadata": {}, |
425 | 455 | "outputs": [], |
426 | 456 | "source": [] |
|
0 commit comments