Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.pipelines
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.pipelines
Commits
7eb66c9d
Commit
7eb66c9d
authored
2 years ago
by
Yannick DAYER
Browse files
Options
Downloads
Patches
Plain Diff
[py] Support protocol names containing a dot char.
parent
14795fe2
No related branches found
No related tags found
1 merge request
!109
Add a way to retrieve protocol definition files
Pipeline
#69477
failed
2 years ago
Stage: qa
Stage: test
Stage: doc
Stage: dist
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/bob/pipelines/dataset/protocols/retrieve.py
+7
-6
7 additions, 6 deletions
src/bob/pipelines/dataset/protocols/retrieve.py
with
7 additions
and
6 deletions
src/bob/pipelines/dataset/protocols/retrieve.py
+
7
−
6
View file @
7eb66c9d
...
...
@@ -171,9 +171,9 @@ def get_protocol_path(
for
protocol_path
in
protocol_paths
:
if
archive
.
is_archive
(
protocol_path
):
_base
,
inner
=
archive
.
path_and_subdir
(
protocol_path
)
if
inner
.
stem
==
protocol
:
if
inner
.
name
==
protocol
:
return
protocol_path
elif
protocol_path
.
stem
==
protocol
:
elif
protocol_path
.
name
==
protocol
:
return
protocol_path
logger
.
warning
(
f
"
Protocol
{
protocol
}
not found in
{
database_name
}
.
"
)
return
None
...
...
@@ -232,14 +232,14 @@ def list_protocol_names(
# Handle a database archive having database_name as top-level directory
if
len
(
top_level_dirs
)
==
1
and
top_level_dirs
[
0
].
name
==
database_name
:
return
[
p
.
stem
p
.
name
for
p
in
archive
.
list_dirs
(
final_path
,
inner_dir
=
database_name
,
show_files
=
False
)
]
return
[
p
.
stem
for
p
in
top_level_dirs
]
return
[
p
.
name
for
p
in
top_level_dirs
]
# Not an archive: list the dirs
return
[
p
.
stem
for
p
in
final_path
.
iterdir
()
if
p
.
is_dir
()]
return
[
p
.
name
for
p
in
final_path
.
iterdir
()
if
p
.
is_dir
()]
def
open_definition_file
(
...
...
@@ -316,7 +316,8 @@ def list_group_names(
subdir
=
subdir
,
database_filename
=
database_filename
,
)
return
[
p
.
stem
for
p
in
paths
]
# Supports groups as files or dirs
return
[
p
.
stem
for
p
in
paths
]
# ! This means group can't include a '.'
def
download_protocol_definition
(
...
...
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