mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 22:57:56 -05:00
Fixing bugs
This commit is contained in:
parent
6a2db72ffd
commit
718d242ffe
12 changed files with 16 additions and 17 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,4 @@
|
||||||
.ipynb_checkpoints
|
.ipynb_checkpoints
|
||||||
docs/build/
|
docs/build/
|
||||||
|
|
||||||
|
*.pyc
|
||||||
|
|
|
@ -44,12 +44,11 @@ from thrift.Thrift import TType
|
||||||
import inspect, sys, types
|
import inspect, sys, types
|
||||||
import dynamicserialize
|
import dynamicserialize
|
||||||
from dynamicserialize import dstypes, adapters
|
from dynamicserialize import dstypes, adapters
|
||||||
from . import SelfDescribingBinaryProtocol
|
from dynamicserialize import SelfDescribingBinaryProtocol
|
||||||
import numpy
|
import numpy
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
dsObjTypes = {}
|
dsObjTypes = {}
|
||||||
|
|
||||||
def buildObjMap(module):
|
def buildObjMap(module):
|
||||||
if '__all__' in module.__dict__:
|
if '__all__' in module.__dict__:
|
||||||
for i in module.__all__:
|
for i in module.__all__:
|
||||||
|
@ -75,7 +74,7 @@ pythonToThriftMap = {
|
||||||
float: SelfDescribingBinaryProtocol.FLOAT,
|
float: SelfDescribingBinaryProtocol.FLOAT,
|
||||||
#types.FloatType: TType.DOUBLE,
|
#types.FloatType: TType.DOUBLE,
|
||||||
bool: TType.BOOL,
|
bool: TType.BOOL,
|
||||||
types.InstanceType: TType.STRUCT,
|
object: TType.STRUCT,
|
||||||
type(None): TType.VOID,
|
type(None): TType.VOID,
|
||||||
numpy.float32: SelfDescribingBinaryProtocol.FLOAT,
|
numpy.float32: SelfDescribingBinaryProtocol.FLOAT,
|
||||||
numpy.int32: TType.I32,
|
numpy.int32: TType.I32,
|
||||||
|
@ -180,7 +179,7 @@ class ThriftSerializationContext(object):
|
||||||
if b in self.typeDeserializationMethod:
|
if b in self.typeDeserializationMethod:
|
||||||
return self.typeDeserializationMethod[b]()
|
return self.typeDeserializationMethod[b]()
|
||||||
else:
|
else:
|
||||||
raise dynamicserialize.SerializationException("Unsupported type value " + str(b))
|
raise SerializationException("Unsupported type value " + str(b))
|
||||||
|
|
||||||
|
|
||||||
def _deserializeField(self, structname, obj):
|
def _deserializeField(self, structname, obj):
|
||||||
|
@ -200,9 +199,9 @@ class ThriftSerializationContext(object):
|
||||||
if isinstance(setMethod, collections.Callable):
|
if isinstance(setMethod, collections.Callable):
|
||||||
setMethod(result)
|
setMethod(result)
|
||||||
else:
|
else:
|
||||||
raise dynamicserialize.SerializationException("Couldn't find setter method " + lookingFor)
|
raise SerializationException("Couldn't find setter method " + lookingFor)
|
||||||
except:
|
except:
|
||||||
raise dynamicserialize.SerializationException("Couldn't find setter method " + lookingFor)
|
raise SerializationException("Couldn't find setter method " + lookingFor)
|
||||||
|
|
||||||
self.protocol.readFieldEnd()
|
self.protocol.readFieldEnd()
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -66,7 +66,7 @@ classAdapterRegistry = {}
|
||||||
def getAdapterRegistry():
|
def getAdapterRegistry():
|
||||||
import sys
|
import sys
|
||||||
for x in __all__:
|
for x in __all__:
|
||||||
exec('import ' + x)
|
exec('import dynamicserialize.adapters.' + x )
|
||||||
m = sys.modules['dynamicserialize.adapters.' + x]
|
m = sys.modules['dynamicserialize.adapters.' + x]
|
||||||
d = m.__dict__
|
d = m.__dict__
|
||||||
if 'ClassAdapter' in d:
|
if 'ClassAdapter' in d:
|
||||||
|
|
|
@ -26,4 +26,3 @@ __all__ = [
|
||||||
'java'
|
'java'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
from . import ActiveTableRecord
|
from . import ActiveTableRecord
|
||||||
|
|
||||||
class OperationalActiveTableRecord(ActiveTableRecord.ActiveTableRecord):
|
class OperationalActiveTableRecord(ActiveTableRecord):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(OperationalActiveTableRecord, self).__init__()
|
super(OperationalActiveTableRecord, self).__init__()
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
from . import ActiveTableRecord
|
from . import ActiveTableRecord
|
||||||
|
|
||||||
class PracticeActiveTableRecord(ActiveTableRecord.ActiveTableRecord):
|
class PracticeActiveTableRecord(ActiveTableRecord):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(PracticeActiveTableRecord, self).__init__()
|
super(PracticeActiveTableRecord, self).__init__()
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
from . import GfeNotification
|
from . import GfeNotification
|
||||||
|
|
||||||
class GridHistoryUpdateNotification(GfeNotification.GfeNotification):
|
class GridHistoryUpdateNotification(GfeNotification):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(GridHistoryUpdateNotification, self).__init__()
|
super(GridHistoryUpdateNotification, self).__init__()
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
from . import GfeNotification
|
from . import GfeNotification
|
||||||
|
|
||||||
class GridUpdateNotification(GfeNotification.GfeNotification):
|
class GridUpdateNotification(GfeNotification):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(GridUpdateNotification, self).__init__()
|
super(GridUpdateNotification, self).__init__()
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
from . import GfeNotification
|
from . import GfeNotification
|
||||||
|
|
||||||
class LockNotification(GfeNotification.GfeNotification):
|
class LockNotification(GfeNotification):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(LockNotification, self).__init__()
|
super(LockNotification, self).__init__()
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
from . import GfeNotification
|
from . import GfeNotification
|
||||||
|
|
||||||
class ServiceBackupJobStatusNotification(GfeNotification.GfeNotification):
|
class ServiceBackupJobStatusNotification(GfeNotification):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(ServiceBackupJobStatusNotification, self).__init__()
|
super(ServiceBackupJobStatusNotification, self).__init__()
|
||||||
|
|
|
@ -27,8 +27,7 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
from . import GfeNotification
|
from . import GfeNotification
|
||||||
|
class UserMessageNotification(GfeNotification):
|
||||||
class UserMessageNotification(GfeNotification.GfeNotification):
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(UserMessageNotification, self).__init__()
|
super(UserMessageNotification, self).__init__()
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
import numpy
|
import numpy
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.level import MasterLevel
|
from .MasterLevel import MasterLevel
|
||||||
|
|
||||||
|
|
||||||
LEVEL_NAMING_REGEX = re.compile("^(\d*(?:\.\d*)?)(?:_(\d*(?:\.\d*)?))?([a-zA-Z]+)$")
|
LEVEL_NAMING_REGEX = re.compile("^(\d*(?:\.\d*)?)(?:_(\d*(?:\.\d*)?))?([a-zA-Z]+)$")
|
||||||
|
|
Loading…
Add table
Reference in a new issue