Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jass
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Léo HENCHES
jass
Commits
cf1a04b3
Commit
cf1a04b3
authored
1 year ago
by
Bryan BRANCOTTE
Browse files
Options
Downloads
Patches
Plain Diff
list available initTable
parent
5b66fbf1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
jass/server.py
+8
-0
8 additions, 0 deletions
jass/server.py
jass/test/test_server.py
+6
-0
6 additions, 0 deletions
jass/test/test_server.py
with
14 additions
and
0 deletions
jass/server.py
+
8
−
0
View file @
cf1a04b3
...
...
@@ -52,6 +52,14 @@ async def read_index():
return
RedirectResponse
(
url
=
"
/webui/
"
)
@app.get
(
"
/api/tables
"
,
response_model
=
List
[
str
])
def
inittable_list
():
"""
List initTables
"""
for
filename
in
os
.
listdir
(
config
[
"
DATA_DIR
"
]
):
if
filename
.
endswith
(
"
.hdf5
"
)
and
"
worktable
"
not
in
filename
:
yield
filename
@app.post
(
"
/api/phenotypes
"
,
response_model
=
List
[
Phenotype
])
def
phenotypes_list
(
init_table_name
:
InitTableNameModel
):
"""
List phenotypes
"""
...
...
This diff is collapsed.
Click to expand it.
jass/test/test_server.py
+
6
−
0
View file @
cf1a04b3
...
...
@@ -70,6 +70,12 @@ class TestDefaultController(JassWebClientTestCase):
self
.
assertNotEqual
(
respT1
,
respMain
)
self
.
assertSetEqual
(
set
(
respMain
.
keys
()),
{
'
nb_phenotypes
'
,
'
nb_snps
'
,
'
name
'
,
'
desc
'
})
def
test_get_tables
(
self
):
response
=
self
.
testing_client
.
get
(
"
/api/tables
"
)
self
.
assert200
(
response
,
"
Response body is :
"
+
response
.
content
.
decode
(
"
utf-8
"
))
resp
=
json
.
loads
(
response
.
content
.
decode
(
"
utf-8
"
))
self
.
assertSetEqual
({
"
initTable.hdf5
"
,
"
initTableTest1.hdf5
"
},
set
(
resp
))
if
__name__
==
"
__main__
"
:
import
unittest
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment