Commit 76643873 authored by mouadh's avatar mouadh

docstrings

parent 6a8740f1
...@@ -4,6 +4,9 @@ from cube_generator import CUBE_NAME ...@@ -4,6 +4,9 @@ from cube_generator import CUBE_NAME
class MicBench: class MicBench:
"""
Micro Benchmark for an mdx query
"""
def __init__(self, **kwargs): def __init__(self, **kwargs):
self.__dict__.update(kwargs) self.__dict__.update(kwargs)
......
...@@ -23,6 +23,9 @@ KEYWORDS = {} ...@@ -23,6 +23,9 @@ KEYWORDS = {}
class UnknownBuffer(Buffer): class UnknownBuffer(Buffer):
"""
main class for parsing MDX query generated by grako
"""
def __init__(self, def __init__(self,
text, text,
......
class Facts: class Facts:
"""
Facts class used to encapsulate config file attributes
"""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""
:param kwargs: {table_name : 'something',
keys :
{
column_name : 'something',
ref : 'something'
},
measures :
{ name : 'something' }
}
"""
self.__dict__.update(kwargs) self.__dict__.update(kwargs)
def __str__(self): def __str__(self):
...@@ -8,8 +23,21 @@ class Facts: ...@@ -8,8 +23,21 @@ class Facts:
class Dimension: class Dimension:
"""
Dimension class used to encapsulate config file attributes
"""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""
:param kwargs: {
name : 'something',
displayName : 'something',
columns :
{ name : 'something' }
}
"""
self.__dict__.update(kwargs) self.__dict__.update(kwargs)
def __str__(self): def __str__(self):
...@@ -17,8 +45,17 @@ class Dimension: ...@@ -17,8 +45,17 @@ class Dimension:
class Cube: class Cube:
"""
Cube class used to encapsulate config file attributes
"""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""
:param kwargs: {
name : 'something',
source : 'something',
}
"""
self.__dict__.update(kwargs) self.__dict__.update(kwargs)
def __str__(self): def __str__(self):
......
...@@ -3,6 +3,9 @@ from __future__ import absolute_import, division, print_function ...@@ -3,6 +3,9 @@ from __future__ import absolute_import, division, print_function
from spyne import ComplexModel, Integer, Unicode, XmlAttribute from spyne import ComplexModel, Integer, Unicode, XmlAttribute
class Tuple(object): class Tuple(object):
"""
Tuple description (used by spyne)
"""
def __init__(self, Hierarchy, UName, Caption, LName, LNum, DisplayInfo, def __init__(self, Hierarchy, UName, Caption, LName, LNum, DisplayInfo,
PARENT_UNIQUE_NAME, HIERARCHY_UNIQUE_NAME, Value): PARENT_UNIQUE_NAME, HIERARCHY_UNIQUE_NAME, Value):
...@@ -33,6 +36,9 @@ class Tuple(object): ...@@ -33,6 +36,9 @@ class Tuple(object):
class Property(ComplexModel): class Property(ComplexModel):
"""
Property description (used by spyne)
"""
__namespace__ = "urn:schemas-microsoft-com:xml-analysis" __namespace__ = "urn:schemas-microsoft-com:xml-analysis"
_type_info = { _type_info = {
'LocaleIdentifier': Unicode, 'LocaleIdentifier': Unicode,
...@@ -55,6 +61,9 @@ class Property(ComplexModel): ...@@ -55,6 +61,9 @@ class Property(ComplexModel):
class Restriction(ComplexModel): class Restriction(ComplexModel):
"""
Restriction description (used by spyne)
"""
__namespace__ = "urn:schemas-microsoft-com:xml-analysis" __namespace__ = "urn:schemas-microsoft-com:xml-analysis"
_type_info = { _type_info = {
'CATALOG_NAME': Unicode, 'CATALOG_NAME': Unicode,
...@@ -74,32 +83,50 @@ class Restriction(ComplexModel): ...@@ -74,32 +83,50 @@ class Restriction(ComplexModel):
class Session(ComplexModel): class Session(ComplexModel):
"""
Session description (used by spyne)
"""
__namespace__ = "urn:schemas-microsoft-com:xml-analysis" __namespace__ = "urn:schemas-microsoft-com:xml-analysis"
SessionId = XmlAttribute(Unicode) SessionId = XmlAttribute(Unicode)
class Restrictionlist(ComplexModel): class Restrictionlist(ComplexModel):
"""
Restriction description (used by spyne)
"""
__namespace__ = "urn:schemas-microsoft-com:xml-analysis" __namespace__ = "urn:schemas-microsoft-com:xml-analysis"
__type_name__ = "Restrictions" __type_name__ = "Restrictions"
RestrictionList = Restriction RestrictionList = Restriction
class Propertielist(ComplexModel): class Propertielist(ComplexModel):
"""
Properties description (used by spyne)
"""
__namespace__ = "urn:schemas-microsoft-com:xml-analysis" __namespace__ = "urn:schemas-microsoft-com:xml-analysis"
__type_name__ = "Properties" __type_name__ = "Properties"
PropertyList = Property PropertyList = Property
class Command(ComplexModel): class Command(ComplexModel):
"""
Command description (used by spyne)
"""
_type_info = {'Statement': Unicode,} _type_info = {'Statement': Unicode,}
class ExecuteRequest(ComplexModel): class ExecuteRequest(ComplexModel):
"""
Execute description (used by spyne)
"""
Command = Command Command = Command
Properties = Propertielist Properties = Propertielist
class DiscoverRequest(ComplexModel): class DiscoverRequest(ComplexModel):
"""
Discover description (used by spyne)
"""
RequestType = Unicode RequestType = Unicode
Restrictions = Restrictionlist Restrictions = Restrictionlist
Properties = Propertielist Properties = Propertielist
...@@ -7,6 +7,9 @@ from os.path import expanduser ...@@ -7,6 +7,9 @@ from os.path import expanduser
class Logs: class Logs:
"""
class responsible of managing logs (users , mdx and xmla logs)
"""
def __init__(self, file_name): def __init__(self, file_name):
self.file_name = file_name + ".log" self.file_name = file_name + ".log"
......
...@@ -4,6 +4,9 @@ import six ...@@ -4,6 +4,9 @@ import six
class IFrame(object): class IFrame(object):
"""
Frame in which we can drag and drop our columns
"""
iframe = """ iframe = """
<iframe <iframe
......
...@@ -35,6 +35,9 @@ log_mdx = Logs('mdx') ...@@ -35,6 +35,9 @@ log_mdx = Logs('mdx')
class Nod: class Nod:
"""
class for maintaining dimensions hierarchies
"""
def __init__(self, text, id, parent): def __init__(self, text, id, parent):
self.text = text self.text = text
......
...@@ -19,8 +19,14 @@ RUNNING_TOX = 'RUNTING_TOX' in os.environ ...@@ -19,8 +19,14 @@ RUNNING_TOX = 'RUNTING_TOX' in os.environ
class Member(object): class Member(object):
"""
encapsulating xs0 response attributes
"""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""
:param kwargs: [_Hierarchy,UName,Caption,LName,LNum,DisplayInfo,PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME]
"""
self.__dict__.update(kwargs) self.__dict__.update(kwargs)
def __eq__(self, other): def __eq__(self, other):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment