diff --git a/app-openbis-command-line/src/python/obis/__init__.py b/app-openbis-command-line/src/python/obis/__init__.py index 6d545ea634c5102d20c88e11a3896288072380fb..abd8a4890fa52459461d855954ec5ebd2b9eef24 100644 --- a/app-openbis-command-line/src/python/obis/__init__.py +++ b/app-openbis-command-line/src/python/obis/__init__.py @@ -14,6 +14,6 @@ # __author__ = "ID SIS • ETH Zürich" __email__ = "openbis-support@id.ethz.ch" -__version__ = "0.4.2rc7" +__version__ = "0.4.2" from .dm import * diff --git a/app-openbis-command-line/src/python/obis/dm/commands/search.py b/app-openbis-command-line/src/python/obis/dm/commands/search.py index 3198164bd1675c6c1b73c3b52afd55527ffe772b..5f525bb814655fcda870daa859a5fad6dfddf284 100644 --- a/app-openbis-command-line/src/python/obis/dm/commands/search.py +++ b/app-openbis-command-line/src/python/obis/dm/commands/search.py @@ -30,7 +30,8 @@ def _dfs(objects, prop, func, func_specific): with concurrent.futures.ThreadPoolExecutor( max_workers=5) as pool_simple, concurrent.futures.ThreadPoolExecutor( max_workers=20) as pool_full: - stack = [openbis_obj[prop] for openbis_obj in objects] # datasets and samples provide children in different formats + stack = [openbis_obj[prop] for openbis_obj in + objects] # datasets and samples provide children in different formats visited = set() stack.reverse() output = [] @@ -180,10 +181,8 @@ class Search(OpenbisCommand): return self.openbis.get_samples(identifier, attrs=["children", "dataSets"]) def _get_sample_with_datasets(self, identifier): - return self.openbis.get_sample(identifier, withDataSetIds=True) - - def _get_sample_with_datasets2(self, identifier): - return self.openbis.get_sample(identifier, withDataSetIds=True, raw_response=True) + return self.openbis.get_sample(identifier, withDataSetIds=True, raw_response=True, + props=self.props) def _search_samples(self, raw_response=False): """Helper method to search samples""" @@ -202,8 +201,8 @@ class Search(OpenbisCommand): results = self.openbis.get_samples(**args) if self.recursive: - click_echo(f"Recursive search enabled. It may take time to produce results.") - output2 = _dfs_samples(results['objects'], 'identifier', self._get_sample_with_datasets2) + click_echo("Recursive search enabled. It may take time to produce results.") + output2 = _dfs_samples(results['objects'], 'identifier', self._get_sample_with_datasets) search_results = output2 else: @@ -237,7 +236,7 @@ class Search(OpenbisCommand): datasets = [x["dataSets"] for x in search_results] datasets = flatten(datasets) datasets = [x['permId']['permId'] for x in datasets] - datasets = self.openbis.get_dataset(permIds=datasets) + datasets = self.openbis.get_dataset(permIds=datasets, props=self.props) filtered_datasets = [] for dataset in datasets: diff --git a/app-openbis-command-line/src/python/setup.py b/app-openbis-command-line/src/python/setup.py index 993559aaf6330ec95493a046ac3cc10e94c2ef62..e6b3c06626f16cfd361977252b3fa16681624786 100644 --- a/app-openbis-command-line/src/python/setup.py +++ b/app-openbis-command-line/src/python/setup.py @@ -31,7 +31,7 @@ data_files = [ setup( name="obis", - version="0.4.2rc7", + version="0.4.2", description="Local data management with assistance from OpenBIS.", long_description=long_description, long_description_content_type="text/markdown",