Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
olapy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
olapy
Commits
6f882922
Commit
6f882922
authored
Apr 19, 2017
by
Mouadh Kaabachi
Committed by
GitHub
Apr 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tox with expanduser v1
parent
1d8fcc44
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
olapy/core/mdx/executor/execute.py
olapy/core/mdx/executor/execute.py
+27
-4
No files found.
olapy/core/mdx/executor/execute.py
View file @
6f882922
...
@@ -15,6 +15,10 @@ import pandas.io.sql as psql
...
@@ -15,6 +15,10 @@ import pandas.io.sql as psql
from
..tools.config_file_parser
import
ConfigParser
from
..tools.config_file_parser
import
ConfigParser
from
..tools.connection
import
MyDB
from
..tools.connection
import
MyDB
RUNNING_TOX
=
'RUNTING_TOX'
in
os
.
environ
print
(
'running ??'
)
print
(
RUNNING_TOX
)
class
MdxEngine
:
class
MdxEngine
:
"""
"""
...
@@ -73,6 +77,13 @@ class MdxEngine:
...
@@ -73,6 +77,13 @@ class MdxEngine:
'''
'''
# get csv files folders (cubes)
# get csv files folders (cubes)
if
RUNNING_TOX
:
location
=
os
.
path
.
join
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
,
".."
,
".."
,
".."
)),
MdxEngine
.
CUBE_FOLDER
)
else
:
home_directory
=
expanduser
(
"~"
)
home_directory
=
expanduser
(
"~"
)
location
=
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
cls
.
CUBE_FOLDER
)
location
=
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
cls
.
CUBE_FOLDER
)
...
@@ -101,6 +112,14 @@ class MdxEngine:
...
@@ -101,6 +112,14 @@ class MdxEngine:
return
MdxEngine
.
csv_files_cubes
+
MdxEngine
.
postgres_db_cubes
return
MdxEngine
.
csv_files_cubes
+
MdxEngine
.
postgres_db_cubes
def
_get_default_cube_directory
(
self
):
def
_get_default_cube_directory
(
self
):
if
RUNNING_TOX
:
return
os
.
path
.
join
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
,
".."
,
".."
,
".."
)),
MdxEngine
.
CUBE_FOLDER
)
else
:
home_directory
=
expanduser
(
"~"
)
home_directory
=
expanduser
(
"~"
)
return
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
self
.
cube_folder
)
return
os
.
path
.
join
(
home_directory
,
'olapy-data'
,
self
.
cube_folder
)
...
@@ -736,6 +755,10 @@ class MdxEngine:
...
@@ -736,6 +755,10 @@ class MdxEngine:
# TODO margins=True for columns total !!!!!
# TODO margins=True for columns total !!!!!
return {
return {
'result':
'result':
# df.drop_duplicates().replace(np.nan, -1).groupby(cols).sum(),
# TODO remove this (FIX V1)
# df.replace(np.nan, -1).groupby(cols).sum()[self.selected_measures],
# TODO chech this FIX
df.groupby(cols).sum()[self.selected_measures],
df.groupby(cols).sum()[self.selected_measures],
'columns_desc':
'columns_desc':
tables_n_columns
tables_n_columns
...
...
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