Datasets — Renku 0.11.2.dev14+dirty documentation

Join us on GitHub

# Datasets

Model objects representing datasets.

## Dataset object

class `renku.core.models.datasets.` `Dataset`(*, commit=None, client=None, path=None, project: renku.core.models.projects.Project = None, parent=None, creators, id=None, label=None, date_published=None, description=None, identifier=NOTHING, in_language=None, keywords=None, license=None, title: str = None, url=None, version=None, date_created=NOTHING, files=NOTHING, tags=NOTHING, same_as=None, name=None)

  Represent a dataset.

  `as_jsonld`()

    Create JSON-LD.

  `contains_any`(files)

    Check if files are already within a dataset.

  property `creators_csv`

    Comma-separated list of creators associated with dataset.

  property `creators_full_csv`

    Comma-separated list of creators with full identity.

  property `data_dir`

    Directory where dataset files are stored.

  `default_id`()

    Configure calculated ID.

  `default_label`()

    Generate a default label.

  `default_reference`()

    Create a default reference path.

  property `editable`

    Subset of attributes which user can edit.

  property `entities`

    Yield itself.

  `find_file`(filename, return_index=False)

    Find a file in files container.

  `find_files`(paths)

    Return all paths that are in files container.

  classmethod `from_jsonld`(data, client=None, commit=None, schema_class=None)

    Create an instance from JSON-LD data.

  classmethod `from_revision`(client, path, revision='HEAD', parent=None, find_previous=True, **kwargs)

    Return dependency from given path and revision.

  classmethod `from_yaml`(path, client=None, commit=None)

    Return an instance from a YAML file.

  property `keywords_csv`

    Comma-separated list of keywords associated with dataset.

  `name_validator`(attribute, value)

    Validate name.

  property `parent`

    Return the parent object.

  `rename_files`(rename)

    Rename files using the path mapping function.

  `set_client`(client)

    Sets the clients on this entity.

  property `short_id`

    Shorter version of identifier.

  property `submodules`

    Proxy to client submodules.

  property `tags_csv`

    Comma-separated list of tags associated with dataset.

  `to_yaml`()

    Write an instance to the referenced YAML file.

  property `uid`

    UUID part of identifier.

  `unlink_file`(file_path)

    Unlink a file from dataset.

    Parameters

      file_path – Relative path used as key inside files container.

  `update_files`(files)

    Update files with collection of DatasetFile objects.

  `update_metadata`(other_dataset)

    Updates instance attributes with other dataset attributes.

    Parameters

      other_dataset – Dataset

    Returns

      self

## Dataset file

Manage files in the dataset.

class `renku.core.models.datasets.` `DatasetFile`(*, commit=None, client=None, path=None, id=None, label=NOTHING, project: renku.core.models.projects.Project = None, parent=None, added=NOTHING, checksum=None, filename=NOTHING, name=None, filesize=None, filetype=None, url=None, based_on=None, external=False, source=None)

  Represent a file in a dataset.

  `as_jsonld`()

    Create JSON-LD.

  `default_filename`()

    Generate default filename based on path.

  `default_id`()

    Configure calculated ID.

  `default_label`()

    Generate a default label.

  `default_url`()

    Generate default url based on project’s ID.

  property `entities`

    Yield itself.

  classmethod `from_jsonld`(data)

    Create an instance from JSON-LD data.

  classmethod `from_revision`(client, path, revision='HEAD', parent=None, find_previous=True, **kwargs)

    Return dependency from given path and revision.

  property `full_path`

    Return full path in the current reference frame.

  property `parent`

    Return the parent object.

  `set_client`(client)

    Sets the clients on this entity.

  property `size_in_mb`

    Return file size in megabytes.

  property `submodules`

    Proxy to client submodules.