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
76643873
Commit
76643873
authored
May 03, 2017
by
mouadh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docstrings
parent
6a8740f1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
85 additions
and
0 deletions
+85
-0
micro_bench/micro_bench.py
micro_bench/micro_bench.py
+3
-0
olapy/core/mdx/parser/gen_parser/mdxparser.py
olapy/core/mdx/parser/gen_parser/mdxparser.py
+3
-0
olapy/core/mdx/tools/models.py
olapy/core/mdx/tools/models.py
+37
-0
olapy/core/services/models.py
olapy/core/services/models.py
+27
-0
olapy/web/logger.py
olapy/web/logger.py
+3
-0
olapy/web/pivottable.py
olapy/web/pivottable.py
+3
-0
olapy/web/views.py
olapy/web/views.py
+3
-0
tests/test_xmla_notox.py
tests/test_xmla_notox.py
+6
-0
No files found.
micro_bench/micro_bench.py
View file @
76643873
...
...
@@ -4,6 +4,9 @@ from cube_generator import CUBE_NAME
class
MicBench
:
"""
Micro Benchmark for an mdx query
"""
def
__init__
(
self
,
**
kwargs
):
self
.
__dict__
.
update
(
kwargs
)
...
...
olapy/core/mdx/parser/gen_parser/mdxparser.py
View file @
76643873
...
...
@@ -23,6 +23,9 @@ KEYWORDS = {}
class
UnknownBuffer
(
Buffer
):
"""
main class for parsing MDX query generated by grako
"""
def
__init__
(
self
,
text
,
...
...
olapy/core/mdx/tools/models.py
View file @
76643873
class
Facts
:
"""
Facts class used to encapsulate config file attributes
"""
def
__init__
(
self
,
**
kwargs
):
"""
:param kwargs: {table_name : 'something',
keys :
{
column_name : 'something',
ref : 'something'
},
measures :
{ name : 'something' }
}
"""
self
.
__dict__
.
update
(
kwargs
)
def
__str__
(
self
):
...
...
@@ -8,8 +23,21 @@ class Facts:
class
Dimension
:
"""
Dimension class used to encapsulate config file attributes
"""
def
__init__
(
self
,
**
kwargs
):
"""
:param kwargs: {
name : 'something',
displayName : 'something',
columns :
{ name : 'something' }
}
"""
self
.
__dict__
.
update
(
kwargs
)
def
__str__
(
self
):
...
...
@@ -17,8 +45,17 @@ class Dimension:
class
Cube
:
"""
Cube class used to encapsulate config file attributes
"""
def
__init__
(
self
,
**
kwargs
):
"""
:param kwargs: {
name : 'something',
source : 'something',
}
"""
self
.
__dict__
.
update
(
kwargs
)
def
__str__
(
self
):
...
...
olapy/core/services/models.py
View file @
76643873
...
...
@@ -3,6 +3,9 @@ from __future__ import absolute_import, division, print_function
from
spyne
import
ComplexModel
,
Integer
,
Unicode
,
XmlAttribute
class
Tuple
(
object
):
"""
Tuple description (used by spyne)
"""
def
__init__
(
self
,
Hierarchy
,
UName
,
Caption
,
LName
,
LNum
,
DisplayInfo
,
PARENT_UNIQUE_NAME
,
HIERARCHY_UNIQUE_NAME
,
Value
):
...
...
@@ -33,6 +36,9 @@ class Tuple(object):
class
Property
(
ComplexModel
):
"""
Property description (used by spyne)
"""
__namespace__
=
"urn:schemas-microsoft-com:xml-analysis"
_type_info
=
{
'LocaleIdentifier'
:
Unicode
,
...
...
@@ -55,6 +61,9 @@ class Property(ComplexModel):
class
Restriction
(
ComplexModel
):
"""
Restriction description (used by spyne)
"""
__namespace__
=
"urn:schemas-microsoft-com:xml-analysis"
_type_info
=
{
'CATALOG_NAME'
:
Unicode
,
...
...
@@ -74,32 +83,50 @@ class Restriction(ComplexModel):
class
Session
(
ComplexModel
):
"""
Session description (used by spyne)
"""
__namespace__
=
"urn:schemas-microsoft-com:xml-analysis"
SessionId
=
XmlAttribute
(
Unicode
)
class
Restrictionlist
(
ComplexModel
):
"""
Restriction description (used by spyne)
"""
__namespace__
=
"urn:schemas-microsoft-com:xml-analysis"
__type_name__
=
"Restrictions"
RestrictionList
=
Restriction
class
Propertielist
(
ComplexModel
):
"""
Properties description (used by spyne)
"""
__namespace__
=
"urn:schemas-microsoft-com:xml-analysis"
__type_name__
=
"Properties"
PropertyList
=
Property
class
Command
(
ComplexModel
):
"""
Command description (used by spyne)
"""
_type_info
=
{
'Statement'
:
Unicode
,}
class
ExecuteRequest
(
ComplexModel
):
"""
Execute description (used by spyne)
"""
Command
=
Command
Properties
=
Propertielist
class
DiscoverRequest
(
ComplexModel
):
"""
Discover description (used by spyne)
"""
RequestType
=
Unicode
Restrictions
=
Restrictionlist
Properties
=
Propertielist
olapy/web/logger.py
View file @
76643873
...
...
@@ -7,6 +7,9 @@ from os.path import expanduser
class
Logs
:
"""
class responsible of managing logs (users , mdx and xmla logs)
"""
def
__init__
(
self
,
file_name
):
self
.
file_name
=
file_name
+
".log"
...
...
olapy/web/pivottable.py
View file @
76643873
...
...
@@ -4,6 +4,9 @@ import six
class
IFrame
(
object
):
"""
Frame in which we can drag and drop our columns
"""
iframe
=
"""
<iframe
...
...
olapy/web/views.py
View file @
76643873
...
...
@@ -35,6 +35,9 @@ log_mdx = Logs('mdx')
class
Nod
:
"""
class for maintaining dimensions hierarchies
"""
def
__init__
(
self
,
text
,
id
,
parent
):
self
.
text
=
text
...
...
tests/test_xmla_notox.py
View file @
76643873
...
...
@@ -19,8 +19,14 @@ RUNNING_TOX = 'RUNTING_TOX' in os.environ
class
Member
(
object
):
"""
encapsulating xs0 response attributes
"""
def
__init__
(
self
,
**
kwargs
):
"""
:param kwargs: [_Hierarchy,UName,Caption,LName,LNum,DisplayInfo,PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME]
"""
self
.
__dict__
.
update
(
kwargs
)
def
__eq__
(
self
,
other
):
...
...
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