Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,29 +194,36 @@ Usage: databusclient download [OPTIONS] DATABUSURIS...
using --convert-to and --convert-from options.

Options:
Options:

--localdir TEXT Local databus folder (if not given, databus
folder structure is created in current working
directory)

--databus TEXT Databus URL (if not given, inferred from
databusuri, e.g.
https://databus.dbpedia.org/sparql)

--vault-token TEXT Path to Vault refresh token file

--databus-key TEXT Databus API key to download from protected
databus

--all-versions When downloading artifacts, download all
versions instead of only the latest

--validate-checksum Validate checksums of downloaded files and fail
on mismatch

--authurl TEXT Keycloak token endpoint URL [default:
https://auth.dbpedia.org/realms/dbpedia/protocol
/openid-connect/token]
--clientid TEXT Client ID for token exchange [default: vault-
token-exchange]
--convert-to [bz2|gz|xz] Target compression format for on-the-fly
conversion during download (supported: bz2, gz,
xz)
--convert-from [bz2|gz|xz] Source compression format to convert from
(optional filter). Only files with this
compression will be converted.
openid-connect/token]

--clientid TEXT Client ID for token exchange [default:
vault-token-exchange]

--help Show this message and exit.

```

#### Examples of using the download command
Expand Down Expand Up @@ -318,9 +325,9 @@ Options:
--version-id TEXT Target databus version/dataset identifier of the form <h
ttps://databus.dbpedia.org/$ACCOUNT/$GROUP/$ARTIFACT/$VE
RSION> [required]
--title TEXT Dataset title [required]
--abstract TEXT Dataset abstract max 200 chars [required]
--description TEXT Dataset description [required]
--title TEXT Artifact & version title (applied to both) [required]
--abstract TEXT Artifact & version abstract (max 200 chars; applied to both) [required]
--description TEXT Artifact & version description (applied to both) [required]
--license TEXT License (see dalicc.net) [required]
--apikey TEXT API key [required]
--metadata PATH Path to metadata JSON file (for metadata mode)
Expand Down
1 change: 0 additions & 1 deletion databusclient/api/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ def _download_file(
# for user-friendly CLI output.
vault_token = __get_vault_access__(url, vault_token_file, auth_url, client_id)
headers["Authorization"] = f"Bearer {vault_token}"
headers["Accept-Encoding"] = "identity"

# Retry with token
response = requests.get(url, headers=headers, stream=True, timeout=30)
Expand Down
22 changes: 18 additions & 4 deletions databusclient/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,22 @@ 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="Artifact & Version Title: used for BOTH artifact and version. Keep stable across releases; identifies the data series.")
@click.option("--abstract", required=True, help="Artifact & Version Abstract: used for BOTH artifact and version (max 200 chars). Updating it changes both artifact and version metadata.")
@click.option("--description", required=True, help="Artifact & Version Description: used for BOTH artifact and version. Supports Markdown. Updating it changes both artifact and version metadata.")
@click.option(
"--title",
required=True,
help="Artifact & Version Title: used for BOTH artifact and version. Keep stable across releases; identifies the data series.",
)
@click.option(
"--abstract",
required=True,
help="Artifact & Version Abstract: used for BOTH artifact and version (max 200 chars). Updating it changes both artifact and version metadata.",
)
@click.option(
"--description",
required=True,
help="Artifact & Version Description: used for BOTH artifact and version. Supports Markdown. Updating it changes both artifact and version metadata.",
)

@click.option(
"--license", "license_url", required=True, help="License (see dalicc.net)"
)
Expand Down Expand Up @@ -180,8 +193,9 @@ def deploy(
@click.option(
"--validate-checksum",
is_flag=True,
help="Validate checksums of downloaded files"
help="Validate checksums of downloaded files and fail on mismatch"
)

def download(
databusuris: List[str],
localdir,
Expand Down