datalad_next.patches.ria_utils

Patch ria_utils.py tp work with abstract RIA-paths

The ORARemote and CreateSiblingRia-patches use an abstract representation of all paths that are related to elements of a RIA-store, e.g. ria-layout-version or ria-object-dir. This patch adapts ria_utils.py to this modification.

datalad_next.patches.ria_utils.ria_utils__ensure_version(io, base_path, version)[source]

Check a store or dataset version and make sure it is declared

Parameters:
  • io (SSHRemoteIO or LocalIO)

  • base_path (PurePosixPath) -- root path of a store or dataset

  • version (str) -- target layout version of the store (dataset tree)

datalad_next.patches.ria_utils.ria_utils_create_ds_in_store(io, base_path, dsid, obj_version, store_version, alias=None, init_obj_tree=True)[source]

Helper to create a dataset in a RIA store

Note, that this is meant as an internal helper and part of intermediate RF'ing. Ultimately should lead to a version option for create-sibling-ria in conjunction with a store creation command/option.

Parameters:
  • io (SSHRemoteIO or LocalIO) -- Respective execution instance. Note: To be replaced by proper command abstraction

  • base_path (PurePosixPath) -- root path of the store

  • dsid (str) -- dataset id

  • store_version (str) -- layout version of the store (dataset tree)

  • obj_version (str) -- layout version of the dataset itself (object tree)

  • alias (str, optional) -- alias for the dataset in the store

  • init_obj_tree (bool) -- whether or not to create the base directory for an annex objects tree ( 'annex/objects')

datalad_next.patches.ria_utils.ria_utils_create_store(io, base_path, version)[source]

Helper to create a RIA store

Note, that this is meant as an internal helper and part of intermediate RF'ing. Ultimately should lead to dedicated command or option for create-sibling-ria.

Parameters:
  • io (SSHRemoteIO or LocalIO) -- Respective execution instance. Note: To be replaced by proper command abstraction

  • base_path (PurePosixPath) -- root url path of the store

  • version (str) -- layout version of the store (dataset tree)