Skip to content

Commit 73f954c

Browse files
committed
New render with additional users
1 parent d33d710 commit 73f954c

File tree

2 files changed

+84
-37
lines changed

2 files changed

+84
-37
lines changed

README.md

Lines changed: 84 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ print(basic_rocrate)
129129
#> "@type": "Dataset",
130130
#> "name": "",
131131
#> "description": "",
132-
#> "datePublished": "2026-01-12",
132+
#> "datePublished": "2026-01-13",
133133
#> "license": {
134134
#> "@id": "http://spdx.org/licenses/CC-BY-4.0"
135135
#> },
@@ -164,8 +164,8 @@ print(basic_rocrate) # note that the output will be truncated
164164
#> "@id": "#dataset:67adf2d8e106aca9b11de773758bd241",
165165
#> "@type": "Dataset",
166166
#> "name": "CNSIM1",
167-
#> "dateCreated": "2026-01-12T06:29:57.431Z",
168-
#> "dateModified": "2026-01-12T06:29:58.577Z",
167+
#> "dateCreated": "2026-01-13T06:29:53.743Z",
168+
#> "dateModified": "2026-01-13T06:29:54.908Z",
169169
#> "path": "/datasource/CNSIM/table/CNSIM1"
170170
#> }
171171
#> ]
@@ -188,8 +188,8 @@ print(basic_rocrate) # note that the output will be truncated
188188
#> "@id": "#project:7ba189863f9f641196596cb28e04aa14",
189189
#> "@type": "Project",
190190
#> "name": "CNSIM",
191-
#> "dateCreated": "2026-01-12T06:29:56.147Z",
192-
#> "dateModified": "2026-01-12T06:30:00.883Z",
191+
#> "dateCreated": "2026-01-13T06:29:52.446Z",
192+
#> "dateModified": "2026-01-13T06:29:57.223Z",
193193
#> "hasPart": [
194194
#> {
195195
#> "@id": "#dataset:67adf2d8e106aca9b11de773758bd241"
@@ -452,7 +452,7 @@ basic_rocrate <- o |>
452452
logs_from = Sys.time() - 60, # capture the last minute
453453
logs_to = Sys.time())
454454
#> opening file input connection.
455-
#> Found 418 records... Imported 418 records. Simplifying...
455+
#> Found 49 records... Imported 49 records. Simplifying...
456456
#> closing file input connection.
457457
#> Warning: A `path` wasn't provided! The logs will be included in the RO-Crate
458458
#> object, under the `content` tag!
@@ -467,21 +467,21 @@ print(basic_rocrate) # note that the output will be truncated
467467
#> "description": "A resource represents some data or a computation unit. It is \n described by a URL and credentials. This package proposes a Resource model\n with \"resolver\" and \"client\" classes to facilitate the access and the usage of the \n resources."
468468
#> },
469469
#> {
470-
#> "@id": "2026-01-12-dslogs-dsuser.log",
470+
#> "@id": "2026-01-13-dslogs-dsuser.log",
471471
#> "@type": "File",
472-
#> "dateModified": "2026-01-12 16:05:24",
473-
#> "name": "2026-01-12-dslogs-dsuser.log",
474-
#> "description": "This file contains the raw logs for the user: `dsuser` , between: 2026-01-12 16:04:24 and 2026-01-12 16:05:24",
472+
#> "dateModified": "2026-01-13 10:03:57",
473+
#> "name": "2026-01-13-dslogs-dsuser.log",
474+
#> "description": "This file contains the raw logs for the user: `dsuser` , between: 2026-01-13 10:02:57 and 2026-01-13 10:03:57",
475475
#> "encodingFormat": "text/plain",
476476
#> "content": [
477-
#> ["[INFO][2026-01-12T16:05:21][OPEN] created a datashield session 711d6089-a3c0-487f-ba93-8efa38dd57d8", "[INFO][2026-01-12T16:05:21][ASSIGN] created symbol 'dsROCrate_test' from: 'dsROCrate_test <- opal[CNSIM.CNSIM1]'", "[INFO][2026-01-12T16:05:22][PARSE] parsed 'dsBase::lsDS(search.filter = NULL, 1L)'", "[INFO][2026-01-12T16:05:23][AGGREGATE] evaluated 'dsBase::lsDS(search.filter = NULL, 1L)'", "[INFO][2026-01-12T16:05:23][PARSE] parsed 'base::exists(\"dsROCrate_test\")'", "[INFO][2026-01-12T16:05:23][AGGREGATE] evaluated 'base::exists(\"dsROCrate_test\")'", "[INFO][2026-01-12T16:05:23][PARSE] parsed 'dsBase::classDS(\"dsROCrate_test\")'", "[INFO][2026-01-12T16:05:23][AGGREGATE] evaluated 'dsBase::classDS(\"dsROCrate_test\")'", "[INFO][2026-01-12T16:05:23][PARSE] parsed 'dsBase::isValidDS(dsROCrate_test)'", "[INFO][2026-01-12T16:05:23][AGGREGATE] evaluated 'dsBase::isValidDS(dsROCrate_test)'", "[INFO][2026-01-12T16:05:23][PARSE] parsed 'dsBase::dimDS(\"dsROCrate_test\")'", "[INFO][2026-01-12T16:05:23][AGGREGATE] evaluated 'dsBase::dimDS(\"dsROCrate_test\")'", "[INFO][2026-01-12T16:05:23][PARSE] parsed 'dsBase::colnamesDS(\"dsROCrate_test\")'", "[INFO][2026-01-12T16:05:23][AGGREGATE] evaluated 'dsBase::colnamesDS(\"dsROCrate_test\")'"]
477+
#> ["[INFO][2026-01-13T10:03:53][OPEN] created a datashield session 43a38dac-89a9-47ca-a57c-e7a669e014fe", "[INFO][2026-01-13T10:03:55][ASSIGN] created symbol 'dsROCrate_test' from: 'dsROCrate_test <- opal[CNSIM.CNSIM1]'", "[INFO][2026-01-13T10:03:55][PARSE] parsed 'dsBase::lsDS(search.filter = NULL, 1L)'", "[INFO][2026-01-13T10:03:56][AGGREGATE] evaluated 'dsBase::lsDS(search.filter = NULL, 1L)'", "[INFO][2026-01-13T10:03:56][PARSE] parsed 'base::exists(\"dsROCrate_test\")'", "[INFO][2026-01-13T10:03:56][AGGREGATE] evaluated 'base::exists(\"dsROCrate_test\")'", "[INFO][2026-01-13T10:03:56][PARSE] parsed 'dsBase::classDS(\"dsROCrate_test\")'", "[INFO][2026-01-13T10:03:56][AGGREGATE] evaluated 'dsBase::classDS(\"dsROCrate_test\")'", "[INFO][2026-01-13T10:03:56][PARSE] parsed 'dsBase::isValidDS(dsROCrate_test)'", "[INFO][2026-01-13T10:03:56][AGGREGATE] evaluated 'dsBase::isValidDS(dsROCrate_test)'", "[INFO][2026-01-13T10:03:56][PARSE] parsed 'dsBase::dimDS(\"dsROCrate_test\")'", "[INFO][2026-01-13T10:03:56][AGGREGATE] evaluated 'dsBase::dimDS(\"dsROCrate_test\")'", "[INFO][2026-01-13T10:03:56][PARSE] parsed 'dsBase::colnamesDS(\"dsROCrate_test\")'", "[INFO][2026-01-13T10:03:57][AGGREGATE] evaluated 'dsBase::colnamesDS(\"dsROCrate_test\")'"]
478478
#> ]
479479
#> },
480480
#> {
481-
#> "@id": "2026-01-12-dslogs-dsuser_mappings.csv",
481+
#> "@id": "2026-01-13-dslogs-dsuser_mappings.csv",
482482
#> "@type": "File",
483-
#> "dateModified": "2026-01-12 16:05:24",
484-
#> "name": "2026-01-12-dslogs-dsuser_mappings.csv",
483+
#> "dateModified": "2026-01-13 10:03:57",
484+
#> "name": "2026-01-13-dslogs-dsuser_mappings.csv",
485485
#> "description": "This file contains mappings and evaluated functions",
486486
#> "encodingFormat": "text/csv",
487487
#> "content": [
@@ -573,7 +573,7 @@ basic_rocrate <- basic_rocrate |>
573573
path_to_rocrate_bag <- basic_rocrate |>
574574
rocrateR::bag_rocrate(path = "./rocrates", overwrite = TRUE)
575575
#> RO-Crate successfully 'bagged'!
576-
#> For details, see: ./rocrates/rocrate-d2be223f15678b8f8a6f6ff06e3ed590.zip
576+
#> For details, see: ./rocrates/rocrate-ed4e631aea4cef802de309a64d28060f.zip
577577
```
578578

579579
We can explore the contents with the following commands:
@@ -588,8 +588,8 @@ path_to_rocrate_bag |>
588588
#> ./rocrates/ROC/
589589
#> ├── bagit.txt
590590
#> ├── data
591-
#> │ ├── 2026-01-12-dslogs-dsuser.log
592-
#> │ ├── 2026-01-12-dslogs-dsuser_mappings.csv
591+
#> │ ├── 2026-01-13-dslogs-dsuser.log
592+
#> │ ├── 2026-01-13-dslogs-dsuser_mappings.csv
593593
#> │ └── ro-crate-metadata.json
594594
#> ├── manifest-sha512.txt
595595
#> └── tagmanifest-sha512.txt
@@ -636,7 +636,7 @@ print(safe_people_crate_v1)
636636
#> "@type": "Dataset",
637637
#> "name": "",
638638
#> "description": "",
639-
#> "datePublished": "2026-01-12",
639+
#> "datePublished": "2026-01-13",
640640
#> "license": {
641641
#> "@id": "http://spdx.org/licenses/CC-BY-4.0"
642642
#> },
@@ -653,32 +653,32 @@ print(safe_people_crate_v1)
653653
#> "@id": "#dataset:67adf2d8e106aca9b11de773758bd241",
654654
#> "@type": "Dataset",
655655
#> "name": "CNSIM1",
656-
#> "dateCreated": "2026-01-12T06:29:57.431Z",
657-
#> "dateModified": "2026-01-12T06:29:58.577Z",
656+
#> "dateCreated": "2026-01-13T06:29:53.743Z",
657+
#> "dateModified": "2026-01-13T06:29:54.908Z",
658658
#> "path": "/datasource/CNSIM/table/CNSIM1"
659659
#> },
660660
#> {
661661
#> "@id": "#dataset:ffb1b1adcafc024743be1b0c252787c9",
662662
#> "@type": "Dataset",
663663
#> "name": "CNSIM2",
664-
#> "dateCreated": "2026-01-12T06:29:58.589Z",
665-
#> "dateModified": "2026-01-12T06:29:59.703Z",
664+
#> "dateCreated": "2026-01-13T06:29:54.912Z",
665+
#> "dateModified": "2026-01-13T06:29:56.062Z",
666666
#> "path": "/datasource/CNSIM/table/CNSIM2"
667667
#> },
668668
#> {
669669
#> "@id": "#dataset:cc3061aef69ce457358815fb9d8c6492",
670670
#> "@type": "Dataset",
671671
#> "name": "CNSIM3",
672-
#> "dateCreated": "2026-01-12T06:29:59.713Z",
673-
#> "dateModified": "2026-01-12T06:30:00.883Z",
672+
#> "dateCreated": "2026-01-13T06:29:56.065Z",
673+
#> "dateModified": "2026-01-13T06:29:57.223Z",
674674
#> "path": "/datasource/CNSIM/table/CNSIM3"
675675
#> },
676676
#> {
677677
#> "@id": "#project:7ba189863f9f641196596cb28e04aa14",
678678
#> "@type": "Project",
679679
#> "name": "CNSIM",
680-
#> "dateCreated": "2026-01-12T06:29:56.147Z",
681-
#> "dateModified": "2026-01-12T06:30:00.883Z",
680+
#> "dateCreated": "2026-01-13T06:29:52.446Z",
681+
#> "dateModified": "2026-01-13T06:29:57.223Z",
682682
#> "hasPart": [
683683
#> {
684684
#> "@id": "#dataset:67adf2d8e106aca9b11de773758bd241"
@@ -965,7 +965,7 @@ print(safe_project_crate_v1)
965965
#> "@type": "Dataset",
966966
#> "name": "",
967967
#> "description": "",
968-
#> "datePublished": "2026-01-12",
968+
#> "datePublished": "2026-01-13",
969969
#> "license": {
970970
#> "@id": "http://spdx.org/licenses/CC-BY-4.0"
971971
#> },
@@ -982,32 +982,32 @@ print(safe_project_crate_v1)
982982
#> "@id": "#dataset:67adf2d8e106aca9b11de773758bd241",
983983
#> "@type": "Dataset",
984984
#> "name": "CNSIM1",
985-
#> "dateCreated": "2026-01-12T06:29:57.431Z",
986-
#> "dateModified": "2026-01-12T06:29:58.577Z",
985+
#> "dateCreated": "2026-01-13T06:29:53.743Z",
986+
#> "dateModified": "2026-01-13T06:29:54.908Z",
987987
#> "path": "/datasource/CNSIM/table/CNSIM1"
988988
#> },
989989
#> {
990990
#> "@id": "#dataset:ffb1b1adcafc024743be1b0c252787c9",
991991
#> "@type": "Dataset",
992992
#> "name": "CNSIM2",
993-
#> "dateCreated": "2026-01-12T06:29:58.589Z",
994-
#> "dateModified": "2026-01-12T06:29:59.703Z",
993+
#> "dateCreated": "2026-01-13T06:29:54.912Z",
994+
#> "dateModified": "2026-01-13T06:29:56.062Z",
995995
#> "path": "/datasource/CNSIM/table/CNSIM2"
996996
#> },
997997
#> {
998998
#> "@id": "#dataset:cc3061aef69ce457358815fb9d8c6492",
999999
#> "@type": "Dataset",
10001000
#> "name": "CNSIM3",
1001-
#> "dateCreated": "2026-01-12T06:29:59.713Z",
1002-
#> "dateModified": "2026-01-12T06:30:00.883Z",
1001+
#> "dateCreated": "2026-01-13T06:29:56.065Z",
1002+
#> "dateModified": "2026-01-13T06:29:57.223Z",
10031003
#> "path": "/datasource/CNSIM/table/CNSIM3"
10041004
#> },
10051005
#> {
10061006
#> "@id": "#project:7ba189863f9f641196596cb28e04aa14",
10071007
#> "@type": "Project",
10081008
#> "name": "CNSIM",
1009-
#> "dateCreated": "2026-01-12T06:29:56.147Z",
1010-
#> "dateModified": "2026-01-12T06:30:00.883Z",
1009+
#> "dateCreated": "2026-01-13T06:29:52.446Z",
1010+
#> "dateModified": "2026-01-13T06:29:57.223Z",
10111011
#> "hasPart": [
10121012
#> {
10131013
#> "@id": "#dataset:67adf2d8e106aca9b11de773758bd241"
@@ -1026,6 +1026,16 @@ print(safe_project_crate_v1)
10261026
#> "name": "dsuser"
10271027
#> },
10281028
#> {
1029+
#> "@id": "#person:a3cd7ce7818436c83b1eadaa5ba47411",
1030+
#> "@type": "Person",
1031+
#> "name": "dsuser2"
1032+
#> },
1033+
#> {
1034+
#> "@id": "#person:5657241505661473308ae9aa9a378293",
1035+
#> "@type": "Person",
1036+
#> "name": "dsuser3"
1037+
#> },
1038+
#> {
10291039
#> "@id": "#perm:9bf7f75b6c5b07d02830b95652cd39a0-dict-summary-read",
10301040
#> "@type": "ReadAction",
10311041
#> "agent": {
@@ -1050,6 +1060,30 @@ print(safe_project_crate_v1)
10501060
#> "description": "User may view table dictionary and summary statistics only; access to individual values is restricted."
10511061
#> },
10521062
#> {
1063+
#> "@id": "#perm:802d140a064e6ebf3a784f759af1b640-write-dict",
1064+
#> "@type": "WriteAction",
1065+
#> "agent": {
1066+
#> "@id": "#person:a3cd7ce7818436c83b1eadaa5ba47411"
1067+
#> },
1068+
#> "object": {
1069+
#> "@id": "#dataset:ffb1b1adcafc024743be1b0c252787c9"
1070+
#> },
1071+
#> "actionStatus": "PotentialActionStatus",
1072+
#> "description": "User may edit the table dictionary but cannot view individual values."
1073+
#> },
1074+
#> {
1075+
#> "@id": "#perm:802d140a064e6ebf3a784f759af1b640-summary-read",
1076+
#> "@type": "ReadAction",
1077+
#> "agent": {
1078+
#> "@id": "#person:a3cd7ce7818436c83b1eadaa5ba47411"
1079+
#> },
1080+
#> "object": {
1081+
#> "@id": "#dataset:ffb1b1adcafc024743be1b0c252787c9"
1082+
#> },
1083+
#> "actionStatus": "PotentialActionStatus",
1084+
#> "description": "User may view summary statistics only; access to individual values is restricted."
1085+
#> },
1086+
#> {
10531087
#> "@id": "#perm:63b8097908f682bff1760e48d28c5855-dict-summary-read",
10541088
#> "@type": "ReadAction",
10551089
#> "agent": {
@@ -1062,6 +1096,18 @@ print(safe_project_crate_v1)
10621096
#> "description": "User may view table dictionary and summary statistics only; access to individual values is restricted."
10631097
#> },
10641098
#> {
1099+
#> "@id": "#perm:04c3f293c7a360fe0a1b7c29c8363540-read-all",
1100+
#> "@type": "ReadAction",
1101+
#> "agent": {
1102+
#> "@id": "#person:5657241505661473308ae9aa9a378293"
1103+
#> },
1104+
#> "object": {
1105+
#> "@id": "#dataset:cc3061aef69ce457358815fb9d8c6492"
1106+
#> },
1107+
#> "actionStatus": "PotentialActionStatus",
1108+
#> "description": "User may view table dictionary and all individual values."
1109+
#> },
1110+
#> {
10651111
#> "@id": "_:localid:datashield.privacyLevel:5",
10661112
#> "@type": "PropertyValue",
10671113
#> "name": "datashield.privacyLevel",
@@ -1164,9 +1210,8 @@ safe_project_crate_v1_rmd <- tempfile(fileext = ".Rmd") # temporary file
11641210

11651211
safe_project_crate_contents <- safe_project_crate_v1 |>
11661212
dsROCrate::rocrate_report(filepath = safe_project_crate_v1_rmd, render = FALSE)
1167-
#> 1 'Author' entity was found!
1213+
#> 3 'Author' entities were found!
11681214
#> 3 'Dataset' entities were found!
1169-
#> Warning: No entities were found with @type = 'WriteAction'!
11701215
#> Warning: No entities were found with @type = 'ControlAction'!
11711216
#> 1 'Project' entity was found!
11721217
#> 14 'PropertyValue' OR 'SoftwareApplication' entities were found!
@@ -1188,7 +1233,9 @@ safe_project_crate_contents$overview_data |>
11881233
|:-------------|:----------|:------------|:-------------|
11891234
| CNSIM | CNSIM1 | dsuser | read |
11901235
| | CNSIM2 | dsuser | read |
1236+
| | | dsuser2 | read, write |
11911237
| | CNSIM3 | dsuser | read |
1238+
| | | dsuser3 | read |
11921239

11931240
**Render and display report (HTML)**
11941241

34.7 KB
Loading

0 commit comments

Comments
 (0)