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
c20ed47f
Commit
c20ed47f
authored
Nov 18, 2021
by
Wei Shoulin
Browse files
no ver
parent
90771d93
Changes
3
Hide whitespace changes
Inline
Side-by-side
Dockerfile
0 → 100644
View file @
c20ed47f
from
python:3.8.1-slim
RUN
apt-get update
-y
--allow-unauthenticated
&&
apt-get
install
curl git
-y
--allow-unauthenticated
RUN
curl https://raw.fastgit.org/astronomical-data-processing/csst-dfs-api/master/tools/csst-dfs-api-install.sh
>>
/csst-dfs-api-install.sh
RUN
chmod
a+x /csst-dfs-api-install.sh
# RUN /csst-dfs-api-install.sh
\ No newline at end of file
tests/test_common_catalog.py
View file @
c20ed47f
import
os
import
os
import
unittest
import
unittest
from
astropy.io
import
fits
from
astropy.io
import
fits
import
time
from
csst_dfs_api.common.catalog
import
CatalogApi
from
csst_dfs_api.common.catalog
import
CatalogApi
...
@@ -10,14 +11,16 @@ class CommonCatalogTestCase(unittest.TestCase):
...
@@ -10,14 +11,16 @@ class CommonCatalogTestCase(unittest.TestCase):
self
.
api
=
CatalogApi
()
self
.
api
=
CatalogApi
()
def
test_catalog_query
(
self
):
def
test_catalog_query
(
self
):
t
=
time
.
time
()
result
=
self
.
api
.
catalog_query
(
result
=
self
.
api
.
catalog_query
(
ra
=
1
60
,
ra
=
1
28
,
# 15415
dec
=-
17
,
dec
=-
40
,
radius
=
0.
2
,
radius
=
0.
5
,
catalog_name
=
'gaia3'
,
catalog_name
=
'gaia3'
,
min_mag
=-
1
,
min_mag
=-
1
,
max_mag
=-
1
,
max_mag
=-
1
,
obstime
=
-
1
,
obstime
=
-
1
,
limit
=
2
limit
=
2
)
)
print
(
'used:'
,
time
.
time
()
-
t
)
print
(
'return:'
,
result
)
print
(
'return:'
,
result
)
tools/csst-dfs-api-install.sh
View file @
c20ed47f
...
@@ -2,15 +2,6 @@ echo "CSST-DFS-API Installer"
...
@@ -2,15 +2,6 @@ echo "CSST-DFS-API Installer"
echo
"=============================================="
echo
"=============================================="
version
=
""
version
=
""
if
[
$#
==
0
]
;
then
version
=
""
elif
[
$#
==
1
]
;
then
version
=
"@
$1
"
else
echo
"USAGE:
$0
[version]"
echo
" e.g.:
$0
v0.0.1"
exit
1
;
fi
pip uninstall csst-dfs-api-local
-y
pip uninstall csst-dfs-api-local
-y
pip uninstall csst-dfs-api-cluster
-y
pip uninstall csst-dfs-api-cluster
-y
...
...
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