Datasets — Renku 0.1.0.dev20180613 documentation

Join us on GitHub

# Datasets

Manage datasets and their metadata.

## Dataset object

class `renku.models.datasets.` `Dataset`(name: string, created=NOTHING, identifier=NOTHING, authors=NOTHING, files=NOTHING) → None

  Repesent a dataset.

  Type:

      "dctypes:Dataset"

  Context:

      {
        "dcterms": "http://purl.org/dc/terms/",
        "dctypes": "http://purl.org/dc/dcmitypes/",
        "foaf": "http://xmlns.com/foaf/0.1/",
        "prov": "http://www.w3.org/ns/prov#",
        "scoro": "http://purl.org/spar/scoro/",
        "name": "dcterms:name",
        "created": "http://schema.org/dateCreated",
        "identifier": {
          "@id": "dctypes:Dataset",
          "@type": "@id"
        },
        "authors": {
          "@container": "@list"
        },
        "email": "dcterms:email",
        "affiliation": "scoro:affiliate",
        "files": {
          "@container": "@index"
        },
        "url": "http://schema.org/url",
        "added": "http://schema.org/dateCreated"
      }

  classmethod `from_jsonld`(data)

    Instantiate a JSON-LD class from data.

## Dataset file

Manage files in the dataset.

class `renku.models.datasets.` `DatasetFile`(path, url=None, authors=NOTHING, dataset=None, added=NOTHING) → None

  Represent a file in a dataset.

  Type:

      "http://schema.org/DigitalDocument"

  Context:

      {
        "url": "http://schema.org/url",
        "authors": {
          "@container": "@list"
        },
        "foaf": "http://xmlns.com/foaf/0.1/",
        "dcterms": "http://purl.org/dc/terms/",
        "scoro": "http://purl.org/spar/scoro/",
        "name": "dcterms:name",
        "email": "dcterms:email",
        "affiliation": "scoro:affiliate",
        "added": "http://schema.org/dateCreated"
      }

  classmethod `from_jsonld`(data)

    Instantiate a JSON-LD class from data.

## Author

class `renku.models.datasets.` `Author`(name, email, affiliation=None) → None

  Represent the author of a resource.

  Type:

      "dcterms:creator"

  Context:

      {
        "foaf": "http://xmlns.com/foaf/0.1/",
        "dcterms": "http://purl.org/dc/terms/",
        "scoro": "http://purl.org/spar/scoro/",
        "name": "dcterms:name",
        "email": "dcterms:email",
        "affiliation": "scoro:affiliate"
      }

  `check_email`(attribute, value)

    Check that the email is valid.

  classmethod `from_commit`(commit)

    Create an instance from a Git commit.

  classmethod `from_git`(git)

    Create an instance from a Git repo.

  classmethod `from_jsonld`(data)

    Instantiate a JSON-LD class from data.