Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.pad.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
bob
bob.pad.base
Commits
84636182
Commit
84636182
authored
8 years ago
by
Amir Mohammadi
Committed by
Pavel KORSHUNOV
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
convert annotation files to filesets too
parent
769aeb47
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!8
Adds annotations for PAD (similar to bob.bio.base)
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/pad/base/test/dummy/database.py
+3
-0
3 additions, 0 deletions
bob/pad/base/test/dummy/database.py
bob/pad/base/test/dummy/database_sql.py
+3
-0
3 additions, 0 deletions
bob/pad/base/test/dummy/database_sql.py
bob/pad/base/tools/FileSelector.py
+5
-1
5 additions, 1 deletion
bob/pad/base/tools/FileSelector.py
with
11 additions
and
1 deletion
bob/pad/base/test/dummy/database.py
+
3
−
0
View file @
84636182
...
...
@@ -190,5 +190,8 @@ class TestDatabase(PadDatabase):
fileset
+=
[
TestFile
(
dummy_test_list
[
1
],
6
)]
return
fileset
def
annotations
(
self
,
file
):
return
None
database
=
TestDatabase
(
original_directory
=
data_dir
,
original_extension
=
''
)
This diff is collapsed.
Click to expand it.
bob/pad/base/test/dummy/database_sql.py
+
3
−
0
View file @
84636182
...
...
@@ -56,4 +56,7 @@ class TestDatabaseSql (bob.pad.base.database.PadDatabase, bob.db.base.SQLiteData
def
objects
(
self
,
groups
=
None
,
protocol
=
None
,
purposes
=
None
,
model_ids
=
None
,
**
kwargs
):
return
list
(
self
.
query
(
TestFileSql
))
def
annotations
(
self
,
file
):
return
None
database
=
TestDatabaseSql
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
bob/pad/base/tools/FileSelector.py
+
5
−
1
View file @
84636182
...
...
@@ -149,7 +149,11 @@ class FileSelector(object):
def
annotation_list
(
self
,
groups
=
None
):
"""
Returns the list of annotations objects.
"""
return
self
.
database
.
all_files
(
groups
=
groups
)
files
=
self
.
database
.
all_files
(
groups
=
groups
)
if
len
(
files
)
!=
2
:
return
files
else
:
return
files
[
0
]
+
files
[
1
]
def
get_annotations
(
self
,
annotation_file
):
"""
Returns the annotations of the given file.
"""
...
...
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