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
70c2067b
Commit
70c2067b
authored
May 07, 2025
by
BO ZHANG
🏀
Browse files
update msc cli
parent
33f289fe
Changes
4
Show whitespace changes
Inline
Side-by-side
csst_dag/cli/msc.py
View file @
70c2067b
...
...
@@ -28,11 +28,11 @@ DAG_LOOP_MAP = {
}
for
obs_type
,
dag_ids
in
DAG_LOOP_MAP
.
items
():
print
(
f
"Processing
{
obs_type
}
"
)
print
(
f
"
*
Processing
{
obs_type
}
"
)
for
dag_id
in
dag_ids
:
print
(
f
" -
{
dag_id
}
"
)
print
(
f
"
-
{
dag_id
}
··· "
,
end
=
"
"
)
dag
=
dags
.
get_dag
(
dag_id
=
dag_id
)
dag
.
schedule
(
msgs
=
dag
.
schedule
(
dataset
=
args
.
dataset
,
obs_type
=
args
.
obs_type
,
project_id
=
args
.
project_id
,
...
...
@@ -41,3 +41,4 @@ for obs_type, dag_ids in DAG_LOOP_MAP.items():
final_prc_status
=-
2
,
demo
=
True
,
)
print
(
f
"
{
len
(
msgs
)
}
tasks scheduled."
)
csst_dag/dag/__init__.py
View file @
70c2067b
...
...
@@ -23,26 +23,6 @@ class CsstDAG:
assert
dag_id
in
DAG_LIST
,
f
"
{
dag_id
}
not in DAG_LIST"
return
DAG_MAP
[
dag_id
]
def
trigger
(
self
,
dag_id
:
str
=
""
,
**
kwargs
,
):
pass
def
schedule
(
self
,
dag_id
:
str
=
""
,
**
kwargs
,
):
pass
def
push
(
self
,
dag_id
:
str
=
""
,
**
kwargs
,
):
pass
dags
=
CsstDAG
()
@
staticmethod
def
get_all
():
return
DAG_MAP
csst_dag/trigger/__init__.py
deleted
100644 → 0
View file @
33f289fe
csst_dag/trigger/csst-msc-l1-mbi.py
deleted
100644 → 0
View file @
33f289fe
from
csst_dag.constants
import
MSC_MBI_CHIPID
from
csst_dag
import
DFS
from
csst_dfs_client
import
plan
,
level0
from
..dag._dag_list
import
DAG_LIST
class
CsstMscL1Mbi
:
def
__init__
(
self
):
pass
@
staticmethod
def
schedule
(
dag_id
:
str
=
"csst-msc-l1-mbi"
,
dataset
:
str
=
"csst-msc-c9-25sqdeg-v3"
,
obs_type
:
str
=
"WIDE"
,
project_id
:
str
=
"none"
,
batch_id
:
str
|
None
=
"default"
,
**
kwargs
,
):
pass
# Write plan to DFS
# result = plan.write_file("/nfs/simulation-collection/csst-msc-c9-25sqdeg-v3/plan.json")
# print(result)
# search plan
# # plan.find(instrument="MSC")
# res_plan = plan.find(
# dataset="csst-msc-c9-25sqdeg-v3",
# instrument="MSC",
# obs_type="WIDE",
# project_id="none",
# )
# print(res_plan.data[0])
# assert res_plan.success, res_plan.message
res_level0
=
level0
.
find
(
dataset
=
"csst-msc-c9-25sqdeg-v3"
,
instrument
=
"MSC"
,
obs_type
=
"WIDE"
,
prc_status
=-
1024
,
)
# process as there is
for
rec
in
res_level0
.
data
:
print
(
rec
)
print
(
res_level0
.
data
[
0
])
print
(
res_level0
.
data
[
0
].
keys
())
print
(
res_level0
)
assert
res_level0
.
success
,
res_level0
.
message
# 不对project的数据完整性进行检查,只对数据的存在性进行检查
# print(__file__)
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