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)[source]

Represent a dataset.

Method generated by attrs for class Dataset.

as_jsonld()[source]

Create JSON-LD.

contains_any(files)[source]

Check if files are already within a dataset.

creators_csv

Comma-separated list of creators associated with dataset.

creators_full_csv

Comma-separated list of creators with full identity.

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.

editable

Subset of attributes which user can edit.

entities

Yield itself.

find_file(filename, return_index=False)[source]

Find a file in files container.

find_files(paths)[source]

Return all paths that are in files container.

classmethod from_jsonld(data, client=None, commit=None, schema_class=None)[source]

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)[source]

Return an instance from a YAML file.

keywords_csv

Comma-separated list of keywords associated with dataset.

name_validator(attribute, value)[source]

Validate name.

parent

Return the parent object.

rename_files(rename)[source]

Rename files using the path mapping function.

set_client(client)

Sets the clients on this entity.

short_id

Shorter version of identifier.

submodules

Proxy to client submodules.

tags_csv

Comma-separated list of tags associated with dataset.

to_yaml()[source]

Write an instance to the referenced YAML file.

uid

UUID part of identifier.

Unlink a file from dataset.

Parameters:file_path – Relative path used as key inside files container.
update_files(files)[source]

Update files with collection of DatasetFile objects.

update_metadata(other_dataset)[source]

Updates instance attributes with other dataset attributes.

Parameters:other_datasetDataset
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)[source]

Represent a file in a dataset.

Method generated by attrs for class DatasetFile.

as_jsonld()[source]

Create JSON-LD.

default_filename()[source]

Generate default filename based on path.

default_id()

Configure calculated ID.

default_label()

Generate a default label.

default_url()[source]

Generate default url based on project’s ID.

entities

Yield itself.

classmethod from_jsonld(data)[source]

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.

full_path

Return full path in the current reference frame.

parent

Return the parent object.

set_client(client)

Sets the clients on this entity.

size_in_mb

Return file size in megabytes.

submodules

Proxy to client submodules.