Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
d24d7dc4
Commit
d24d7dc4
authored
Jul 06, 2020
by
Alexander Lercher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverted small changes to make swagger work again
parent
567d499c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
27 deletions
+16
-27
swagger.yml
...role-stage-discovery-microservice/app/configs/swagger.yml
+3
-8
__init__.py
...-stage-discovery-microservice/app/db/entities/__init__.py
+7
-0
repository.py
...ub/role-stage-discovery-microservice/app/db/repository.py
+5
-7
test.py
...overy-microservice/app/processing/similarityFiles/test.py
+0
-11
clustersets.py
...le-stage-discovery-microservice/app/routes/clustersets.py
+1
-1
No files found.
src/data-hub/role-stage-discovery-microservice/app/configs/swagger.yml
View file @
d24d7dc4
...
...
@@ -9,7 +9,7 @@ consumes:
produces
:
-
"
application/json"
#
basePath: "/api"
basePath
:
"
/api"
paths
:
/debug
:
...
...
@@ -173,7 +173,7 @@ paths:
summary
:
"
Insert
locations
from
AGI,
create
clusters
for
starting
time
and
location
layers,
create
graphs
for
the
location
clusters"
parameters
:
[]
responses
:
20
0
:
20
4
:
description
:
"
Successful
operation"
#endregion
...
...
@@ -412,8 +412,3 @@ definitions:
type
:
string
example
:
"
2020-07-02
14:19:51.651764"
\ No newline at end of file
# Added by API Auto Mocking Plugin
host
:
virtserver.swaggerhub.com
basePath
:
/NumeDeOrganizatie/Smart/1.0.0
schemes
:
-
https
\ No newline at end of file
src/data-hub/role-stage-discovery-microservice/app/db/entities/__init__.py
View file @
d24d7dc4
from
db.entities.location
import
Location
from
db.entities.popular_location
import
PopularLocation
from
db.entities.cluster
import
Cluster
from
db.entities.clusterset
import
ClusterSet
from
db.entities.user_cluster_graph
import
UserClusterGraph
from
db.entities.layer
import
Layer
from
db.entities.timeslice
import
TimeSlice
\ No newline at end of file
src/data-hub/role-stage-discovery-microservice/app/db/repository.py
View file @
d24d7dc4
...
...
@@ -3,11 +3,8 @@ import network_constants as netconst
from
database.MongoRepositoryBase
import
MongoRepositoryBase
import
json
from
db.entities.layer
import
*
from
db.entities.cluster
import
*
from
db.entities.timeslice
import
*
from
db.entities
import
*
from
processing.similarityFiles.miscFunctions
import
*
#
from processing.similarityFiles.miscFunctions import *
from
typing
import
List
...
...
@@ -96,14 +93,15 @@ class Repository(MongoRepositoryBase):
def
get_connected_clusters
(
self
,
run_id
=
None
):
#, layer_name: str):
''' Get Connected Clusters Data from DB '''
if
(
run_id
==
None
):
entries
=
super
()
.
get_entries
(
self
.
_connected_clusters_collection
)
#, projection={'Price_Layer': 1
})
entries
=
super
()
.
get_entries
(
self
.
_connected_clusters_collection
,
projection
=
{
'_id'
:
0
})
else
:
entries
=
super
()
.
get_entries
(
self
.
_similarity_collection
,
selection
=
{
'cluster_runId'
:
run_id
})
entries
=
super
()
.
get_entries
(
self
.
_similarity_collection
,
selection
=
{
'cluster_runId'
:
run_id
}
,
projection
=
{
'_id'
:
0
}
)
output
=
[]
for
ent
in
entries
:
output
.
append
(
ent
)
return
output
# print(ent)
#return [Cluster(cluster_dict=e, from_db=True) for e in entries]
#endregion
...
...
@@ -123,7 +121,7 @@ class Repository(MongoRepositoryBase):
if
(
run_id
==
None
):
entries
=
super
()
.
get_entries
(
self
.
_similarity_collection
,
projection
=
{
'_id'
:
0
})
else
:
entries
=
super
()
.
get_entries
(
self
.
_similarity_collection
,
selection
=
{
'runId'
:
run_id
})
entries
=
super
()
.
get_entries
(
self
.
_similarity_collection
,
selection
=
{
'runId'
:
run_id
}
,
projection
=
{
'_id'
:
0
}
)
output
=
[]
for
e
in
entries
:
...
...
src/data-hub/role-stage-discovery-microservice/app/processing/similarityFiles/test.py
deleted
100644 → 0
View file @
567d499c
from
db.entities.connected_node
import
NodeC
from
db.entities.connected_cluster
import
ClusterC
from
db.entities.connected_layer
import
LayerC
from
typing
import
Dict
#from db.repository import Repository
import
json
import
requests
from
routes.clustersets
import
get_by_nametest
.
py
from
db
import
repository
src/data-hub/role-stage-discovery-microservice/app/routes/clustersets.py
View file @
d24d7dc4
from
flask
import
request
,
Response
from
db.repository
import
Repository
from
db.entities
import
clusters
et
from
db.entities
import
ClusterS
et
repo
=
Repository
()
...
...
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