Skip to content
Snippets Groups Projects
Commit c343a562 authored by Swen Vermeul's avatar Swen Vermeul
Browse files

fixed changelog

parent 9f6d7693
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
## Changes with pybis-1.34.0
- add experimental support for datasets via cli
## Changes with pybis-1.33.2 ## Changes with pybis-1.33.2
- fix openbis.support.email key error - fix openbis.support.email key error
......
...@@ -130,17 +130,49 @@ def dataset(ctx): ...@@ -130,17 +130,49 @@ def dataset(ctx):
@click.argument("permid", required=True) @click.argument("permid", required=True)
def get_dataset(permid, **kwargs): def get_dataset(permid, **kwargs):
"""get a dataset by its permId""" """get a dataset by its permId"""
print(permid)
print(kwargs)
openbis = get_openbis(**kwargs) openbis = get_openbis(**kwargs)
print(openbis) ds = openbis.get_dataset(permid)
click.echo(ds.__repr__())
click.echo("")
click.echo("Files in this dataset")
click.echo("---------------------")
click.echo(ds.get_files())
@dataset.command("download") @dataset.command("download")
@openbis_conn_options
@click.argument("permid", required=True) @click.argument("permid", required=True)
def download_dataset(permid, **kwargs): @click.argument("fileno", nargs=-1)
@click.option(
"--destination",
"-d",
type=click.Path(exists=True),
help="where to download your dataset",
)
def download_dataset(permid, destination, fileno, **kwargs):
"""download a dataset by permId""" """download a dataset by permId"""
click.echo(permid) openbis = get_openbis(**kwargs)
try:
ds = openbis.get_dataset(permid)
except ValueError as exc:
raise click.ClickException(exc)
create_default_folders = False if destination else True
if fileno:
all_files = ds.get_files()
files = []
for loc in fileno:
files.append(all_files.loc[int(loc)]["pathInDataSet"])
print(files)
ds.download(
destination=destination,
create_default_folders=create_default_folders,
files=files,
)
else:
ds.download(
destination=destination, create_default_folders=create_default_folders
)
@cli.command("local", context_settings=dict(ignore_unknown_options=True)) @cli.command("local", context_settings=dict(ignore_unknown_options=True))
......
[metadata] [metadata]
name = PyBIS name = PyBIS
version = 1.33.2 version = 1.34.0rc1
author = Swen Vermeul • ID SIS • ETH Zürich author = Swen Vermeul • ID SIS • ETH Zürich
author_email = swen@ethz.ch author_email = swen@ethz.ch
license = Apache Software License Version 2.0 license = Apache Software License Version 2.0
...@@ -13,6 +13,10 @@ classifiers = ...@@ -13,6 +13,10 @@ classifiers =
License :: OSI Approved :: Apache Software License License :: OSI Approved :: Apache Software License
Operating System :: OS Independent Operating System :: OS Independent
[options.entry_points]
console_scripts =
pybis = pybis.cli:cli
[options] [options]
packages = find: packages = find:
install_requires = install_requires =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment