Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Moore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
LHCb
Moore
Commits
fd805d81
Commit
fd805d81
authored
9 months ago
by
Roel Aaij
Committed by
Christopher Rob Jones
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Insert hash of downloaded MDF files before the extension instead of at the beginning
parent
3cbb2aaf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!4232
Run5: rebase, restructure run5 code, add back examples
,
!3700
Synchronize master branch with 2024-patches
,
!3521
Insert hash of downloaded MDF files before the extension instead of at the beginning
Pipeline
#7812762
passed
8 months ago
Stage: check
Stage: build
Stage: docs
Stage: .post
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Hlt/Moore/python/Moore/qmtest/context.py
+6
-3
6 additions, 3 deletions
Hlt/Moore/python/Moore/qmtest/context.py
with
6 additions
and
3 deletions
Hlt/Moore/python/Moore/qmtest/context.py
+
6
−
3
View file @
fd805d81
...
...
@@ -111,12 +111,15 @@ def download_inputs_locally(urls, dest_dir, assertion_endswith, max_size=None):
url
=
url
[
4
:]
if
url
not
in
local_files
:
# prepend hash of full URL in case basenames are not unique
basename
=
'
{}_{}
'
.
format
(
hashlib
.
md5
(
url
.
encode
()).
hexdigest
(),
os
.
path
.
basename
(
url
))
basename
=
os
.
path
.
basename
(
url
)
assertion
=
0
for
ending
in
assertion_endswith
:
assertion
+=
basename
.
endswith
(
ending
)
assert
assertion
stem
,
ext
=
os
.
path
.
splitext
(
basename
)
basename
=
'
{}_{}{}
'
.
format
(
stem
,
hashlib
.
md5
(
url
.
encode
()).
hexdigest
(),
ext
)
dest
=
os
.
path
.
join
(
dest_dir
,
basename
)
src_size
=
xrd_size
(
url
)
...
...
@@ -158,7 +161,7 @@ def download_inputs_locally(urls, dest_dir, assertion_endswith, max_size=None):
def
download_digi_inputs_locally
(
urls
,
dest_dir
,
max_size
=
None
):
"""
Calls download_inputs_locally specifically for digi or xdigi files.
Calls download_inputs_locally specifically for digi or xdigi files.
"""
assertion_endswith
=
[
'
.digi
'
,
'
.xdigi
'
]
return
download_inputs_locally
(
...
...
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