Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
alpha-mind
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dr.李
alpha-mind
Commits
5517da1a
Commit
5517da1a
authored
Aug 02, 2017
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
382d8a97
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
MANIFEST.in
MANIFEST.in
+3
-1
sqlengine.py
alphamind/data/engines/sqlengine.py
+5
-2
No files found.
MANIFEST.in
View file @
5517da1a
include MANIFEST.in
include .coveragerc
\ No newline at end of file
include .coveragerc
recursive-include libs/include *.*
recursive-include libs/lib/linux *.*
\ No newline at end of file
alphamind/data/engines/sqlengine.py
View file @
5517da1a
...
...
@@ -139,14 +139,17 @@ class SqlEngine(object):
query
=
select
([
FactorMaster
.
factor
,
FactorMaster
.
source
])
.
where
(
FactorMaster
.
factor
.
in_
(
factors
))
results
=
self
.
engine
.
execute
(
query
)
.
fetchall
()
all_factors
=
{
r
[
0
]
.
strip
():
r
[
1
]
.
strip
()
for
r
in
results
}
return
','
.
join
(
all_factors
[
k
]
+
'.'
+
k
for
k
in
all_factors
)
if
all_factors
:
return
','
.
join
(
all_factors
[
k
]
+
'.'
+
k
for
k
in
all_factors
)
+
','
else
:
return
''
factor_str
=
mapping_factors
(
factors
)
total_risk_factors
=
list
(
set
(
risk_styles
+
industry_styles
)
.
difference
(
factors
))
if
total_risk_factors
:
risk_str
=
','
+
','
.
join
(
'risk_exposure.'
+
f
for
f
in
total_risk_factors
)
risk_str
=
','
.
join
(
'risk_exposure.'
+
f
for
f
in
total_risk_factors
)
else
:
risk_str
=
''
...
...
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