Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
f2310818
Verified
Commit
f2310818
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into f-filesystem
parents
07b78cbf
2f216cef
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!86
Draft: ENH: file system: core
,
!58
F filesystem
Pipeline
#19492
passed with warnings
3 years ago
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
This commit is part of merge request
!86
. Comments created here will be created in the context of that merge request.
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
RELEASE_GUIDELINES.md
+4
-3
4 additions, 3 deletions
RELEASE_GUIDELINES.md
src/caosdb/apiutils.py
+14
-6
14 additions, 6 deletions
src/caosdb/apiutils.py
with
18 additions
and
9 deletions
RELEASE_GUIDELINES.md
+
4
−
3
Edit
View file @
f2310818
...
...
@@ -20,9 +20,10 @@ guidelines of the CaosDB Project
3.
Check all general prerequisites.
4.
Prepare
[
setup.py
](
./setup.py
)
: Check the
`MAJOR`
,
`MINOR`
,
`MICRO`
,
`PRE`
variables and set
`ISRELEASED`
to
`True`
. Use the possibility to issue
pre-release versions for testing.
4.
Update the version:
-
`version`
variables in
`src/doc/conf.py`
-
Version on
[
setup.py
](
./setup.py
)
: Check the
`MAJOR`
,
`MINOR`
,
`MICRO`
,
`PRE`
variables and set
`ISRELEASED`
to
`True`
. Use the possibility to issue pre-release versions for testing.
5.
Merge the release branch into the main branch.
...
...
This diff is collapsed.
Click to expand it.
src/caosdb/apiutils.py
+
14
−
6
Edit
View file @
f2310818
...
...
@@ -381,7 +381,10 @@ def _single_convert_to_python_object(robj, entity):
return
robj
def
_single_convert_to_entity
(
entity
,
robj
,
**
kwargs
):
def
_single_convert_to_entity
(
entity
,
robj
,
recursive_depth
,
**
kwargs
):
"""
recursive_depth: disabled if 0
"""
if
robj
.
_id
is
not
None
:
entity
.
id
=
robj
.
_id
...
...
@@ -407,16 +410,16 @@ def _single_convert_to_entity(entity, robj, **kwargs):
else
:
entity
.
add_parent
(
id
=
parent
)
def
add_property
(
entity
,
prop
,
name
,
recursive
=
False
,
datatype
=
None
):
def
add_property
(
entity
,
prop
,
name
,
_
recursive
=
False
,
datatype
=
None
):
if
datatype
is
None
:
raise
Argument
Error
(
"
d
atatype must not be None
"
)
raise
Runtime
Error
(
"
D
atatype must not be None
.
"
)
if
isinstance
(
prop
,
CaosDBPythonEntity
):
entity
.
add_property
(
name
=
name
,
value
=
str
(
prop
.
_id
),
datatype
=
datatype
)
if
recursive
and
not
prop
.
do_not_expand
:
return
convert_to_entity
(
prop
,
recursive
=
recursive
)
if
_
recursive
and
not
prop
.
do_not_expand
:
return
convert_to_entity
(
prop
,
recursive
=
_
recursive
)
else
:
return
[]
else
:
...
...
@@ -426,6 +429,11 @@ def _single_convert_to_entity(entity, robj, **kwargs):
return
[]
if
recursive_depth
==
0
:
recursive
=
False
else
:
recursive
=
True
for
prop
in
robj
.
_properties
:
value
=
robj
.
__getattribute__
(
prop
)
...
...
@@ -439,7 +447,7 @@ def _single_convert_to_entity(entity, robj, **kwargs):
if
recursive
and
not
v
.
do_not_expand
:
children
.
append
(
convert_to_entity
(
v
,
recursive
=
recursive
))
v
,
recursive
=
recursive
_depth
-
1
))
else
:
if
isinstance
(
v
,
float
)
or
isinstance
(
v
,
int
):
lst
.
append
(
str
(
v
))
...
...
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