Skip to content

CRAN v0.1.0: Enhance RO-Crate handling and validation functions#8

Merged
villegar merged 116 commits into
mainfrom
dev
Apr 22, 2026
Merged

CRAN v0.1.0: Enhance RO-Crate handling and validation functions#8
villegar merged 116 commits into
mainfrom
dev

Conversation

@villegar
Copy link
Copy Markdown
Collaborator

@villegar villegar commented Apr 7, 2026

Overview:

  • Added higher level function to load RO-Crates from various inputs, load_rocrate.
  • Added higher level function to validate RO-Crate and display report with errors and warnings (if any was found), validate_rocrate.
  • Defined new checks for RO-Crate validation to ignore system specific directories (e.g., __MACOSX on macOS).
  • Refactored functions to streamline checks, including is_rocrate.
  • Updated get_entity so it takes a vector for id and type, reuses the shorter vector (only if the length 1), or errors if vectors have different lengths.
  • Updated is_rocrate_bag so it returns a boolean value, indicating the validity of the given RO-Crate bag. Previously, it returned a path to the root of the RO-Crate.
  • Updated unbag_rocrate to return the path to RO-Crate root visibly.
  • add_entities() is deprecated. Use add_entity() instead.
  • load_rocrate_bag() is deprecated. Use load_rocrate() instead. Note that validation must be done as a separate step using validate_rocrate().
  • read_rocrate() is deprecated. Use load_rocrate() instead.
  • remove_entities() is deprecated. Use remove_entity() instead.
  • entity(x=) renamed to entity(id=).

Closes #5 and closes #7

…t` param. Update unbag_rocrate to simplify extracting root directory for RO-Crate bag with new internal function .get_zip_root
…ernal function .find_bagit_root to find the root directory of an RO-Crate bag
… and leave scope for future extra validations
… is_rocrate_bag and load_rocrate_bag can be optional, in which case it will be auto detected
…e with additional details when an RO-Crate is bagged
…BagIt archives, flat RO-Crates (metadata file) and directories containing RO-Crates
@villegar villegar marked this pull request as ready for review April 9, 2026 06:52
@villegar
Copy link
Copy Markdown
Collaborator Author

villegar commented Apr 9, 2026

@elichad just to let you know that this is a new release of the package, now at a more mature stage! Which has also been released on CRAN.

@elichad
Copy link
Copy Markdown
Contributor

elichad commented Apr 17, 2026

@villegar thanks for letting me know :) I can't contribute much in the way of helpful review here - so my main question is just whether all the new features have been documented. I guess that they have been, as I see updates to the docs and a new vignette - so I have no objection to merging

@villegar villegar merged commit 45dddb6 into main Apr 22, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release rocrateR 0.1.0 Allow multiple values when calling rocrateR::get_entity

2 participants