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-dfs
csst-dfs-api
Commits
e6b59eac
Commit
e6b59eac
authored
Feb 15, 2023
by
Wei Shoulin
Browse files
add functional
parent
67343023
Changes
2
Show whitespace changes
Inline
Side-by-side
csst_dfs_api/functional/__init__.py
View file @
e6b59eac
...
@@ -7,7 +7,8 @@ def find_observation(
...
@@ -7,7 +7,8 @@ def find_observation(
obs_time
:
tuple
=
(
None
,
None
),
obs_time
:
tuple
=
(
None
,
None
),
qc0_status
:
int
=
-
1
,
qc0_status
:
int
=
-
1
,
prc_status
:
int
=
-
1
)
->
Result
:
prc_status
:
int
=
-
1
)
->
Result
:
return
ObservationApi
().
find
()
kwarg
=
locals
()
return
ObservationApi
().
find
(
**
kwarg
)
def
find_level0
(
obs_id
:
str
=
''
,
def
find_level0
(
obs_id
:
str
=
''
,
module_id
:
str
=
''
,
module_id
:
str
=
''
,
...
@@ -23,4 +24,5 @@ def find_level0(obs_id: str = '',
...
@@ -23,4 +24,5 @@ def find_level0(obs_id: str = '',
radius
:
float
=
None
,
radius
:
float
=
None
,
object_name
:
str
=
None
,
object_name
:
str
=
None
,
version
:
str
=
None
)
->
Result
:
version
:
str
=
None
)
->
Result
:
return
Level0DataApi
().
find
()
kwarg
=
locals
()
return
Level0DataApi
().
find
(
**
kwarg
)
\ No newline at end of file
tests/functional/test_func.py
0 → 100644
View file @
e6b59eac
import
unittest
from
csst_dfs_api
import
functional
as
F
class
CommonUtilsTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
pass
def
test_find_observation
(
self
):
result
=
F
.
find_observation
(
module_id
=
'MSC'
)
print
(
result
)
assert
result
.
success
,
result
.
message
def
test_find_level0
(
self
):
result
=
F
.
find_level0
()
print
(
result
)
assert
result
.
success
,
result
.
message
\ No newline at end of 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