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
f77b60ac
Commit
f77b60ac
authored
Jul 09, 2025
by
BO ZHANG
🏀
Browse files
assert data_basis and plan_basis non-zero
parent
6f2b7509
Changes
1
Show whitespace changes
Inline
Side-by-side
csst_dag/dag/_dispatcher.py
View file @
f77b60ac
...
...
@@ -197,9 +197,11 @@ class Dispatcher:
return
data_basis
@
staticmethod
def
find_plan_level0_basis
(
**
kwargs
)
->
tuple
(
table
.
Table
)
:
def
find_plan_level0_basis
(
**
kwargs
)
->
tuple
[
table
.
Table
]
:
data_basis
=
Dispatcher
.
find_level0_basis
(
**
kwargs
)
plan_basis
=
Dispatcher
.
find_plan_basis
(
**
kwargs
)
assert
len
(
data_basis
)
>
0
,
data_basis
assert
len
(
plan_basis
)
>
0
,
plan_basis
u_data_basis
=
table
.
unique
(
data_basis
[
"dataset"
,
"obs_id"
])
relevant_plan
=
table
.
join
(
u_data_basis
,
...
...
@@ -207,12 +209,15 @@ class Dispatcher:
keys
=
[
"dataset"
,
"obs_id"
],
join_type
=
PLAN_JOIN_TYPE
,
)
assert
len
(
relevant_plan
)
>
0
,
relevant_plan
return
relevant_plan
,
data_basis
@
staticmethod
def
find_plan_level1_basis
(
**
kwargs
)
->
tuple
(
table
.
Table
)
:
def
find_plan_level1_basis
(
**
kwargs
)
->
tuple
[
table
.
Table
]
:
data_basis
=
Dispatcher
.
find_level1_basis
(
**
kwargs
)
plan_basis
=
Dispatcher
.
find_plan_basis
(
**
kwargs
)
assert
len
(
data_basis
)
>
0
,
data_basis
assert
len
(
plan_basis
)
>
0
,
plan_basis
u_data_basis
=
table
.
unique
(
data_basis
[
"dataset"
,
"obs_id"
])
relevant_plan
=
table
.
join
(
u_data_basis
,
...
...
@@ -220,6 +225,7 @@ class Dispatcher:
keys
=
[
"dataset"
,
"obs_id"
],
join_type
=
PLAN_JOIN_TYPE
,
)
assert
len
(
relevant_plan
)
>
0
,
relevant_plan
return
relevant_plan
,
data_basis
@
staticmethod
...
...
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