'DataSHIELD' RO-Crate Governance Functions
Overview
Tools for wrapping 'DataSHIELD' analyses into RO-Crate (Research Object Crate) objects. Provides functions to create structured metadata for federated data analysis projects, enabling governance tracking of data access, project membership, analysis execution and output validation across distributed data sources.
Bug fixes
- Fixed
safe_output()reading Opal log timestamps in the local time zone instead of UTC. Opal returns UTC timestamps in ISO 8601 format (e.g.,2026-10-13T04:26:14.076Z); they are now parsed as UTC, including fractional seconds andZ/+hh:mmoffsets. Previously, on machines whose time zone was not UTC, thelogs_from/logs_towindow could drop recent log entries (or include old ones). - Fixed
safe_project()overwriting theuserattribute stored in the returned RO-Crate: a loop variable shadowed theuserargument. - Fixed table lineage links (
isBasedOn) between tables and resources being written torocrate$graphinstead of `rocrate$@graph`, so they are now recorded in the RO-Crate graph.
Show all changes in 0.2.4Hide the rest of the changes in 0.2.4
- Fixed the symbol registry lookup so it always returns a single row when several symbols share the same
created_attimestamp (dplyr::slice_max()now useswith_ties = FALSE). report()(path method) now forwardsmax_line_lengthand...to the RO-Crate method; previouslymax_line_lengthwas silently ignored.- The error shown when the report directory does not exist now suggests
mkdir -p(wasmkdir -r). audit()andextract_safe_project()(opal method) now read project names with$name, so they work whetherbackend_projects()returns a data frame or a tibble.
Changes
- Timestamps written by
safe_output()(the audit log tibble, the_mappings.csvfile, andas.data.frame()ofsafe_callobjects) are now ISO 8601 in UTC with a trailingZ(e.g.,2026-07-01T10:00:00Z). Code that compares these values as strings will need to be updated. safe_output():logs_fromandlogs_toacceptPOSIXctvalues or date-time strings, with or without aZ/UTC offset. Strings without an offset are interpreted as UTC, andInf/-Infstill mean "no limit".report()for a list of RO-Crates no longer has the unusedstudy_nameargument.
Documentation
- Split the
getting-startedvignette into three.getting-startednow covers connecting,check_permissions(),audit()andreport(); the newbuilding-cratesvignette shows the step-by-step workflow withinit()and thesafe_*()functions (including saving the RO-Crate); and the newauditing-studiesvignette shows how to audit several servers as one study. audit-permissionsvignette: explains how the permission check works, lists the common error messages with their likely causes, and gives the minimum Opal version (5.7.2).deploy-local-datashield-server-with-opalvignette: corrected the clone directory, added the demo accounts, the Opal version requirement, an audit example and instructions to stop the server, and removed unused code.- Vignettes now only run their examples when the public Opal demo server can be reached; otherwise the code is shown but not evaluated.
- README: added the supported-backend and requirements table, a guide on which function to use,
check_permissions()in the quick start, and a list of all vignettes. - Reference documentation: the description of
...is now defined once (shared_params) and inherited by the functions, the documented default ofuser_id_suffixwas corrected ("#person:"), the Opal-specific wording was removed from theprofileargument, and stray formatting in theaudit()documentation was fixed. - Updated spell-check
WORDLIST.
Internal Changes
- Added
parse_utc(),parse_utc_limit(),format_utc()andfmt_limit()(utils-date.R) so that all timestamps are parsed and formatted the same way. They replaceis_valid_posixct(). backend_logs()(opal method) now returns@timestampasPOSIXct(UTC) and suppresses the progress messages printed byopalr. Other backends are expected to returnPOSIXcttimestamps.- Added tests for
parse_utc(), run under a non-UTC time zone. safe_output()tests coveringRESOLVE/ASSIGNoperations now setlogs_fromandlogs_toexplicitly, so they no longer depend on the time they are run.- Test mocks now use
type = "group"for group permissions, matching the values returned by Opal, and thereport()tests no longer passstudy_name. - Rebuilt the vignettes against the current Opal demo server (6.0.1).
From NEWS.md in the release
Install
Health
ERRORtestsr-patched-linux-x86_64
Running ‘testthat.R’ [8s/10s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(dsROCrate)
>
> test_check("dsROCrate")
Saving _problems/test-safe_output-252.R
Saving _problems/test-safe_output-263.R
Saving _problems/test-safe_output-324.R
2 asset entities were found!
1 asset entity was found!
2 'File' entities were found!
2 'File' entities were found!
1 'File' entity was found!
1 'File' entity was found!
1 'File' entity was found!
[1] "alice"
2 'Author' entities were found!
1 'Author' entity was found!
1 'Author' entity was found!
2 'Project'
...[truncated]...
", "ASSIGN")`.
Differences:
`actual` is NULL
`expected` is a character vector ('OPEN', 'RESOLVE', 'ASSIGN')
── Error ('test-safe_output.R:254:3'): safe_output captures RESOLVE and ASSIGN operations independently ──
Error in `UseMethod("filter")`: no applicable method for 'filter' applied to an object of class "NULL"
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-safe_output.R:254:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. ├─dplyr::select(...)
5. └─dplyr::filter(mappings, action == "RESOLVE")
── Error ('test-safe_output.R:323:3'): safe_output retains RESOLVE operations without ASSIGN ──
Error in `UseMethod("filter")`: no applicable method for 'filter' applied to an object of class "NULL"
Backtrace:
▆
1. └─dplyr::filter(mappings, action == "RESOLVE") at test-safe_output.R:323:3
[ FAIL 3 | WARN 0 | SKIP 36 | PASS 251 ]
Error:
! Test failures.
Execution halted- ERROR12 OK, 1 ERRORNow
- ERROR11 OK, 2 ERROR2026-09-26
- OK13 OK2026-09-18
- ERROR10 OK, 3 ERROR2026-09-12
- OK13 OK2026-08-26
- ERROR10 OK, 3 ERROR2026-08-21
Show 9 earlier changesHide 9 earlier changes
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-06
- ERROR12 OK, 1 ERROR2026-06-05
- OK13 OK2026-05-12
- ERROR12 OK, 1 ERROR2026-05-09
- OK13 OK2026-04-29
- ERROR10 OK, 2 ERROR2026-04-27
- OK8 OK2026-04-22
Documentation
- Help pages
- 12 (2 internal)includes a package overview page
- Examples that run
- 0%1 never run
- Exported functions with examples
- 10%
- Documented parameters
- 95%
- Return-value docs
- 100%
- Help pages citing references
- 8%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 2
- Median days to close, 50 most recently updated closed PRs
- 0
Releases over time
Issues over time
PRs over time
Commits over time
7 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/federatedmethods/dsrocrate on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-24 · The repository has a site deploy workflow
Dependencies
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.2.4Latest2026-10-16 · current release · diff ↗ ·
19 hours in CRAN's queue
Listed in CRAN's incoming queue from 2026-10-15 12:21 to 2026-10-16 07:45 UTC, in 6 readings. - 0.2.32026-09-24 · diff ↗
- 0.2.22026-08-21 · diff ↗
- 0.2.12026-07-30 · diff ↗
- 0.2.02026-07-26 · diff ↗
- 0.1.0
- 0.0.22026-04-27 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 0.0.12026-04-21
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-04-21
- Total releases
- 8 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 1.5 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("dsROCrate")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.