Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
c343a562
Commit
c343a562
authored
2 years ago
by
Swen Vermeul
Browse files
Options
Downloads
Patches
Plain Diff
fixed changelog
parent
9f6d7693
No related branches found
No related tags found
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pybis/src/python/CHANGELOG.md
+4
-0
4 additions, 0 deletions
pybis/src/python/CHANGELOG.md
pybis/src/python/pybis/cli.py
+37
-5
37 additions, 5 deletions
pybis/src/python/pybis/cli.py
pybis/src/python/setup.cfg
+5
-1
5 additions, 1 deletion
pybis/src/python/setup.cfg
with
46 additions
and
6 deletions
pybis/src/python/CHANGELOG.md
+
4
−
0
View file @
c343a562
## 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
...
...
This diff is collapsed.
Click to expand it.
pybis/src/python/pybis/cli.py
+
37
−
5
View file @
c343a562
...
@@ -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
))
...
...
This diff is collapsed.
Click to expand it.
pybis/src/python/setup.cfg
+
5
−
1
View file @
c343a562
[metadata]
[metadata]
name
=
PyBIS
name
=
PyBIS
version
=
1.3
3.2
version
=
1.3
4.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
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment