Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
ES Subset Generator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ChEMBL
C
ChEMBL
Main Web Interface
ES Subset Generator
Commits
a96a6934
Commit
a96a6934
authored
Aug 12, 2020
by
David Mendez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start to create the subet generator service
parent
5348ec11
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
5 deletions
+28
-5
app/blueprints/subset_generator_blueprint/controllers/subset_generator_controller.py
...ator_blueprint/controllers/subset_generator_controller.py
+6
-5
app/blueprints/subset_generator_blueprint/services/__init__.py
...lueprints/subset_generator_blueprint/services/__init__.py
+0
-0
app/blueprints/subset_generator_blueprint/services/subset_generator_service.py
..._generator_blueprint/services/subset_generator_service.py
+20
-0
app/swagger/swagger.yaml
app/swagger/swagger.yaml
+2
-0
No files found.
app/blueprints/subset_generator_blueprint/controllers/subset_generator_controller.py
View file @
a96a6934
...
...
@@ -4,9 +4,11 @@
from
flask
import
Blueprint
,
jsonify
,
abort
,
request
from
app.blueprints.subset_generator_blueprint.controllers
import
marshmallow_schemas
from
app.blueprints.subset_generator_blueprint.services
import
subset_generator_service
from
app.request_validation.decorators
import
validate_form_with
,
validate_url_params_with
from
app
import
app_logging
SUBSET_GENERATOR_BLUEPRINT
=
Blueprint
(
'es_subsets'
,
__name__
)
...
...
@@ -24,11 +26,10 @@ def submit_subset_creation_from_ids():
app_logging
.
debug
(
f'origin_index:
{
origin_index
}
'
)
app_logging
.
debug
(
f'items_ids:
{
items_ids
}
'
)
try
:
# try:
return
jsonify
({
'msg'
:
'hola'
})
return
jsonify
({
'msg'
:
'hola'
})
except
subset_generator_service
.
SubsetGeneratorServiceError
as
error
:
# except es_proxy_service.ESProxyServiceError as error:
#
# abort(500, msg=f'Internal server error: {str(error)}')
\ No newline at end of file
abort
(
500
,
msg
=
f'Internal server error:
{
str
(
error
)
}
'
)
app/blueprints/subset_generator_blueprint/services/__init__.py
0 → 100644
View file @
a96a6934
app/blueprints/subset_generator_blueprint/services/subset_generator_service.py
0 → 100644
View file @
a96a6934
"""
Subset generator service
"""
class
SubsetGeneratorServiceError
(
Exception
):
"""Base class for exceptions in the properties configuration service."""
def
submit_subset_generation_from_ids
(
origin_index
,
items_ids
):
"""
Starts the process of the generation of the subset based on the ids passed as parameter
:param origin_index: source index for the subset
:param items_ids: ids of the items to include
:return: an id of the task to check it's progress
"""
return
{
'task_id'
:
'some_id'
}
app/swagger/swagger.yaml
View file @
a96a6934
...
...
@@ -40,6 +40,8 @@ paths:
description
:
'
List
of
IDs
to
used
to
create
the
subset
index'
required
:
true
type
:
'
array'
items
:
type
:
'
string'
default
:
[
'
CHEMBL27193'
,
'
CHEMBL4068896'
,
'
CHEMBL332148'
,
'
CHEMBL2431212'
,
'
CHEMBL4303667'
]
responses
:
'
200'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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