Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.pad.base
Commits
84636182
Commit
84636182
authored
Apr 03, 2017
by
Amir Mohammadi
Committed by
Pavel KORSHUNOV
May 08, 2017
Browse files
convert annotation files to filesets too
parent
769aeb47
Changes
3
Hide whitespace changes
Inline
Side-by-side
bob/pad/base/test/dummy/database.py
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
=
''
)
bob/pad/base/test/dummy/database_sql.py
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
bob/pad/base/tools/FileSelector.py
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."""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment