Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
bioroboticslab
robofish
io
Commits
cb9656dc
Commit
cb9656dc
authored
2 years ago
by
Andi Gerken
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug in update_ids
parent
49d9e5b7
No related branches found
No related tags found
1 merge request
!40
Fixed bug in update_ids
Pipeline
#52655
passed
2 years ago
Stage: package
Stage: test
Stage: deploy
Changes
2
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/robofish/io/app.py
+7
-7
7 additions, 7 deletions
src/robofish/io/app.py
src/robofish/io/file.py
+3
-1
3 additions, 1 deletion
src/robofish/io/file.py
with
10 additions
and
8 deletions
src/robofish/io/app.py
+
7
−
7
View file @
cb9656dc
...
@@ -350,8 +350,8 @@ def update_individual_ids(args=None):
...
@@ -350,8 +350,8 @@ def update_individual_ids(args=None):
assert
n_fish
==
len
(
assert
n_fish
==
len
(
f
.
entities
f
.
entities
),
f
"
Number of fish in file
{
file
}
is not the same as in the previous file.
"
),
f
"
Number of fish in file
{
file
}
is not the same as in the previous file.
"
if
"
video
"
in
f
.
attrs
:
if
video
is
None
:
if
video
is
None
and
"
video
"
in
f
.
attrs
:
video
=
f
.
attrs
[
"
video
"
]
video
=
f
.
attrs
[
"
video
"
]
else
:
else
:
assert
(
assert
(
...
...
This diff is collapsed.
Click to expand it.
src/robofish/io/file.py
+
3
−
1
View file @
cb9656dc
...
@@ -79,6 +79,7 @@ class File(h5py.File):
...
@@ -79,6 +79,7 @@ class File(h5py.File):
calendar_time_points
:
Iterable
=
None
,
calendar_time_points
:
Iterable
=
None
,
open_copy
:
bool
=
False
,
open_copy
:
bool
=
False
,
validate_poses_hash
:
bool
=
True
,
validate_poses_hash
:
bool
=
True
,
calculate_data_on_close
:
bool
=
True
,
):
):
"""
Create a new RoboFish Track Format object.
"""
Create a new RoboFish Track Format object.
...
@@ -147,6 +148,7 @@ class File(h5py.File):
...
@@ -147,6 +148,7 @@ class File(h5py.File):
self
.
path
=
path
self
.
path
=
path
self
.
validate_when_saving
=
validate_when_saving
self
.
validate_when_saving
=
validate_when_saving
self
.
calculate_data_on_close
=
calculate_data_on_close
if
open_copy
:
if
open_copy
:
assert
(
assert
(
...
@@ -275,7 +277,7 @@ class File(h5py.File):
...
@@ -275,7 +277,7 @@ class File(h5py.File):
super
().
__exit__
(
type
,
value
,
traceback
)
super
().
__exit__
(
type
,
value
,
traceback
)
def
close
(
self
):
def
close
(
self
):
if
self
.
mode
!=
"
r
"
:
if
self
.
mode
!=
"
r
"
and
self
.
calculate_data_on_close
:
self
.
update_calculated_data
()
self
.
update_calculated_data
()
super
().
close
()
super
().
close
()
...
...
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