Skip to content

Commit a5ab70f

Browse files
for adapted attributes, make the dtype=object in fetches
1 parent d9847f0 commit a5ab70f

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

datajoint/attribute_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def get(self, value):
2424
def put(self, obj):
2525
"""
2626
convert an object of the adapted type into a value that DataJoint can store in a table attribute
27-
:param object: an object of the adapted type
27+
:param obj: an object of the adapted type
2828
:return: value to store in the database
2929
"""
3030
raise NotImplementedError('Undefined attribute adapter')

datajoint/dependencies.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class Dependencies(nx.DiGraph):
88
"""
99
The graph of dependencies (foreign keys) between loaded tables.
1010
11-
Note: the 'connnection' argument should normally be supplied;
12-
Empty use is permitted to facilliate use of networkx algorithms which
11+
Note: the 'connection' argument should normally be supplied;
12+
Empty use is permitted to facilitate use of networkx algorithms which
1313
internally create objects with the expectation of empty constructors.
1414
See also: https://github.com/datajoint/datajoint-python/pull/443
1515
"""
@@ -107,7 +107,6 @@ def descendants(self, full_table_name):
107107
"""
108108
nodes = self.subgraph(
109109
nx.algorithms.dag.descendants(self, full_table_name))
110-
111110
return [full_table_name] + list(
112111
nx.algorithms.dag.topological_sort(nodes))
113112

datajoint/heading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def init_from_database(self, conn, database, table_name, context):
279279

280280
# fill out dtype. All floats and non-nullable integers are turned into specific dtypes
281281
attr['dtype'] = object
282-
if attr['numeric']:
282+
if attr['numeric'] and not attr['adapter']:
283283
is_integer = TYPE_PATTERN['INTEGER'].match(attr['type'])
284284
is_float = TYPE_PATTERN['FLOAT'].match(attr['type'])
285285
if is_integer and not attr['nullable'] or is_float:

datajoint/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = "0.12.6"
1+
__version__ = "0.12.7"
22

33
assert len(__version__) <= 10 # The log table limits version to the 10 characters

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
min_py_version = (3, 5)
77

88
if sys.version_info < min_py_version:
9-
sys.exit('DataJoint is only supported on Python {}.{} or higher'.format(*min_py_version))
9+
sys.exit('DataJoint is only supported for Python {}.{} or higher'.format(*min_py_version))
1010

1111
here = path.abspath(path.dirname(__file__))
1212

1313
long_description = "A relational data framework for scientific data pipelines with MySQL backend."
1414

15-
# read in version number
15+
# read in version number into __version__
1616
with open(path.join(here, 'datajoint', 'version.py')) as f:
1717
exec(f.read())
1818

0 commit comments

Comments
 (0)