Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DaVinci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
DaVinci
Commits
66891b16
Commit
66891b16
authored
2 years ago
by
Davide Fazzini
Committed by
Patrick Koppenburg
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Adding error message when using 'run-mc'
parent
9e40dc59
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1103
Draft: Add AnalysisHelpers to DaVinci Stack
,
!708
Adding error message when using 'run-mc'
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DaVinciSys/scripts/davinci
+6
-3
6 additions, 3 deletions
DaVinciSys/scripts/davinci
Phys/DaVinci/python/DaVinci/utilities_script.py
+11
-0
11 additions, 0 deletions
Phys/DaVinci/python/DaVinci/utilities_script.py
with
17 additions
and
3 deletions
DaVinciSys/scripts/davinci
+
6
−
3
View file @
66891b16
...
@@ -30,9 +30,9 @@ A DaVinci job can be run using the command line:
...
@@ -30,9 +30,9 @@ A DaVinci job can be run using the command line:
"""
"""
import
os
,
sys
,
click
import
os
,
sys
,
click
from
DaVinci.utilities_script
import
(
dump_call
,
get_configurable_opts
,
from
DaVinci.utilities_script
import
(
set_testfiledb
,
create_inputdb_template
,
dump_call
,
get_configurable_opts
,
set_testfiledb
,
create_inputdb_template
,
create_jobopt_template
,
get_dummy_config
)
create_jobopt_template
,
get_dummy_config
,
check_for_deprecated_command
)
from
DaVinci.Configuration
import
run_davinci_app
from
DaVinci.Configuration
import
run_davinci_app
from
DaVinci.config
import
options
from
DaVinci.config
import
options
from
DaVinci.optionChecker
import
log_click
from
DaVinci.optionChecker
import
log_click
...
@@ -222,6 +222,9 @@ def main_command(ctx, inputfiledb, joboptfile, override_data_options):
...
@@ -222,6 +222,9 @@ def main_command(ctx, inputfiledb, joboptfile, override_data_options):
inputfiledb_key
,
inputfiledb_file
=
set_testfiledb
(
inputfiledb
)
inputfiledb_key
,
inputfiledb_file
=
set_testfiledb
(
inputfiledb
)
# Temporary check raising an error message if the deprecated 'run-mc' command is used.
check_for_deprecated_command
(
ctx_args
)
dump_call
(
inputfiledb_file
,
inputfiledb_key
,
joboptfile
,
ctx_args
)
dump_call
(
inputfiledb_file
,
inputfiledb_key
,
joboptfile
,
ctx_args
)
config
=
run_davinci_app
(
config
=
run_davinci_app
(
...
...
This diff is collapsed.
Click to expand it.
Phys/DaVinci/python/DaVinci/utilities_script.py
+
11
−
0
View file @
66891b16
...
@@ -206,3 +206,14 @@ def create_inputdb_template(file_name="inputdb_template.yaml"):
...
@@ -206,3 +206,14 @@ def create_inputdb_template(file_name="inputdb_template.yaml"):
with
open
(
file_name
,
'
w
'
)
as
inputdb_file
:
with
open
(
file_name
,
'
w
'
)
as
inputdb_file
:
inputdb_file
.
write
(
template_str
)
inputdb_file
.
write
(
template_str
)
def
check_for_deprecated_command
(
ctx_args
):
"""
Temporary check raising an error message if the deprecated
'
run-mc
'
command is used.
"""
import
click
if
len
(
ctx_args
)
>
1
:
if
"
run-mc
"
in
ctx_args
:
message
=
"
The command
'
run-mc
'
is now deprecated. DaVinci can be run with
'
./run davinci
'"
raise
Exception
(
f
"
{
click
.
style
(
message
,
bold
=
True
,
fg
=
'
red
'
)
}
"
)
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