Permalink
Browse files

Merge remote-tracking branch 'bireme/master'

  • Loading branch information...
alvesjnr committed Jun 3, 2011
2 parents 5614fec + b0439fb commit 710d4e9ae8421f0c6d6c4fcb6f22af8331b09659
Showing with 27 additions and 17 deletions.
  1. +5 −0 .gitignore
  2. +7 −1 CHANGES.txt
  3. +6 −11 isis/model/mapper.py
  4. +9 −5 setup.py
  5. BIN tools/lib/Bruma.jar
  6. BIN tools/lib/jyson-1.0.1.jar
View
@@ -5,3 +5,8 @@ dist/
*.egg-info/
.idea
.idea/*
+bin/
+build/
+examples/
+include/
+lib/
View
@@ -1,6 +1,12 @@
+0.2.0
+* Added CompositeTextProperty
+* Added MultiCompositeTextProperty
+* Added IsisCompositeTextProperty
+* Added MultiIsisCompositeTextProperty
+
0.1.1
---
* Added FileProperty datatype
* Added BooleanProperty datatype
* Embedded _rev and _id in automatic generated forms (couchdb api)
-* Fixed bug that changes the _id attr of a persistent document
+* Fixed bug that changes the _id attr of a persistent document
View
@@ -169,16 +169,13 @@ class FileProperty(CheckedProperty):
def __set__(self, instance, value):
if not isinstance(value, dict):
raise TypeError('%r must be a dictionary' % self.name)
-
+
if 'filename' not in value:
try:
value['filename'] = value['fp'].name
except AttributeError:
raise TypeError('%r must be a file' % self.name)
-
- if 'fp' in value:
- value['md5'] = hashlib.md5(value['fp'].read()).hexdigest()
-
+
super(FileProperty, self).__set__(instance, value)
def _pystruct(self, instance, value):
@@ -187,8 +184,7 @@ def _pystruct(self, instance, value):
'''
if isinstance(value, dict):
serializable_value = {'uid':value['uid'],
- 'filename':value['filename'],
- 'md5':value['md5'],}
+ 'filename':value['filename'],}
return serializable_value
return value
@@ -258,7 +254,6 @@ def _colander_schema(self, instance, value):
subfield,
name=self.name)
-
class CompositeTextProperty(CheckedProperty):
def __init__(self, subkeys, **kwargs):
@@ -287,12 +282,12 @@ def _pystruct(self, instance, value):
return value.items()
def _colander_schema(self, instance, value):
- subfield = colander.SchemaNode(colander.Mapping(), name=self.name,)
-
+ #option arg acts in each attribute
kwargs = {}
if not self.required:
kwargs.update({'missing':None})
+ subfield = colander.SchemaNode(colander.Mapping(), name=self.name)
for subkey in self.subkeys:
subfield.add(colander.SchemaNode(colander.String(), name=subkey, **kwargs))
@@ -339,7 +334,7 @@ def __set__(self, instance, value):
raise TypeError('%r value must be tuple or list')
try:
- composite_texts = tuple(CompositeTuple(dict(composite_text), self.subkeys) for composite_text in value)
+ composite_texts = tuple(CompositeField(dict(composite_text), self.subkeys) for composite_text in value)
except ValueError:
raise TypeError('%r value must be a list or tuple of key-value structures' % self.name)
View
@@ -2,13 +2,17 @@
import os
here = os.path.abspath(os.path.dirname(__file__))
-README = open(os.path.join(here, 'README.txt')).read()
-CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
-requirements = ['colander', 'deform']
-additional_files = ['README.txt', 'CHANGES.txt']
+README_FILEPATH = os.path.join(here, 'README.txt')
+CHANGES_FILEPATH = os.path.join(here, 'CHANGES.txt')
-setup(name='isisdm', version='0.1.1',
+README = open(README_FILEPATH).read()
+CHANGES = open(CHANGES_FILEPATH).read()
+
+requirements = ['colander', 'deform', 'couchdbkit']
+additional_files = [README_FILEPATH, CHANGES_FILEPATH]
+
+setup(name='isisdm', version='0.2.1',
packages=find_packages(),
long_description=README + "\n\n" + CHANGES,
namespace_packages=['isis'],
View
Binary file not shown.
View
Binary file not shown.

0 comments on commit 710d4e9

Please sign in to comment.