datajoint 0.14.3__tar.gz → 0.14.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of datajoint might be problematic. Click here for more details.

Files changed (257) hide show
  1. {datajoint-0.14.3 → datajoint-0.14.4}/PKG-INFO +134 -23
  2. datajoint-0.14.4/README.md +144 -0
  3. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/__init__.py +14 -15
  4. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/admin.py +4 -2
  5. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/attribute_adapter.py +1 -0
  6. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/autopopulate.py +53 -18
  7. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/blob.py +6 -5
  8. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/cli.py +1 -0
  9. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/condition.py +9 -7
  10. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/connection.py +17 -10
  11. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/declare.py +6 -4
  12. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/dependencies.py +3 -1
  13. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/diagram.py +6 -6
  14. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/expression.py +11 -10
  15. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/external.py +11 -9
  16. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/fetch.py +7 -5
  17. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/heading.py +11 -10
  18. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/jobs.py +4 -3
  19. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/plugin.py +5 -3
  20. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/s3.py +5 -3
  21. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/schemas.py +14 -13
  22. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/settings.py +18 -12
  23. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/table.py +18 -16
  24. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/user_tables.py +3 -2
  25. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/utils.py +2 -1
  26. datajoint-0.14.4/datajoint/version.py +6 -0
  27. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint.egg-info/PKG-INFO +134 -23
  28. datajoint-0.14.4/datajoint.egg-info/SOURCES.txt +80 -0
  29. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint.egg-info/requires.txt +11 -2
  30. datajoint-0.14.4/pyproject.toml +105 -0
  31. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_adapted_attributes.py +6 -3
  32. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_admin.py +3 -1
  33. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_aggr_regressions.py +6 -3
  34. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_alter.py +5 -2
  35. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_attach.py +4 -2
  36. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_autopopulate.py +4 -2
  37. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_blob.py +8 -5
  38. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_blob_matlab.py +2 -1
  39. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_bypass_serialization.py +3 -2
  40. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_cascading_delete.py +3 -1
  41. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_cli.py +2 -0
  42. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_connection.py +3 -2
  43. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_declare.py +5 -3
  44. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_dependencies.py +3 -1
  45. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_erd.py +2 -1
  46. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_external.py +7 -4
  47. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_external_class.py +2 -0
  48. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_fetch.py +12 -9
  49. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_fetch_same.py +2 -1
  50. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_filepath.py +8 -5
  51. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_foreign_keys.py +1 -0
  52. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_jobs.py +6 -3
  53. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_json.py +5 -3
  54. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_nan.py +2 -1
  55. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_plugin.py +4 -2
  56. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_privileges.py +3 -0
  57. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_reconnection.py +1 -0
  58. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_relation.py +7 -4
  59. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_relation_u.py +3 -1
  60. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_relational_operand.py +7 -5
  61. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_s3.py +5 -3
  62. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_schema.py +5 -2
  63. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_schema_keywords.py +1 -0
  64. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_settings.py +4 -2
  65. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_tls.py +2 -1
  66. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_university.py +6 -3
  67. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_update1.py +5 -3
  68. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_utils.py +3 -6
  69. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_uuid.py +6 -3
  70. datajoint-0.14.3/.codespellrc +0 -5
  71. datajoint-0.14.3/.coveragerc +0 -6
  72. datajoint-0.14.3/.devcontainer/Dockerfile +0 -13
  73. datajoint-0.14.3/.devcontainer/devcontainer.json +0 -50
  74. datajoint-0.14.3/.devcontainer/docker-compose.yml +0 -32
  75. datajoint-0.14.3/.dockerignore +0 -6
  76. datajoint-0.14.3/.github/ISSUE_TEMPLATE/bug_report.md +0 -37
  77. datajoint-0.14.3/.github/ISSUE_TEMPLATE/feature_request.md +0 -46
  78. datajoint-0.14.3/.github/workflows/development.yaml +0 -239
  79. datajoint-0.14.3/.github/workflows/docs.yaml +0 -19
  80. datajoint-0.14.3/.gitignore +0 -35
  81. datajoint-0.14.3/.vscode/launch.json +0 -16
  82. datajoint-0.14.3/.vscode/settings.json +0 -21
  83. datajoint-0.14.3/CHANGELOG.md +0 -338
  84. datajoint-0.14.3/Dockerfile +0 -24
  85. datajoint-0.14.3/README.md +0 -50
  86. datajoint-0.14.3/datajoint/version.py +0 -3
  87. datajoint-0.14.3/datajoint.egg-info/SOURCES.txt +0 -251
  88. datajoint-0.14.3/datajoint.pub +0 -6
  89. datajoint-0.14.3/docker-compose.yaml +0 -79
  90. datajoint-0.14.3/docs/.docker/Dockerfile +0 -15
  91. datajoint-0.14.3/docs/.docker/apk_requirements.txt +0 -1
  92. datajoint-0.14.3/docs/.docker/pip_requirements.txt +0 -11
  93. datajoint-0.14.3/docs/.markdownlint.yaml +0 -20
  94. datajoint-0.14.3/docs/README.md +0 -16
  95. datajoint-0.14.3/docs/docker-compose.yaml +0 -38
  96. datajoint-0.14.3/docs/mkdocs.yaml +0 -194
  97. datajoint-0.14.3/docs/src/.overrides/.icons/main/company-logo.svg +0 -11
  98. datajoint-0.14.3/docs/src/.overrides/assets/images/company-logo-blue.png +0 -0
  99. datajoint-0.14.3/docs/src/.overrides/assets/stylesheets/extra.css +0 -105
  100. datajoint-0.14.3/docs/src/.overrides/partials/nav.html +0 -33
  101. datajoint-0.14.3/docs/src/api/make_pages.py +0 -18
  102. datajoint-0.14.3/docs/src/changelog.md +0 -338
  103. datajoint-0.14.3/docs/src/citation.md +0 -7
  104. datajoint-0.14.3/docs/src/client/credentials.md +0 -46
  105. datajoint-0.14.3/docs/src/client/install.md +0 -209
  106. datajoint-0.14.3/docs/src/client/settings.md +0 -11
  107. datajoint-0.14.3/docs/src/client/stores.md +0 -1
  108. datajoint-0.14.3/docs/src/compute/distributed.md +0 -166
  109. datajoint-0.14.3/docs/src/compute/key-source.md +0 -51
  110. datajoint-0.14.3/docs/src/compute/make.md +0 -25
  111. datajoint-0.14.3/docs/src/compute/populate.md +0 -127
  112. datajoint-0.14.3/docs/src/concepts/data-model.md +0 -117
  113. datajoint-0.14.3/docs/src/concepts/data-pipelines.md +0 -166
  114. datajoint-0.14.3/docs/src/concepts/principles.md +0 -136
  115. datajoint-0.14.3/docs/src/concepts/teamwork.md +0 -100
  116. datajoint-0.14.3/docs/src/concepts/terminology.md +0 -127
  117. datajoint-0.14.3/docs/src/design/alter.md +0 -1
  118. datajoint-0.14.3/docs/src/design/diagrams.md +0 -110
  119. datajoint-0.14.3/docs/src/design/drop.md +0 -23
  120. datajoint-0.14.3/docs/src/design/integrity.md +0 -218
  121. datajoint-0.14.3/docs/src/design/normalization.md +0 -117
  122. datajoint-0.14.3/docs/src/design/recall.md +0 -207
  123. datajoint-0.14.3/docs/src/design/schema.md +0 -49
  124. datajoint-0.14.3/docs/src/design/tables/attach.md +0 -67
  125. datajoint-0.14.3/docs/src/design/tables/attributes.md +0 -88
  126. datajoint-0.14.3/docs/src/design/tables/blobs.md +0 -1
  127. datajoint-0.14.3/docs/src/design/tables/customtype.md +0 -1
  128. datajoint-0.14.3/docs/src/design/tables/declare.md +0 -242
  129. datajoint-0.14.3/docs/src/design/tables/dependencies.md +0 -241
  130. datajoint-0.14.3/docs/src/design/tables/filepath.md +0 -96
  131. datajoint-0.14.3/docs/src/design/tables/indexes.md +0 -1
  132. datajoint-0.14.3/docs/src/design/tables/lookup.md +0 -31
  133. datajoint-0.14.3/docs/src/design/tables/manual.md +0 -47
  134. datajoint-0.14.3/docs/src/design/tables/master-part.md +0 -112
  135. datajoint-0.14.3/docs/src/design/tables/primary.md +0 -178
  136. datajoint-0.14.3/docs/src/design/tables/tiers.md +0 -68
  137. datajoint-0.14.3/docs/src/develop.md +0 -126
  138. datajoint-0.14.3/docs/src/faq.md +0 -191
  139. datajoint-0.14.3/docs/src/images/StudentTable.png +0 -0
  140. datajoint-0.14.3/docs/src/images/added-example-ERD.svg +0 -207
  141. datajoint-0.14.3/docs/src/images/data-engineering.png +0 -0
  142. datajoint-0.14.3/docs/src/images/data-science-after.png +0 -0
  143. datajoint-0.14.3/docs/src/images/data-science-before.png +0 -0
  144. datajoint-0.14.3/docs/src/images/diff-example1.png +0 -0
  145. datajoint-0.14.3/docs/src/images/diff-example2.png +0 -0
  146. datajoint-0.14.3/docs/src/images/diff-example3.png +0 -0
  147. datajoint-0.14.3/docs/src/images/dimitri-ERD.svg +0 -117
  148. datajoint-0.14.3/docs/src/images/doc_1-1.png +0 -0
  149. datajoint-0.14.3/docs/src/images/doc_1-many.png +0 -0
  150. datajoint-0.14.3/docs/src/images/doc_many-1.png +0 -0
  151. datajoint-0.14.3/docs/src/images/doc_many-many.png +0 -0
  152. datajoint-0.14.3/docs/src/images/how-it-works.png +0 -0
  153. datajoint-0.14.3/docs/src/images/install-cmd-prompt.png +0 -0
  154. datajoint-0.14.3/docs/src/images/install-datajoint-1.png +0 -0
  155. datajoint-0.14.3/docs/src/images/install-datajoint-2.png +0 -0
  156. datajoint-0.14.3/docs/src/images/install-git-1.png +0 -0
  157. datajoint-0.14.3/docs/src/images/install-graphviz-1.png +0 -0
  158. datajoint-0.14.3/docs/src/images/install-graphviz-2a.png +0 -0
  159. datajoint-0.14.3/docs/src/images/install-graphviz-2b.png +0 -0
  160. datajoint-0.14.3/docs/src/images/install-jupyter-1.png +0 -0
  161. datajoint-0.14.3/docs/src/images/install-jupyter-2.png +0 -0
  162. datajoint-0.14.3/docs/src/images/install-matplotlib.png +0 -0
  163. datajoint-0.14.3/docs/src/images/install-pydotplus.png +0 -0
  164. datajoint-0.14.3/docs/src/images/install-python-advanced-1.png +0 -0
  165. datajoint-0.14.3/docs/src/images/install-python-advanced-2.png +0 -0
  166. datajoint-0.14.3/docs/src/images/install-python-simple.png +0 -0
  167. datajoint-0.14.3/docs/src/images/install-run-jupyter-1.png +0 -0
  168. datajoint-0.14.3/docs/src/images/install-run-jupyter-2.png +0 -0
  169. datajoint-0.14.3/docs/src/images/install-verify-graphviz.png +0 -0
  170. datajoint-0.14.3/docs/src/images/install-verify-jupyter.png +0 -0
  171. datajoint-0.14.3/docs/src/images/install-verify-python.png +0 -0
  172. datajoint-0.14.3/docs/src/images/join-example1.png +0 -0
  173. datajoint-0.14.3/docs/src/images/join-example2.png +0 -0
  174. datajoint-0.14.3/docs/src/images/join-example3.png +0 -0
  175. datajoint-0.14.3/docs/src/images/key_source_combination.png +0 -0
  176. datajoint-0.14.3/docs/src/images/map-dataflow.png +0 -0
  177. datajoint-0.14.3/docs/src/images/matched_tuples1.png +0 -0
  178. datajoint-0.14.3/docs/src/images/matched_tuples2.png +0 -0
  179. datajoint-0.14.3/docs/src/images/matched_tuples3.png +0 -0
  180. datajoint-0.14.3/docs/src/images/mp-diagram.png +0 -0
  181. datajoint-0.14.3/docs/src/images/op-restrict.png +0 -0
  182. datajoint-0.14.3/docs/src/images/outer-example1.png +0 -0
  183. datajoint-0.14.3/docs/src/images/pipeline-database.png +0 -0
  184. datajoint-0.14.3/docs/src/images/pipeline.png +0 -0
  185. datajoint-0.14.3/docs/src/images/python_collection.png +0 -0
  186. datajoint-0.14.3/docs/src/images/queries_example_diagram.png +0 -0
  187. datajoint-0.14.3/docs/src/images/query_object_preview.png +0 -0
  188. datajoint-0.14.3/docs/src/images/restrict-example1.png +0 -0
  189. datajoint-0.14.3/docs/src/images/restrict-example2.png +0 -0
  190. datajoint-0.14.3/docs/src/images/restrict-example3.png +0 -0
  191. datajoint-0.14.3/docs/src/images/shapes_pipeline.svg +0 -36
  192. datajoint-0.14.3/docs/src/images/spawned-classes-ERD.svg +0 -155
  193. datajoint-0.14.3/docs/src/images/union-example1.png +0 -0
  194. datajoint-0.14.3/docs/src/images/union-example2.png +0 -0
  195. datajoint-0.14.3/docs/src/images/virtual-module-ERD.svg +0 -155
  196. datajoint-0.14.3/docs/src/index.md +0 -44
  197. datajoint-0.14.3/docs/src/internal/transpilation.md +0 -170
  198. datajoint-0.14.3/docs/src/manipulation/delete.md +0 -31
  199. datajoint-0.14.3/docs/src/manipulation/index.md +0 -9
  200. datajoint-0.14.3/docs/src/manipulation/insert.md +0 -94
  201. datajoint-0.14.3/docs/src/manipulation/transactions.md +0 -36
  202. datajoint-0.14.3/docs/src/manipulation/update.md +0 -48
  203. datajoint-0.14.3/docs/src/publish-data.md +0 -34
  204. datajoint-0.14.3/docs/src/query/aggregation.md +0 -29
  205. datajoint-0.14.3/docs/src/query/example-schema.md +0 -112
  206. datajoint-0.14.3/docs/src/query/fetch.md +0 -126
  207. datajoint-0.14.3/docs/src/query/iteration.md +0 -36
  208. datajoint-0.14.3/docs/src/query/join.md +0 -37
  209. datajoint-0.14.3/docs/src/query/operators.md +0 -395
  210. datajoint-0.14.3/docs/src/query/principles.md +0 -81
  211. datajoint-0.14.3/docs/src/query/project.md +0 -68
  212. datajoint-0.14.3/docs/src/query/query-caching.md +0 -42
  213. datajoint-0.14.3/docs/src/query/restrict.md +0 -193
  214. datajoint-0.14.3/docs/src/query/union.md +0 -48
  215. datajoint-0.14.3/docs/src/query/universals.md +0 -46
  216. datajoint-0.14.3/docs/src/quick-start.md +0 -460
  217. datajoint-0.14.3/docs/src/sysadmin/bulk-storage.md +0 -106
  218. datajoint-0.14.3/docs/src/sysadmin/database-admin.md +0 -364
  219. datajoint-0.14.3/docs/src/sysadmin/external-store.md +0 -293
  220. datajoint-0.14.3/docs/src/tutorials/json.ipynb +0 -1085
  221. datajoint-0.14.3/images/pipeline.drawio +0 -1
  222. datajoint-0.14.3/images/pipeline.png +0 -0
  223. datajoint-0.14.3/pyproject.toml +0 -71
  224. datajoint-0.14.3/tests/__init__.py +0 -0
  225. datajoint-0.14.3/tests/conftest.py +0 -535
  226. datajoint-0.14.3/tests/data/Course.csv +0 -46
  227. datajoint-0.14.3/tests/data/CurrentTerm.csv +0 -2
  228. datajoint-0.14.3/tests/data/Department.csv +0 -9
  229. datajoint-0.14.3/tests/data/Enroll.csv +0 -3365
  230. datajoint-0.14.3/tests/data/Grade.csv +0 -3028
  231. datajoint-0.14.3/tests/data/Section.csv +0 -757
  232. datajoint-0.14.3/tests/data/Student.csv +0 -301
  233. datajoint-0.14.3/tests/data/StudentMajor.csv +0 -227
  234. datajoint-0.14.3/tests/data/Term.csv +0 -19
  235. datajoint-0.14.3/tests/schema.py +0 -469
  236. datajoint-0.14.3/tests/schema_adapted.py +0 -62
  237. datajoint-0.14.3/tests/schema_advanced.py +0 -140
  238. datajoint-0.14.3/tests/schema_aggr_regress.py +0 -51
  239. datajoint-0.14.3/tests/schema_alter.py +0 -56
  240. datajoint-0.14.3/tests/schema_external.py +0 -88
  241. datajoint-0.14.3/tests/schema_privileges.py +0 -34
  242. datajoint-0.14.3/tests/schema_simple.py +0 -320
  243. datajoint-0.14.3/tests/schema_university.py +0 -112
  244. datajoint-0.14.3/tests/schema_uuid.py +0 -49
  245. {datajoint-0.14.3 → datajoint-0.14.4}/LICENSE.txt +0 -0
  246. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/errors.py +0 -0
  247. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/hash.py +1 -1
  248. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/logging.py +0 -0
  249. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint/preview.py +0 -0
  250. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint.egg-info/dependency_links.txt +0 -0
  251. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint.egg-info/entry_points.txt +0 -0
  252. {datajoint-0.14.3 → datajoint-0.14.4}/datajoint.egg-info/top_level.txt +0 -0
  253. {datajoint-0.14.3 → datajoint-0.14.4}/setup.cfg +0 -0
  254. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_groupby.py +0 -0
  255. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_hash.py +0 -0
  256. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_log.py +0 -0
  257. {datajoint-0.14.3 → datajoint-0.14.4}/tests/test_virtual_module.py +0 -0
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: datajoint
3
- Version: 0.14.3
4
- Summary: A relational data pipeline framework.
3
+ Version: 0.14.4
4
+ Summary: DataJoint for Python is a framework for scientific workflow management based on relational principles. DataJoint is built on the foundation of the relational data model and prescribes a consistent method for organizing, populating, computing, and querying data.
5
5
  Author: Raphael Guzman, Edgar Walker
6
6
  Author-email: Dimitri Yatsenko <dimitri@datajoint.com>, DataJoint Contributors <support@datajoint.com>
7
7
  Maintainer-email: Dimitri Yatsenko <dimitri@datajoint.com>, DataJoint Contributors <support@datajoint.com>
@@ -514,14 +514,23 @@ Project-URL: Homepage, https://datajoint.com/docs
514
514
  Project-URL: Documentation, https://datajoint.com/docs
515
515
  Project-URL: Repository, https://github.com/datajoint/datajoint-python
516
516
  Project-URL: Bug Tracker, https://github.com/datajoint/datajoint-python/issues
517
- Project-URL: Changelog, https://github.com/datajoint/datajoint-python/blob/master/CHANGELOG.md
518
- Keywords: database,data pipelines,scientific computing,automated research workflows
517
+ Project-URL: Release Notes, https://github.com/datajoint/datajoint-python/releases
518
+ Keywords: database,automated,automation,compute,data,pipeline,workflow,scientific,science,research,neuroscience,bioinformatics,bio-informatics,datajoint
519
519
  Classifier: Programming Language :: Python
520
- Requires-Python: <4.0,>=3.8
520
+ Classifier: Development Status :: 5 - Production/Stable
521
+ Classifier: Intended Audience :: Science/Research
522
+ Classifier: Intended Audience :: Healthcare Industry
523
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
524
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
525
+ Classifier: Topic :: Scientific/Engineering
526
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
527
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
528
+ Requires-Python: <4.0,>=3.9
521
529
  Description-Content-Type: text/markdown
522
530
  License-File: LICENSE.txt
523
531
  Requires-Dist: numpy
524
532
  Requires-Dist: pymysql>=0.7.2
533
+ Requires-Dist: deepdiff
525
534
  Requires-Dist: pyparsing
526
535
  Requires-Dist: ipython
527
536
  Requires-Dist: pandas
@@ -534,30 +543,132 @@ Requires-Dist: otumat
534
543
  Requires-Dist: faker
535
544
  Requires-Dist: cryptography
536
545
  Requires-Dist: urllib3
546
+ Requires-Dist: setuptools
537
547
  Provides-Extra: test
538
548
  Requires-Dist: pytest; extra == "test"
539
549
  Requires-Dist: pytest-cov; extra == "test"
540
- Requires-Dist: black==24.2.0; extra == "test"
541
- Requires-Dist: flake8; extra == "test"
542
-
543
- [![DOI](https://zenodo.org/badge/16774/datajoint/datajoint-python.svg)](https://zenodo.org/badge/latestdoi/16774/datajoint/datajoint-python)
544
- [![Coverage Status](https://coveralls.io/repos/datajoint/datajoint-python/badge.svg?branch=master&service=github)](https://coveralls.io/github/datajoint/datajoint-python?branch=master)
545
- [![PyPI version](https://badge.fury.io/py/datajoint.svg)](http://badge.fury.io/py/datajoint)
546
- [![Slack](https://img.shields.io/badge/slack-chat-green.svg)](https://datajoint.slack.com/)
550
+ Provides-Extra: dev
551
+ Requires-Dist: pre-commit; extra == "dev"
552
+ Requires-Dist: black==24.2.0; extra == "dev"
553
+ Requires-Dist: flake8; extra == "dev"
554
+ Requires-Dist: isort; extra == "dev"
555
+ Requires-Dist: codespell; extra == "dev"
556
+ Requires-Dist: pytest; extra == "dev"
557
+ Requires-Dist: pytest-cov; extra == "dev"
558
+ Dynamic: license-file
547
559
 
548
560
  # Welcome to DataJoint for Python!
549
561
 
550
- DataJoint for Python is a framework for scientific workflow management based on
551
- relational principles. DataJoint is built on the foundation of the relational data
552
- model and prescribes a consistent method for organizing, populating, computing, and
562
+ <table>
563
+ <!-- Thank Zarr for providing badge insights! -->
564
+ <!-- https://github.com/zarr-developers/zarr-python/blob/main/README.md -->
565
+ <tr>
566
+ <td>PyPI</td>
567
+ <td>
568
+ <a href="https://pypi.org/project/datajoint/">
569
+ <img src="https://img.shields.io/pypi/v/datajoint?color=blue" alt="pypi release" />
570
+ </a>
571
+ <br>
572
+ <a href="https://pypi.org/project/datajoint/">
573
+ <img src="https://img.shields.io/pypi/dm/datajoint?color=yellow" alt="pypi downloads" />
574
+ </a>
575
+ </td>
576
+ </tr>
577
+ <tr>
578
+ <td>Conda Forge</td>
579
+ <td>
580
+ <a href="https://anaconda.org/conda-forge/datajoint">
581
+ <img src="https://img.shields.io/conda/vn/conda-forge/datajoint?color=brightgreen" alt="conda-forge release" />
582
+ </a>
583
+ <br>
584
+ <a href="https://anaconda.org/conda-forge/datajoint">
585
+ <img src="https://img.shields.io/conda/dn/conda-forge/datajoint?color=brightgreen" alt="conda-forge downloads" />
586
+ </a>
587
+ </td>
588
+ </tr>
589
+ <tr>
590
+ <td>Since Release</td>
591
+ <td>
592
+ <a id="commit-since-release-link" href="https://github.com/datajoint/datajoint-python/compare/v0.14.4...master">
593
+ <img id="commit-since-release-img" src="https://img.shields.io/github/commits-since/datajoint/datajoint-python/v0.14.4?color=red" alt="commit since last release" />
594
+ </a>
595
+ </td>
596
+ </tr>
597
+ <tr>
598
+ <td>Test Status</td>
599
+ <td>
600
+ <a href="https://github.com/datajoint/datajoint-python/actions/workflows/test.yaml">
601
+ <img src="https://github.com/datajoint/datajoint-python/actions/workflows/test.yaml/badge.svg" alt="test status" />
602
+ </a>
603
+ </td>
604
+ </tr>
605
+ <tr>
606
+ <td>Release Status</td>
607
+ <td>
608
+ <a href="https://github.com/datajoint/datajoint-python/actions/workflows/post_draft_release_published.yaml">
609
+ <img src="https://github.com/datajoint/datajoint-python/actions/workflows/post_draft_release_published.yaml/badge.svg" alt="release status" />
610
+ </a>
611
+ </td>
612
+ </tr>
613
+ <tr>
614
+ <td>Doc Status</td>
615
+ <td>
616
+ <a href="https://datajoint.com/docs">
617
+ <img src="https://github.com/datajoint/datajoint-python/actions/workflows/pages/pages-build-deployment/badge.svg" alt="doc status" />
618
+ </a>
619
+ </td>
620
+ </tr>
621
+ <tr>
622
+ <td>Coverage</td>
623
+ <td>
624
+ <a href="https://coveralls.io/github/datajoint/datajoint-python?branch=master">
625
+ <img src="https://coveralls.io/repos/datajoint/datajoint-python/badge.svg?branch=master&service=github"/ alt="coverage">
626
+ </a>
627
+ </td>
628
+ </tr>
629
+ <tr>
630
+ <td>Developer Chat</td>
631
+ <td>
632
+ <a href="https://datajoint.slack.com/">
633
+ <img src="https://img.shields.io/badge/slack-datajoint-purple.svg" alt="datajoint slack"/>
634
+ </a>
635
+ </td>
636
+ </tr>
637
+ <tr>
638
+ <td>License</td>
639
+ <td>
640
+ <a href="https://github.com/datajoint/datajoint-python/blob/master/LICENSE.txt">
641
+ <img src="https://img.shields.io/github/license/datajoint/datajoint-python" alt="LGPL-2.1" />
642
+ </a>
643
+ </td>
644
+ </tr>
645
+ <tr>
646
+ <td>Citation</td>
647
+ <td>
648
+ <a href="https://doi.org/10.1101/031658">
649
+ <img src="https://img.shields.io/badge/DOI-10.1101/bioRxiv.031658-B31B1B.svg" alt="bioRxiv">
650
+ </a>
651
+ <br>
652
+ <a href="https://doi.org/10.5281/zenodo.6829062">
653
+ <img src="https://zenodo.org/badge/DOI/10.5281/zenodo.6829062.svg" alt="zenodo">
654
+ </a>
655
+ </td>
656
+ </tr>
657
+
658
+ </table>
659
+
660
+
661
+ DataJoint for Python is a framework for scientific workflow management based on
662
+ relational principles. DataJoint is built on the foundation of the relational data
663
+ model and prescribes a consistent method for organizing, populating, computing, and
553
664
  querying data.
554
665
 
555
- DataJoint was initially developed in 2009 by Dimitri Yatsenko in Andreas Tolias' Lab at
556
- Baylor College of Medicine for the distributed processing and management of large
557
- volumes of data streaming from regular experiments. Starting in 2011, DataJoint has
558
- been available as an open-source project adopted by other labs and improved through
666
+ DataJoint was initially developed in 2009 by Dimitri Yatsenko in Andreas Tolias' Lab at
667
+ Baylor College of Medicine for the distributed processing and management of large
668
+ volumes of data streaming from regular experiments. Starting in 2011, DataJoint has
669
+ been available as an open-source project adopted by other labs and improved through
559
670
  contributions from several developers.
560
- Presently, the primary developer of DataJoint open-source software is the company
671
+ Presently, the primary developer of DataJoint open-source software is the company
561
672
  DataJoint (https://datajoint.com).
562
673
 
563
674
  ## Data Pipeline Example
@@ -587,6 +698,6 @@ DataJoint (https://datajoint.com).
587
698
  - [DataJoint Elements](https://datajoint.com/docs/elements/) - Catalog of example pipelines for neuroscience experiments
588
699
 
589
700
  - Contribute
590
- - [Development Environment](https://datajoint.com/docs/core/datajoint-python/latest/develop/)
701
+ - [Contribution Guidelines](https://datajoint.com/docs/about/contribute/)
591
702
 
592
- - [Guidelines](https://datajoint.com/docs/about/contribute/)
703
+ - [Developer Guide](https://datajoint.com/docs/core/datajoint-python/latest/develop/)
@@ -0,0 +1,144 @@
1
+ # Welcome to DataJoint for Python!
2
+
3
+ <table>
4
+ <!-- Thank Zarr for providing badge insights! -->
5
+ <!-- https://github.com/zarr-developers/zarr-python/blob/main/README.md -->
6
+ <tr>
7
+ <td>PyPI</td>
8
+ <td>
9
+ <a href="https://pypi.org/project/datajoint/">
10
+ <img src="https://img.shields.io/pypi/v/datajoint?color=blue" alt="pypi release" />
11
+ </a>
12
+ <br>
13
+ <a href="https://pypi.org/project/datajoint/">
14
+ <img src="https://img.shields.io/pypi/dm/datajoint?color=yellow" alt="pypi downloads" />
15
+ </a>
16
+ </td>
17
+ </tr>
18
+ <tr>
19
+ <td>Conda Forge</td>
20
+ <td>
21
+ <a href="https://anaconda.org/conda-forge/datajoint">
22
+ <img src="https://img.shields.io/conda/vn/conda-forge/datajoint?color=brightgreen" alt="conda-forge release" />
23
+ </a>
24
+ <br>
25
+ <a href="https://anaconda.org/conda-forge/datajoint">
26
+ <img src="https://img.shields.io/conda/dn/conda-forge/datajoint?color=brightgreen" alt="conda-forge downloads" />
27
+ </a>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <td>Since Release</td>
32
+ <td>
33
+ <a id="commit-since-release-link" href="https://github.com/datajoint/datajoint-python/compare/v0.14.4...master">
34
+ <img id="commit-since-release-img" src="https://img.shields.io/github/commits-since/datajoint/datajoint-python/v0.14.4?color=red" alt="commit since last release" />
35
+ </a>
36
+ </td>
37
+ </tr>
38
+ <tr>
39
+ <td>Test Status</td>
40
+ <td>
41
+ <a href="https://github.com/datajoint/datajoint-python/actions/workflows/test.yaml">
42
+ <img src="https://github.com/datajoint/datajoint-python/actions/workflows/test.yaml/badge.svg" alt="test status" />
43
+ </a>
44
+ </td>
45
+ </tr>
46
+ <tr>
47
+ <td>Release Status</td>
48
+ <td>
49
+ <a href="https://github.com/datajoint/datajoint-python/actions/workflows/post_draft_release_published.yaml">
50
+ <img src="https://github.com/datajoint/datajoint-python/actions/workflows/post_draft_release_published.yaml/badge.svg" alt="release status" />
51
+ </a>
52
+ </td>
53
+ </tr>
54
+ <tr>
55
+ <td>Doc Status</td>
56
+ <td>
57
+ <a href="https://datajoint.com/docs">
58
+ <img src="https://github.com/datajoint/datajoint-python/actions/workflows/pages/pages-build-deployment/badge.svg" alt="doc status" />
59
+ </a>
60
+ </td>
61
+ </tr>
62
+ <tr>
63
+ <td>Coverage</td>
64
+ <td>
65
+ <a href="https://coveralls.io/github/datajoint/datajoint-python?branch=master">
66
+ <img src="https://coveralls.io/repos/datajoint/datajoint-python/badge.svg?branch=master&service=github"/ alt="coverage">
67
+ </a>
68
+ </td>
69
+ </tr>
70
+ <tr>
71
+ <td>Developer Chat</td>
72
+ <td>
73
+ <a href="https://datajoint.slack.com/">
74
+ <img src="https://img.shields.io/badge/slack-datajoint-purple.svg" alt="datajoint slack"/>
75
+ </a>
76
+ </td>
77
+ </tr>
78
+ <tr>
79
+ <td>License</td>
80
+ <td>
81
+ <a href="https://github.com/datajoint/datajoint-python/blob/master/LICENSE.txt">
82
+ <img src="https://img.shields.io/github/license/datajoint/datajoint-python" alt="LGPL-2.1" />
83
+ </a>
84
+ </td>
85
+ </tr>
86
+ <tr>
87
+ <td>Citation</td>
88
+ <td>
89
+ <a href="https://doi.org/10.1101/031658">
90
+ <img src="https://img.shields.io/badge/DOI-10.1101/bioRxiv.031658-B31B1B.svg" alt="bioRxiv">
91
+ </a>
92
+ <br>
93
+ <a href="https://doi.org/10.5281/zenodo.6829062">
94
+ <img src="https://zenodo.org/badge/DOI/10.5281/zenodo.6829062.svg" alt="zenodo">
95
+ </a>
96
+ </td>
97
+ </tr>
98
+
99
+ </table>
100
+
101
+
102
+ DataJoint for Python is a framework for scientific workflow management based on
103
+ relational principles. DataJoint is built on the foundation of the relational data
104
+ model and prescribes a consistent method for organizing, populating, computing, and
105
+ querying data.
106
+
107
+ DataJoint was initially developed in 2009 by Dimitri Yatsenko in Andreas Tolias' Lab at
108
+ Baylor College of Medicine for the distributed processing and management of large
109
+ volumes of data streaming from regular experiments. Starting in 2011, DataJoint has
110
+ been available as an open-source project adopted by other labs and improved through
111
+ contributions from several developers.
112
+ Presently, the primary developer of DataJoint open-source software is the company
113
+ DataJoint (https://datajoint.com).
114
+
115
+ ## Data Pipeline Example
116
+
117
+ ![pipeline](https://raw.githubusercontent.com/datajoint/datajoint-python/master/images/pipeline.png)
118
+
119
+ [Yatsenko et al., bioRxiv 2021](https://doi.org/10.1101/2021.03.30.437358)
120
+
121
+ ## Getting Started
122
+
123
+ - Install with Conda
124
+
125
+ ```bash
126
+ conda install -c conda-forge datajoint
127
+ ```
128
+
129
+ - Install with pip
130
+
131
+ ```bash
132
+ pip install datajoint
133
+ ```
134
+
135
+ - [Documentation & Tutorials](https://datajoint.com/docs/core/datajoint-python/)
136
+
137
+ - [Interactive Tutorials](https://github.com/datajoint/datajoint-tutorials) on GitHub Codespaces
138
+
139
+ - [DataJoint Elements](https://datajoint.com/docs/elements/) - Catalog of example pipelines for neuroscience experiments
140
+
141
+ - Contribute
142
+ - [Contribution Guidelines](https://datajoint.com/docs/about/contribute/)
143
+
144
+ - [Developer Guide](https://datajoint.com/docs/core/datajoint-python/latest/develop/)
@@ -55,24 +55,23 @@ __all__ = [
55
55
  "cli",
56
56
  ]
57
57
 
58
- from .logging import logger
59
- from .version import __version__
60
- from .settings import config
61
- from .connection import conn, Connection
62
- from .schemas import Schema
63
- from .schemas import VirtualModule, list_schemas
64
- from .table import Table, FreeTable
65
- from .user_tables import Manual, Lookup, Imported, Computed, Part
66
- from .expression import Not, AndList, U, Top
67
- from .diagram import Diagram
68
- from .admin import set_password, kill
58
+ from . import errors
59
+ from .admin import kill, set_password
60
+ from .attribute_adapter import AttributeAdapter
69
61
  from .blob import MatCell, MatStruct
62
+ from .cli import cli
63
+ from .connection import Connection, conn
64
+ from .diagram import Diagram
65
+ from .errors import DataJointError
66
+ from .expression import AndList, Not, Top, U
70
67
  from .fetch import key
71
68
  from .hash import key_hash
72
- from .attribute_adapter import AttributeAdapter
73
- from . import errors
74
- from .errors import DataJointError
75
- from .cli import cli
69
+ from .logging import logger
70
+ from .schemas import Schema, VirtualModule, list_schemas
71
+ from .settings import config
72
+ from .table import FreeTable, Table
73
+ from .user_tables import Computed, Imported, Lookup, Manual, Part
74
+ from .version import __version__
76
75
 
77
76
  ERD = Di = Diagram # Aliases for Diagram
78
77
  schema = Schema # Aliases for Schema
@@ -1,10 +1,12 @@
1
- import pymysql
1
+ import logging
2
2
  from getpass import getpass
3
+
4
+ import pymysql
3
5
  from packaging import version
6
+
4
7
  from .connection import conn
5
8
  from .settings import config
6
9
  from .utils import user_choice
7
- import logging
8
10
 
9
11
  logger = logging.getLogger(__name__.split(".")[0])
10
12
 
@@ -1,4 +1,5 @@
1
1
  import re
2
+
2
3
  from .errors import DataJointError, _support_adapted_types
3
4
  from .plugin import type_plugins
4
5
 
@@ -1,17 +1,20 @@
1
1
  """This module defines class dj.AutoPopulate"""
2
2
 
3
- import logging
3
+ import contextlib
4
4
  import datetime
5
- import traceback
6
- import random
7
5
  import inspect
6
+ import logging
7
+ import multiprocessing as mp
8
+ import random
9
+ import signal
10
+ import traceback
11
+
12
+ import deepdiff
8
13
  from tqdm import tqdm
9
- from .hash import key_hash
10
- from .expression import QueryExpression, AndList
14
+
11
15
  from .errors import DataJointError, LostConnectionError
12
- import signal
13
- import multiprocessing as mp
14
- import contextlib
16
+ from .expression import AndList, QueryExpression
17
+ from .hash import key_hash
15
18
 
16
19
  # noinspection PyExceptionInherit,PyCallingNonCallable
17
20
 
@@ -262,13 +265,16 @@ class AutoPopulate:
262
265
  # spawn multiple processes
263
266
  self.connection.close() # disconnect parent process from MySQL server
264
267
  del self.connection._conn.ctx # SSLContext is not pickleable
265
- with mp.Pool(
266
- processes, _initialize_populate, (self, jobs, populate_kwargs)
267
- ) as pool, (
268
- tqdm(desc="Processes: ", total=nkeys)
269
- if display_progress
270
- else contextlib.nullcontext()
271
- ) as progress_bar:
268
+ with (
269
+ mp.Pool(
270
+ processes, _initialize_populate, (self, jobs, populate_kwargs)
271
+ ) as pool,
272
+ (
273
+ tqdm(desc="Processes: ", total=nkeys)
274
+ if display_progress
275
+ else contextlib.nullcontext()
276
+ ) as progress_bar,
277
+ ):
272
278
  for status in pool.imap(_call_populate1, keys, chunksize=1):
273
279
  if status is True:
274
280
  success_list.append(1)
@@ -309,17 +315,46 @@ class AutoPopulate:
309
315
  ):
310
316
  return False
311
317
 
312
- self.connection.start_transaction()
318
+ # if make is a generator, it transaction can be delayed until the final stage
319
+ is_generator = inspect.isgeneratorfunction(make)
320
+ if not is_generator:
321
+ self.connection.start_transaction()
322
+
313
323
  if key in self.target: # already populated
314
- self.connection.cancel_transaction()
324
+ if not is_generator:
325
+ self.connection.cancel_transaction()
315
326
  if jobs is not None:
316
327
  jobs.complete(self.target.table_name, self._job_key(key))
317
328
  return False
318
329
 
319
330
  logger.debug(f"Making {key} -> {self.target.full_table_name}")
320
331
  self.__class__._allow_insert = True
332
+
321
333
  try:
322
- make(dict(key), **(make_kwargs or {}))
334
+ if not is_generator:
335
+ make(dict(key), **(make_kwargs or {}))
336
+ else:
337
+ # tripartite make - transaction is delayed until the final stage
338
+ gen = make(dict(key), **(make_kwargs or {}))
339
+ fetched_data = next(gen)
340
+ fetch_hash = deepdiff.DeepHash(
341
+ fetched_data, ignore_iterable_order=False
342
+ )[fetched_data]
343
+ computed_result = next(gen) # perform the computation
344
+ # fetch and insert inside a transaction
345
+ self.connection.start_transaction()
346
+ gen = make(dict(key), **(make_kwargs or {})) # restart make
347
+ fetched_data = next(gen)
348
+ if (
349
+ fetch_hash
350
+ != deepdiff.DeepHash(fetched_data, ignore_iterable_order=False)[
351
+ fetched_data
352
+ ]
353
+ ): # rollback due to referential integrity fail
354
+ self.connection.cancel_transaction()
355
+ return False
356
+ gen.send(computed_result) # insert
357
+
323
358
  except (KeyboardInterrupt, SystemExit, Exception) as error:
324
359
  try:
325
360
  self.connection.cancel_transaction()
@@ -3,17 +3,18 @@
3
3
  compatibility with Matlab-based serialization implemented by mYm.
4
4
  """
5
5
 
6
- import zlib
7
- from itertools import repeat
8
6
  import collections
9
- from decimal import Decimal
10
7
  import datetime
11
8
  import uuid
9
+ import zlib
10
+ from decimal import Decimal
11
+ from itertools import repeat
12
+
12
13
  import numpy as np
14
+
13
15
  from .errors import DataJointError
14
16
  from .settings import config
15
17
 
16
-
17
18
  deserialize_lookup = {
18
19
  0: {"dtype": None, "scalar_type": "UNKNOWN"},
19
20
  1: {"dtype": None, "scalar_type": "CELL"},
@@ -204,7 +205,7 @@ class Blob:
204
205
  return self.pack_dict(obj)
205
206
  if isinstance(obj, str):
206
207
  return self.pack_string(obj)
207
- if isinstance(obj, collections.abc.ByteString):
208
+ if isinstance(obj, (bytes, bytearray)):
208
209
  return self.pack_bytes(obj)
209
210
  if isinstance(obj, collections.abc.MutableSequence):
210
211
  return self.pack_list(obj)
@@ -1,6 +1,7 @@
1
1
  import argparse
2
2
  from code import interact
3
3
  from collections import ChainMap
4
+
4
5
  import datajoint as dj
5
6
 
6
7
 
@@ -1,17 +1,19 @@
1
1
  """ methods for generating SQL WHERE clauses from datajoint restriction conditions """
2
2
 
3
- import inspect
4
3
  import collections
5
- import re
6
- import uuid
7
4
  import datetime
8
5
  import decimal
6
+ import inspect
7
+ import json
8
+ import re
9
+ import uuid
10
+ from dataclasses import dataclass
11
+ from typing import List, Union
12
+
9
13
  import numpy
10
14
  import pandas
11
- import json
15
+
12
16
  from .errors import DataJointError
13
- from typing import Union, List
14
- from dataclasses import dataclass
15
17
 
16
18
  JSON_PATTERN = re.compile(
17
19
  r"^(?P<attr>\w+)(\.(?P<path>[\w.*\[\]]+))?(:(?P<type>[\w(,\s)]+))?$"
@@ -143,7 +145,7 @@ def make_condition(query_expression, condition, columns):
143
145
  condition.
144
146
  :return: an SQL condition string or a boolean value.
145
147
  """
146
- from .expression import QueryExpression, Aggregation, U
148
+ from .expression import Aggregation, QueryExpression, U
147
149
 
148
150
  def prep_value(k, v):
149
151
  """prepare SQL condition"""
@@ -3,20 +3,22 @@ This module contains the Connection class that manages the connection to the dat
3
3
  the ``conn`` function that provides access to a persistent connection in datajoint.
4
4
  """
5
5
 
6
+ import logging
7
+ import pathlib
8
+ import re
6
9
  import warnings
7
10
  from contextlib import contextmanager
8
- import pymysql as client
9
- import logging
10
11
  from getpass import getpass
11
- import re
12
- import pathlib
13
12
 
14
- from .settings import config
13
+ import pymysql as client
14
+
15
15
  from . import errors
16
- from .dependencies import Dependencies
17
16
  from .blob import pack, unpack
17
+ from .dependencies import Dependencies
18
18
  from .hash import uuid_from_buffer
19
19
  from .plugin import connection_plugins
20
+ from .settings import config
21
+ from .version import __version__
20
22
 
21
23
  logger = logging.getLogger(__name__.split(".")[0])
22
24
  query_log_max_length = 300
@@ -190,15 +192,20 @@ class Connection:
190
192
  self.conn_info["ssl_input"] = use_tls
191
193
  self.conn_info["host_input"] = host_input
192
194
  self.init_fun = init_fun
193
- logger.info("Connecting {user}@{host}:{port}".format(**self.conn_info))
194
195
  self._conn = None
195
196
  self._query_cache = None
196
197
  connect_host_hook(self)
197
198
  if self.is_connected:
198
- logger.info("Connected {user}@{host}:{port}".format(**self.conn_info))
199
+ logger.info(
200
+ "DataJoint {version} connected to {user}@{host}:{port}".format(
201
+ version=__version__, **self.conn_info
202
+ )
203
+ )
199
204
  self.connection_id = self.query("SELECT connection_id()").fetchone()[0]
200
205
  else:
201
- raise errors.LostConnectionError("Connection failed.")
206
+ raise errors.LostConnectionError(
207
+ "Connection failed {user}@{host}:{port}".format(**self.conn_info)
208
+ )
202
209
  self._in_transaction = False
203
210
  self.schemas = dict()
204
211
  self.dependencies = Dependencies(self)
@@ -344,7 +351,7 @@ class Connection:
344
351
  except errors.LostConnectionError:
345
352
  if not reconnect:
346
353
  raise
347
- logger.warning("MySQL server has gone away. Reconnecting to the server.")
354
+ logger.warning("Reconnecting to MySQL server.")
348
355
  connect_host_hook(self)
349
356
  if self._in_transaction:
350
357
  self.cancel_transaction()
@@ -3,13 +3,15 @@ This module hosts functions to convert DataJoint table definitions into mysql ta
3
3
  declare the corresponding mysql tables.
4
4
  """
5
5
 
6
- import re
7
- import pyparsing as pp
8
6
  import logging
7
+ import re
9
8
  from hashlib import sha1
10
- from .errors import DataJointError, _support_filepath_types, FILEPATH_FEATURE_SWITCH
9
+
10
+ import pyparsing as pp
11
+
11
12
  from .attribute_adapter import get_adapter
12
13
  from .condition import translate_attribute
14
+ from .errors import FILEPATH_FEATURE_SWITCH, DataJointError, _support_filepath_types
13
15
  from .settings import config
14
16
 
15
17
  UUID_DATA_TYPE = "binary(16)"
@@ -163,8 +165,8 @@ def compile_foreign_key(
163
165
  :param index_sql: list of INDEX declaration statements, duplicate or redundant indexes are ok.
164
166
  """
165
167
  # Parse and validate
166
- from .table import Table
167
168
  from .expression import QueryExpression
169
+ from .table import Table
168
170
 
169
171
  try:
170
172
  result = foreign_key_parser.parseString(line)