Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-cicd
csst-dag
Commits
f5260208
Commit
f5260208
authored
May 08, 2025
by
BO ZHANG
🏀
Browse files
tweaks
parent
9188a8dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_dag/cli/msc.py
View file @
f5260208
"""
Aim
---
Process an MSC dataset, given
- project_id = "none"
- obs_type = ""
- batch_id = "csci-test-20250507"
Process an MSC dataset, given a set of parameters.
Example
-------
python -m csst_dag.cli.msc --dataset=csst-msc-c9-25sqdeg-v3 --project-id=none --batch-id=csci-test-20250507
python -m csst_dag.cli.msc
\
--dataset=csst-msc-c9-25sqdeg-v3
\
--project-id=none
\
--batch-id=csci-test-20250507
\
--priority=1
\
--initial-prc-status=-1024
\
--final-prc-status=-2
"""
from
csst_dag.dag
import
CsstDAG
import
argparse
# python -m csst_dag.trigger.csst-msc-l1-mbi -h
# python -m csst_dag.trigger.csst-msc-l1-mbi --dataset csst-msc-c9-25sqdeg-v3 --batch-id
parser
=
argparse
.
ArgumentParser
(
description
=
"Scheduler for MSC L1 pipeline."
,
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
,
...
...
@@ -25,7 +26,14 @@ parser.add_argument("--dataset", type=str, help="Dataset name")
# parser.add_argument("--instrument", type=str, help="Instrument name", default="MSC")
parser
.
add_argument
(
"--obs-type"
,
type
=
str
,
help
=
"Observation type"
,
default
=
""
)
parser
.
add_argument
(
"--project-id"
,
type
=
str
,
help
=
"Project ID"
,
default
=
"none"
)
parser
.
add_argument
(
"--batch-id"
,
type
=
str
,
help
=
"Batch ID"
,
default
=
"default"
)
parser
.
add_argument
(
"--batch-id"
,
type
=
str
,
help
=
"Batch ID"
,
default
=
"default_batch"
)
parser
.
add_argument
(
"--priority"
,
type
=
str
,
help
=
"Task priority"
,
default
=
1
)
parser
.
add_argument
(
"--initial-prc-status"
,
type
=
int
,
help
=
"Initial processing status"
,
default
=-
1024
)
parser
.
add_argument
(
"--final-prc-status"
,
type
=
int
,
help
=
"Final processing status"
,
default
=-
2
)
args
=
parser
.
parse_args
()
print
(
"CLI parameters: "
,
args
)
...
...
@@ -51,8 +59,9 @@ for obs_type, dag_ids in DAG_LOOP_MAP.items():
obs_type
=
obs_type
,
project_id
=
args
.
project_id
,
batch_id
=
args
.
batch_id
,
initial_prc_status
=
-
2
,
final_prc_status
=
-
2
,
initial_prc_status
=
args
.
initial_prc_status
,
final_prc_status
=
args
.
final_prc_status
,
demo
=
True
,
priority
=
args
.
priority
,
)
print
(
f
"
{
len
(
msgs
)
}
tasks."
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment