Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions databusclient/api/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ def _create_distributions_from_metadata(

def create_dataset(
version_id: str,
title: str,
abstract: str,
description: str,
artifact_title: str,
artifact_abstract: str,
artifact_description: str,
license_url: str,
distributions: List[str],
attribution: str = None,
Expand All @@ -288,11 +288,11 @@ def create_dataset(
----------
version_id: str
The version ID representing the Dataset. Needs to be in the form of $DATABUS_BASE/$ACCOUNT/$GROUP/$ARTIFACT/$VERSION
title: str
artifact_title: str
The title text of the dataset
abstract: str
artifact_abstract: str
A short (one or two sentences) description of the dataset
description: str
artifact_description: str
A long description of the dataset. Markdown syntax is supported
license_url: str
The license of the dataset as a URI.
Expand Down Expand Up @@ -380,9 +380,9 @@ def create_dataset(
artifact_graph = {
"@id": artifact_id,
"@type": "Artifact",
"title": title,
"abstract": abstract,
"description": description,
"title": artifact_title,
"abstract": artifact_abstract,
"description": artifact_description,
}
graphs.append(artifact_graph)

Expand All @@ -392,9 +392,9 @@ def create_dataset(
"@type": ["Version", "Dataset"],
"@id": _versionId,
"hasVersion": version,
"title": title,
"abstract": abstract,
"description": description,
"title": artifact_title,
"abstract": artifact_abstract,
"description": artifact_description,
"license": license_url,
"distribution": distribution_list,
}
Expand Down Expand Up @@ -470,9 +470,9 @@ def deploy(
def deploy_from_metadata(
metadata: List[Dict[str, Union[str, int]]],
version_id: str,
title: str,
abstract: str,
description: str,
artifact_title: str,
artifact_abstract: str,
artifact_description: str,
license_url: str,
apikey: str,
) -> None:
Expand All @@ -485,12 +485,12 @@ def deploy_from_metadata(
List of file metadata entries (see _create_distributions_from_metadata)
version_id : str
Dataset version ID in the form $DATABUS_BASE/$ACCOUNT/$GROUP/$ARTIFACT/$VERSION
title : str
Dataset title
abstract : str
Short description of the dataset
description : str
Long description (Markdown supported)
artifact_title : str
Artifact title: the permanent name of the data series (applies to all versions)
artifact_abstract : str
Version Abstract: a short summary (max 200 chars) specific to this timestamped release
artifact_description : str
Version Description: detailed metadata for this specific release (supports Markdown)
license_url : str
License URI
apikey : str
Expand All @@ -500,9 +500,9 @@ def deploy_from_metadata(

dataset = create_dataset(
version_id=version_id,
title=title,
abstract=abstract,
description=description,
artifact_title=artifact_title,
artifact_abstract=artifact_abstract,
artifact_description=artifact_description,
license_url=license_url,
distributions=distributions,
)
Expand Down
13 changes: 9 additions & 4 deletions databusclient/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def app():
help="Target databus version/dataset identifier of the form "
"<https://databus.dbpedia.org/$ACCOUNT/$GROUP/$ARTIFACT/$VERSION>",
)
@click.option("--title", required=True, help="Dataset title")
@click.option("--abstract", required=True, help="Dataset abstract max 200 chars")
@click.option("--description", required=True, help="Dataset description")
@click.option("--title", required=True, help="Artifact title: the permanent name of the data series (applies to all versions)")
@click.option("--abstract", required=True, help="Version Abstract: a short summary (max 200 chars) specific to this timestamped release")
@click.option("--description", required=True, help="Version Description: detailed metadata for this specific release (supports Markdown)")
@click.option(
"--license", "license_url", required=True, help="License (see dalicc.net)"
)
Expand Down Expand Up @@ -82,7 +82,12 @@ def deploy(
click.echo(f"Deploying dataset version: {version_id}")

dataid = api_deploy.create_dataset(
version_id, title, abstract, description, license_url, distributions
version_id=version_id,
artifact_title=title,
artifact_abstract=abstract,
artifact_description=description,
license_url=license_url,
distributions=distributions
)
api_deploy.deploy(dataid=dataid, api_key=apikey)
return
Expand Down