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
ecd08f6d
Commit
ecd08f6d
authored
2 years ago
by
Adam Laskowski
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-13300: Reformatted code, switched usage of deprecated iteritems() to items() in Things class
parent
6b274e21
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api-openbis-python3-pybis/src/python/pybis/things.py
+17
-20
17 additions, 20 deletions
api-openbis-python3-pybis/src/python/pybis/things.py
with
17 additions
and
20 deletions
api-openbis-python3-pybis/src/python/pybis/things.py
+
17
−
20
View file @
ecd08f6d
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
#
#
from
tabulate
import
tabulate
from
pandas
import
DataFrame
,
Series
import
pandas
as
pd
import
pandas
as
pd
from
pandas
import
DataFrame
from
tabulate
import
tabulate
class
Things
:
class
Things
:
...
@@ -38,20 +38,20 @@ class Things:
...
@@ -38,20 +38,20 @@ class Things:
"""
"""
def
__init__
(
def
__init__
(
self
,
self
,
openbis_obj
,
openbis_obj
,
entity
,
entity
,
identifier_name
=
"
code
"
,
identifier_name
=
"
code
"
,
additional_identifier
=
None
,
additional_identifier
=
None
,
start_with
=
None
,
start_with
=
None
,
count
=
None
,
count
=
None
,
totalCount
=
None
,
totalCount
=
None
,
single_item_method
=
None
,
single_item_method
=
None
,
response
=
None
,
response
=
None
,
df_initializer
=
None
,
df_initializer
=
None
,
objects_initializer
=
None
,
objects_initializer
=
None
,
attrs
=
None
,
attrs
=
None
,
props
=
None
,
props
=
None
,
):
):
self
.
openbis
=
openbis_obj
self
.
openbis
=
openbis_obj
self
.
entity
=
entity
self
.
entity
=
entity
...
@@ -251,8 +251,5 @@ class Things:
...
@@ -251,8 +251,5 @@ class Things:
get_item
=
getattr
(
self
.
openbis
,
"
get_
"
+
self
.
entity
)
get_item
=
getattr
(
self
.
openbis
,
"
get_
"
+
self
.
entity
)
for
item
in
self
.
df
[[
self
.
identifier_name
]][
for
item
in
self
.
df
[[
self
.
identifier_name
]][
self
.
identifier_name
self
.
identifier_name
].
iter
items
():
].
items
():
yield
get_item
(
item
[
1
])
yield
get_item
(
item
[
1
])
# yield getattr(self.openbis, 'get_' + self.entity)(item[1])
# return self.df[[self.identifier_name]].to_dict()[self.identifier_name]
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