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
a44856a9
Commit
a44856a9
authored
Sep 13, 2017
by
Dr.李
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.coding.net/wegamekinglc/Alpha-Mind
parents
5d2531cd
26510178
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
sqlengine.py
alphamind/data/engines/sqlengine.py
+8
-2
No files found.
alphamind/data/engines/sqlengine.py
View file @
a44856a9
...
...
@@ -81,6 +81,8 @@ total_risk_factors = risk_styles + industry_styles + macro_styles
factor_tables
=
[
FullFactorView
,
Experimental
]
DEFAULT_URL
=
'postgresql+psycopg2://postgres:A12345678!@10.63.6.220/alpha'
def
_map_risk_model_table
(
risk_model
:
str
)
->
tuple
:
if
risk_model
==
'day'
:
...
...
@@ -113,8 +115,12 @@ def _map_industry_category(category: str) -> str:
class
SqlEngine
(
object
):
def
__init__
(
self
,
db_url
:
str
):
db_url
:
str
=
None
):
if
db_url
:
self
.
engine
=
sa
.
create_engine
(
db_url
)
else
:
self
.
engine
=
sa
.
create_engine
(
DEFAULT_URL
)
self
.
session
=
None
self
.
create_session
()
...
...
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