datajoint 2.3.1__tar.gz → 2.3.3__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.
Files changed (176) hide show
  1. {datajoint-2.3.1 → datajoint-2.3.3}/.github/workflows/post_draft_release_published.yaml +9 -53
  2. {datajoint-2.3.1 → datajoint-2.3.3}/.github/workflows/test.yaml +35 -0
  3. {datajoint-2.3.1 → datajoint-2.3.3}/.gitignore +3 -0
  4. {datajoint-2.3.1 → datajoint-2.3.3}/CONTRIBUTING.md +12 -12
  5. {datajoint-2.3.1 → datajoint-2.3.3}/PKG-INFO +3 -3
  6. {datajoint-2.3.1 → datajoint-2.3.3}/README.md +1 -1
  7. {datajoint-2.3.1 → datajoint-2.3.3}/RELEASE_MEMO.md +27 -23
  8. datajoint-2.3.3/images/pipeline.svg +165 -0
  9. {datajoint-2.3.1 → datajoint-2.3.3}/pyproject.toml +9 -2
  10. datajoint-2.3.3/src/datajoint/_version.py +24 -0
  11. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/adapters/base.py +51 -0
  12. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/adapters/postgres.py +16 -0
  13. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/autopopulate.py +10 -3
  14. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/builtin_codecs/filepath.py +9 -5
  15. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/builtin_codecs/hash.py +6 -4
  16. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/builtin_codecs/npy.py +4 -2
  17. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/builtin_codecs/object.py +4 -2
  18. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/builtin_codecs/schema.py +13 -3
  19. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/declare.py +109 -10
  20. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/dependencies.py +44 -40
  21. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/diagram.py +573 -370
  22. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/gc.py +21 -5
  23. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/heading.py +5 -1
  24. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/jobs.py +7 -2
  25. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/logging.py +18 -13
  26. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/migrate.py +28 -9
  27. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/settings.py +23 -8
  28. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/storage.py +42 -20
  29. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/table.py +63 -23
  30. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/user_tables.py +1 -9
  31. datajoint-2.3.3/src/datajoint/version.py +16 -0
  32. {datajoint-2.3.1 → datajoint-2.3.3}/tests/conftest.py +1 -0
  33. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_declare.py +88 -0
  34. datajoint-2.3.3/tests/integration/test_dependencies.py +109 -0
  35. datajoint-2.3.1/tests/integration/test_erd.py → datajoint-2.3.3/tests/integration/test_diagram.py +23 -9
  36. datajoint-2.3.3/tests/integration/test_diagram_bundle_edge.py +211 -0
  37. datajoint-2.3.3/tests/integration/test_diagram_edge_weight.py +125 -0
  38. datajoint-2.3.3/tests/integration/test_diagram_nocontext.py +54 -0
  39. datajoint-2.3.3/tests/integration/test_diagram_style.py +197 -0
  40. datajoint-2.3.3/tests/integration/test_fk_index.py +170 -0
  41. datajoint-2.3.3/tests/integration/test_foreign_keys.py +91 -0
  42. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_gc.py +186 -0
  43. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_jobs.py +24 -0
  44. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_multi_backend.py +85 -0
  45. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_object.py +49 -0
  46. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_trace.py +1 -1
  47. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema_uuid.py +12 -0
  48. datajoint-2.3.3/tests/unit/test_ddl_substitution.py +16 -0
  49. datajoint-2.3.3/tests/unit/test_gc.py +35 -0
  50. datajoint-2.3.3/tests/unit/test_logging.py +70 -0
  51. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_settings.py +57 -0
  52. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_storage_adapter.py +84 -1
  53. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_storage_urls.py +15 -0
  54. datajoint-2.3.3/tests/unit/test_type_patterns.py +160 -0
  55. datajoint-2.3.1/images/pipeline.png +0 -0
  56. datajoint-2.3.1/images/pipeline.svg +0 -118
  57. datajoint-2.3.1/src/datajoint/version.py +0 -4
  58. datajoint-2.3.1/tests/integration/test_dependencies.py +0 -52
  59. datajoint-2.3.1/tests/integration/test_foreign_keys.py +0 -53
  60. {datajoint-2.3.1 → datajoint-2.3.3}/.coveragerc +0 -0
  61. {datajoint-2.3.1 → datajoint-2.3.3}/.dockerignore +0 -0
  62. {datajoint-2.3.1 → datajoint-2.3.3}/.gitattributes +0 -0
  63. {datajoint-2.3.1 → datajoint-2.3.3}/.github/DISCUSSION_TEMPLATE/rfc.yml +0 -0
  64. {datajoint-2.3.1 → datajoint-2.3.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  65. {datajoint-2.3.1 → datajoint-2.3.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  66. {datajoint-2.3.1 → datajoint-2.3.3}/.github/ISSUE_TEMPLATE/improvement_request.md +0 -0
  67. {datajoint-2.3.1 → datajoint-2.3.3}/.github/dependabot.yml +0 -0
  68. {datajoint-2.3.1 → datajoint-2.3.3}/.github/release_drafter.yaml +0 -0
  69. {datajoint-2.3.1 → datajoint-2.3.3}/.github/workflows/close_inactive_issues_prs.yaml +0 -0
  70. {datajoint-2.3.1 → datajoint-2.3.3}/.github/workflows/draft_release.yaml +0 -0
  71. {datajoint-2.3.1 → datajoint-2.3.3}/.github/workflows/lint.yaml +0 -0
  72. {datajoint-2.3.1 → datajoint-2.3.3}/.pre-commit-config.yaml +0 -0
  73. {datajoint-2.3.1 → datajoint-2.3.3}/CHANGELOG-archive.md +0 -0
  74. {datajoint-2.3.1 → datajoint-2.3.3}/Dockerfile +0 -0
  75. {datajoint-2.3.1 → datajoint-2.3.3}/LICENSE +0 -0
  76. {datajoint-2.3.1 → datajoint-2.3.3}/activate.sh +0 -0
  77. {datajoint-2.3.1 → datajoint-2.3.3}/docker-compose.yaml +0 -0
  78. {datajoint-2.3.1 → datajoint-2.3.3}/pixi.lock +0 -0
  79. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/__init__.py +0 -0
  80. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/adapters/__init__.py +0 -0
  81. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/adapters/mysql.py +0 -0
  82. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/blob.py +0 -0
  83. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/builtin_codecs/__init__.py +0 -0
  84. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/builtin_codecs/attach.py +0 -0
  85. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/builtin_codecs/blob.py +0 -0
  86. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/cli.py +0 -0
  87. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/codecs.py +0 -0
  88. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/condition.py +0 -0
  89. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/connection.py +0 -0
  90. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/deploy.py +0 -0
  91. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/errors.py +0 -0
  92. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/expression.py +0 -0
  93. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/hash_registry.py +0 -0
  94. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/instance.py +0 -0
  95. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/lineage.py +0 -0
  96. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/objectref.py +0 -0
  97. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/preview.py +0 -0
  98. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/schemas.py +0 -0
  99. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/spark.py +0 -0
  100. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/staged_insert.py +0 -0
  101. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/storage_adapter.py +0 -0
  102. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/types.py +0 -0
  103. {datajoint-2.3.1 → datajoint-2.3.3}/src/datajoint/utils.py +0 -0
  104. {datajoint-2.3.1 → datajoint-2.3.3}/tests/__init__.py +0 -0
  105. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/__init__.py +0 -0
  106. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/data/Course.csv +0 -0
  107. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/data/CurrentTerm.csv +0 -0
  108. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/data/Department.csv +0 -0
  109. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/data/Enroll.csv +0 -0
  110. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/data/Grade.csv +0 -0
  111. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/data/Section.csv +0 -0
  112. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/data/Student.csv +0 -0
  113. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/data/StudentMajor.csv +0 -0
  114. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/data/Term.csv +0 -0
  115. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_aggr_regressions.py +0 -0
  116. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_alter.py +0 -0
  117. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_attach.py +0 -0
  118. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_autopopulate.py +0 -0
  119. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_blob.py +0 -0
  120. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_blob_matlab.py +0 -0
  121. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_cascade_delete.py +0 -0
  122. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_cascade_integrity.py +0 -0
  123. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_cascading_delete.py +0 -0
  124. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_cli.py +0 -0
  125. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_codec_chaining.py +0 -0
  126. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_codecs.py +0 -0
  127. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_connection.py +0 -0
  128. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_fetch.py +0 -0
  129. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_fetch_same.py +0 -0
  130. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_groupby.py +0 -0
  131. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_hash_storage.py +0 -0
  132. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_hidden_job_metadata.py +0 -0
  133. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_insert.py +0 -0
  134. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_json.py +0 -0
  135. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_nan.py +0 -0
  136. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_npy_codec.py +0 -0
  137. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_privileges.py +0 -0
  138. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_reconnection.py +0 -0
  139. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_relation.py +0 -0
  140. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_relation_u.py +0 -0
  141. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_relational_operand.py +0 -0
  142. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_schema.py +0 -0
  143. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_schema_keywords.py +0 -0
  144. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_semantic_matching.py +0 -0
  145. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_skip_duplicates.py +0 -0
  146. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_tls.py +0 -0
  147. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_type_aliases.py +0 -0
  148. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_university.py +0 -0
  149. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_update1.py +0 -0
  150. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_utils.py +0 -0
  151. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_uuid.py +0 -0
  152. {datajoint-2.3.1 → datajoint-2.3.3}/tests/integration/test_virtual_module.py +0 -0
  153. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema.py +0 -0
  154. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema_advanced.py +0 -0
  155. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema_aggr_regress.py +0 -0
  156. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema_alter.py +0 -0
  157. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema_codecs.py +0 -0
  158. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema_external.py +0 -0
  159. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema_object.py +0 -0
  160. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema_privileges.py +0 -0
  161. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema_simple.py +0 -0
  162. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema_type_aliases.py +0 -0
  163. {datajoint-2.3.1 → datajoint-2.3.3}/tests/schema_university.py +0 -0
  164. {datajoint-2.3.1 → datajoint-2.3.3}/tests/test_package.py +0 -0
  165. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/__init__.py +0 -0
  166. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_adapters.py +0 -0
  167. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_codecs.py +0 -0
  168. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_condition.py +0 -0
  169. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_connection_warning.py +0 -0
  170. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_declare_hidden_attribute.py +0 -0
  171. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_deploy.py +0 -0
  172. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_fetch_compat.py +0 -0
  173. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_lazy_imports.py +0 -0
  174. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_pk_rules.py +0 -0
  175. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_spark.py +0 -0
  176. {datajoint-2.3.1 → datajoint-2.3.3}/tests/unit/test_thread_safe.py +0 -0
@@ -12,9 +12,8 @@ run-name: Post ${{ github.event.release.name }}
12
12
  jobs:
13
13
  pypi-release:
14
14
  permissions:
15
- # write permission is required to update version.py
15
+ # write permission is required to upload build artifacts as release assets
16
16
  contents: write
17
- pull-requests: write
18
17
  # Use the oldest supported version to build, just in case there are issues
19
18
  # for our case, this doesn't matter that much, since the build is for 3.x
20
19
  strategy:
@@ -33,32 +32,10 @@ jobs:
33
32
  uses: actions/checkout@v4
34
33
  with:
35
34
  token: ${{ secrets.GITHUB_TOKEN }}
36
- # new release needs the updated version.py
37
- - name: Update version.py
38
- run: |
39
- VERSION=$(echo "${{ github.event.release.name }}" | grep -oP '\d+\.\d+\.\d+')
40
- sed -i "s/^__version__ = .*/__version__ = \"$VERSION\"/" src/datajoint/version.py
41
- cat src/datajoint/version.py
42
- # Commit the changes
43
- BRANCH_NAME="update-version-$VERSION"
44
- git switch -c $BRANCH_NAME
45
- git config --global user.name "github-actions"
46
- git config --global user.email "github-actions@github.com"
47
- git add src/datajoint/version.py
48
- git commit -m "Update version.py to $VERSION"
49
- echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
50
- - name: Update README.md badge
51
- run: |
52
- # commits since the last release
53
- NEW_HREF="https://github.com/datajoint/datajoint-python/compare/${{ github.event.release.tag_name }}...master"
54
- NEW_SRC="https://img.shields.io/github/commits-since/datajoint/datajoint-python/${{ github.event.release.tag_name }}?color=red"
55
- # Update href in the <a> tag
56
- sed -i 's|\(<a id="commit-since-release-link"[^>]*href="\)[^"]*\(".*\)|\1'"$NEW_HREF"'\2|' README.md
57
- # Update src in the <img> tag
58
- sed -i 's|\(<img id="commit-since-release-img"[^>]*src="\)[^"]*\(".*\)|\1'"$NEW_SRC"'\2|' README.md
59
- git add README.md
60
- # Only commit if there are changes (handles re-runs gracefully)
61
- git diff --cached --quiet README.md || git commit -m "Update README.md badge to ${{ github.event.release.tag_name }}"
35
+ # Full history + tags so hatch-vcs can derive the version from the
36
+ # release tag. The checked-out ref is the tag itself, so the build
37
+ # reports exactly X.Y.Z — no version.py bump or follow-up PR needed.
38
+ fetch-depth: 0
62
39
  - name: Set up Python ${{matrix.py_ver}}
63
40
  uses: actions/setup-python@v5
64
41
  with:
@@ -73,34 +50,24 @@ jobs:
73
50
  python -m build .
74
51
  echo "DJ_WHEEL_PATH=$(ls dist/datajoint-*.whl)" >> $GITHUB_ENV
75
52
  echo "DJ_SDIST_PATH=$(ls dist/datajoint-*.tar.gz)" >> $GITHUB_ENV
76
- echo "NEW_VERSION=${{github.event.release.resolved_version}}" >> $GITHUB_ENV
77
53
  - name: Publish package
78
54
  id: publish
79
55
  env:
80
56
  RELEASE_NAME: ${{ github.event.release.name }}
81
57
  run: |
82
- export HOST_UID=$(id -u)
58
+ python -m pip install --upgrade twine
83
59
  if [[ "$RELEASE_NAME" =~ ^Test ]]; then
84
- LATEST_PYPI=$(curl -s https://test.pypi.org/pypi/datajoint/json | jq -r '.info.version')
85
60
  echo "TEST_PYPI=true" >> $GITHUB_ENV
86
61
  export TWINE_REPOSITORY="testpypi"
87
62
  export TWINE_USERNAME=${TWINE_TEST_USERNAME}
88
63
  export TWINE_PASSWORD=${TWINE_TEST_PASSWORD}
89
64
  else
90
- LATEST_PYPI=$(curl -s https://pypi.org/pypi/datajoint/json | jq -r '.info.version')
91
65
  echo "TEST_PYPI=false" >> $GITHUB_ENV
92
66
  export TWINE_REPOSITORY="pypi"
93
67
  fi
94
- # Check if the new version is different from the latest on PyPI, avoid re-uploading error
95
- if [ "$NEW_VERSION" != "$LATEST_PYPI" ]; then
96
- docker compose run --build --quiet-pull \
97
- -e TWINE_USERNAME=${TWINE_USERNAME} \
98
- -e TWINE_PASSWORD=${TWINE_PASSWORD} \
99
- -e TWINE_REPOSITORY=${TWINE_REPOSITORY} \
100
- app sh -c "pip install twine && python -m twine upload dist/*"
101
- else
102
- echo "::warning::Latest version $LATEST_PYPI on $TWINE_REPOSITORY is the new version $NEW_VERSION"
103
- fi
68
+ # Upload the artifacts built in the previous step. --skip-existing
69
+ # keeps re-runs idempotent (no error if the version already exists).
70
+ python -m twine upload --skip-existing dist/*
104
71
  # Upload package as release assets
105
72
  - name: Upload pip wheel asset to release
106
73
  uses: actions/upload-release-asset@v1
@@ -120,17 +87,6 @@ jobs:
120
87
  asset_path: ${{env.DJ_SDIST_PATH}}
121
88
  asset_name: pip-datajoint-${{ github.event.release.tag_name }}.tar.gz
122
89
  asset_content_type: application/gzip
123
- - name: Create Pull Request
124
- env:
125
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126
- run: |
127
- git push origin ${{ env.BRANCH_NAME }}
128
- gh pr create \
129
- --title "[github-actions]Update version.py to ${{ github.event.release.name }}" \
130
- --body "This PR updates \`version.py\` to match the latest release: ${{ github.event.release.name }}" \
131
- --base master \
132
- --head ${{ env.BRANCH_NAME }} \
133
- --reviewer dimitri-yatsenko,drewyangdev,ttngu207
134
90
  - name: Post release notification to Slack
135
91
  if: ${{ env.TEST_PYPI == 'false' }}
136
92
  uses: slackapi/slack-github-action@v2.0.0
@@ -68,3 +68,38 @@ jobs:
68
68
 
69
69
  - name: Run unit tests
70
70
  run: pixi run -e test pytest tests/unit -v
71
+
72
+ # Windows unit tests: guard OS-specific behavior (path separators, etc.) that
73
+ # the Linux jobs above cannot catch — e.g. #1520, where file-protocol paths
74
+ # rendered with native backslashes broke garbage collection on Windows.
75
+ # pixi targets linux/osx only (see [tool.pixi] platforms), so this leg uses
76
+ # pip. Unit tests need no containers, so no Docker/DB is required on Windows.
77
+ unit-tests-windows:
78
+ runs-on: windows-latest
79
+ strategy:
80
+ fail-fast: false
81
+ matrix:
82
+ # Exercise both ends of the supported range (requires-python >=3.10,<3.15).
83
+ python-version: ["3.10", "3.14"]
84
+ name: unit-tests-windows (py${{ matrix.python-version }})
85
+ steps:
86
+ - uses: actions/checkout@v4
87
+ with:
88
+ fetch-depth: 0 # hatch-vcs derives the version from git history/tags
89
+
90
+ - name: Set up Python
91
+ uses: actions/setup-python@v5
92
+ with:
93
+ python-version: ${{ matrix.python-version }}
94
+
95
+ # NOTE: pip resolves `[project.optional-dependencies].test`, which is a
96
+ # DIFFERENT set than the pixi Linux legs' `[dependency-groups].test`
97
+ # (e.g. it omits graphviz). A unit test importing a dep present in only
98
+ # one set would then pass on Linux but error on Windows (or vice versa) —
99
+ # a dep-set mismatch that reads like an OS bug. Keep the two `test` sets
100
+ # in sync when unit-test dependencies change.
101
+ - name: Install package with test extras
102
+ run: pip install -e ".[test]"
103
+
104
+ - name: Run unit tests
105
+ run: pytest tests/unit -v
@@ -28,6 +28,9 @@ share/python-wheels/
28
28
  *.egg
29
29
  MANIFEST
30
30
 
31
+ # Version file generated at build time by hatch-vcs (see pyproject.toml)
32
+ src/datajoint/_version.py
33
+
31
34
  # PyInstaller
32
35
  # Usually these files are written by a python script from a template
33
36
  # before PyInstaller builds the exe, so as to inject date/other infos into it.
@@ -16,13 +16,13 @@ git clone https://github.com/datajoint/datajoint-python.git
16
16
  cd datajoint-python
17
17
 
18
18
  # Run tests (containers managed automatically)
19
- pixi run test
19
+ pixi run -e test test
20
20
 
21
21
  # Run with coverage
22
- pixi run test-cov
22
+ pixi run -e test test-cov
23
23
 
24
24
  # Run pre-commit hooks
25
- pixi run pre-commit run --all-files
25
+ pixi run -e dev pre-commit run --all-files
26
26
  ```
27
27
 
28
28
  ### Alternative: Using pip
@@ -41,8 +41,8 @@ Tests use [testcontainers](https://testcontainers.com/) to automatically manage
41
41
  Integration tests are **backend-parameterized** — tests using the `backend` fixture run automatically against both MySQL and PostgreSQL.
42
42
 
43
43
  ```bash
44
- pixi run test # All tests (both backends)
45
- pixi run test-cov # With coverage
44
+ pixi run -e test test # All tests (both backends)
45
+ pixi run -e test test-cov # With coverage
46
46
  pixi run -e test pytest tests/unit/ # Unit tests only
47
47
  pixi run -e test pytest tests/integration/test_blob.py -v # Specific file
48
48
  pixi run -e test pytest -m mysql # MySQL tests only
@@ -69,12 +69,12 @@ Tests automatically spin up both MySQL and PostgreSQL containers via testcontain
69
69
  ```bash
70
70
  # MySQL + MinIO
71
71
  docker compose up -d db minio
72
- DJ_USE_EXTERNAL_CONTAINERS=1 pixi run test
72
+ DJ_USE_EXTERNAL_CONTAINERS=1 pixi run -e test test
73
73
  docker compose down
74
74
 
75
75
  # MySQL + PostgreSQL + MinIO
76
76
  docker compose up -d db postgres minio
77
- DJ_USE_EXTERNAL_CONTAINERS=1 pixi run test
77
+ DJ_USE_EXTERNAL_CONTAINERS=1 pixi run -e test test
78
78
  docker compose down
79
79
  ```
80
80
 
@@ -91,8 +91,8 @@ docker compose --profile test up djtest --build
91
91
  Hooks run automatically on `git commit`. All must pass.
92
92
 
93
93
  ```bash
94
- pixi run pre-commit install # First time only
95
- pixi run pre-commit run --all-files # Run manually
94
+ pixi run -e dev pre-commit install # First time only
95
+ pixi run -e dev pre-commit run --all-files # Run manually
96
96
  ```
97
97
 
98
98
  Hooks include: **ruff** (lint/format), **codespell**, YAML/JSON/TOML validation.
@@ -101,9 +101,9 @@ Hooks include: **ruff** (lint/format), **codespell**, YAML/JSON/TOML validation.
101
101
 
102
102
  ## Before Submitting a PR
103
103
 
104
- 1. `pixi run test` — All tests pass
105
- 2. `pixi run pre-commit run --all-files` — Hooks pass
106
- 3. `pixi run test-cov` — Coverage maintained
104
+ 1. `pixi run -e test test` — All tests pass
105
+ 2. `pixi run -e dev pre-commit run --all-files` — Hooks pass
106
+ 3. `pixi run -e test test-cov` — Coverage maintained
107
107
 
108
108
  ---
109
109
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: datajoint
3
- Version: 2.3.1
3
+ Version: 2.3.3
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
  Project-URL: Homepage, https://docs.datajoint.com/
6
6
  Project-URL: Documentation, https://docs.datajoint.com/
@@ -336,7 +336,7 @@ conda install -c conda-forge datajoint
336
336
 
337
337
  ## Example Pipeline
338
338
 
339
- ![pipeline](images/pipeline.png)
339
+ ![pipeline](images/pipeline.svg)
340
340
 
341
341
  **Cite DataJoint:** [Yatsenko et al., 2026](https://arxiv.org/abs/2602.16585) — RRID: [SCR_014543](https://scicrunch.org/resolver/SCR_014543)
342
342
 
@@ -69,7 +69,7 @@ conda install -c conda-forge datajoint
69
69
 
70
70
  ## Example Pipeline
71
71
 
72
- ![pipeline](images/pipeline.png)
72
+ ![pipeline](images/pipeline.svg)
73
73
 
74
74
  **Cite DataJoint:** [Yatsenko et al., 2026](https://arxiv.org/abs/2602.16585) — RRID: [SCR_014543](https://scicrunch.org/resolver/SCR_014543)
75
75
 
@@ -4,13 +4,7 @@
4
4
 
5
5
  | Branch | Purpose | Version |
6
6
  |--------|---------|---------|
7
- | `master` | Main development | 2.1.x |
8
- | `maint/2.0` | Maintenance releases | 2.0.x |
9
-
10
- For 2.0.x bugfixes:
11
- 1. Commit to `maint/2.0`
12
- 2. Tag and release as v2.0.x
13
- 3. Cherry-pick to master if applicable
7
+ | `master` | Main development | 2.3.x |
14
8
 
15
9
  ---
16
10
 
@@ -68,10 +62,11 @@ The release drafter uses PR labels to categorize changes:
68
62
 
69
63
  | Label | Category |
70
64
  |-------|----------|
71
- | `breaking` | BREAKING CHANGES |
72
- | `enhancement` | Added |
73
- | `bug` | Fixed |
74
- | `documentation` | (usually excluded) |
65
+ | `breaking` | 💥 Breaking Changes |
66
+ | `feature` | 🚀 Features |
67
+ | `enhancement` | ⚡️ Enhancements |
68
+ | `bug` | 🐛 Bug Fixes |
69
+ | `documentation` | 📝 Documentation |
75
70
 
76
71
  Ensure PRs have appropriate labels before merging.
77
72
 
@@ -87,20 +82,23 @@ Ensure PRs have appropriate labels before merging.
87
82
  - Set release name to `Release X.Y.Z`
88
83
  - Set tag to `vX.Y.Z`
89
84
  - Review and edit release notes
90
- 4. **Publish the release**
85
+ 4. **Publish the release** — this creates the `vX.Y.Z` tag.
91
86
  5. Automation will:
92
- - Update `version.py` to `X.Y.Z`
93
- - Build and publish to PyPI
94
- - Create PR to merge version update back to master
87
+ - Build from the tag and publish to PyPI
88
+ - Attach the wheel/sdist as release assets
95
89
 
96
90
  ### Version Note
97
91
 
98
- The release drafter computes version from the previous tag. You may need to **manually edit** the release name for major version changes.
92
+ The release drafter computes the version from the previous tag. You may need to
93
+ **manually edit** the release name/tag for major version changes.
99
94
 
100
- The regex in `post_draft_release_published.yaml` extracts version from the release name:
101
- ```bash
102
- VERSION=$(echo "${{ github.event.release.name }}" | grep -oP '\d+\.\d+\.\d+')
103
- ```
95
+ The package version is **derived from the git tag** at build time by
96
+ [hatch-vcs](https://github.com/ofek/hatch-vcs) (see `[tool.hatch.version]` in
97
+ `pyproject.toml`) — the tag is the single source of truth. There is **no
98
+ `version.py` value to bump** and **no follow-up version PR**: publishing the
99
+ `vX.Y.Z` tag is what sets the version everywhere (`pip install`, `pip show`, and
100
+ `datajoint.__version__`). Do not hand-edit `src/datajoint/version.py`; it only
101
+ re-exports the build-generated `_version.py`.
104
102
 
105
103
  ---
106
104
 
@@ -155,11 +153,16 @@ If the bot doesn't create a PR, manually update the feedstock:
155
153
  run:
156
154
  - python >={{ python_min }}
157
155
  - numpy
156
+ - pymysql >=0.7.2
157
+ - deepdiff
158
+ - pyparsing
158
159
  - pandas
159
- - pymysql >=1.0
160
- - minio
160
+ - tqdm
161
+ - networkx
162
+ - pydot
163
+ - fsspec >=2023.1.0
164
+ - pydantic-settings >=2.0.0
161
165
  - packaging
162
- # ... etc
163
166
  ```
164
167
 
165
168
  5. **Submit PR** to the feedstock
@@ -215,6 +218,7 @@ After build completes:
215
218
 
216
219
  - @datajointbot
217
220
  - @dimitri-yatsenko
221
+ - @MilagrosMarin
218
222
  - @ttngu207
219
223
 
220
224
  ## Links
@@ -0,0 +1,165 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1500 700"
2
+ font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif"
3
+ font-size="22">
4
+ <!-- Adaptive theming (dj.Diagram "auto" mode): the figure renders in the
5
+ light palette by default and remaps to the dark palette under
6
+ prefers-color-scheme: dark. Colors are unique per role, so attribute
7
+ selectors override the inline presentation attributes unambiguously;
8
+ the three whites (page, code panel, part fill) are disambiguated by
9
+ class since they map to different darks. -->
10
+ <style>
11
+ @media (prefers-color-scheme: dark) {
12
+ .bg { fill: #161A21; }
13
+ .panel { fill: #1E232C; }
14
+ .part { fill: #1E232C; }
15
+ /* node fills */
16
+ [fill="#E7F3EC"] { fill: #16281F; }
17
+ [fill="#E2ECFA"] { fill: #152538; }
18
+ [fill="#F2F4F7"] { fill: #242832; }
19
+ [fill="#FBEAEC"] { fill: #331A1F; }
20
+ [fill="#F3F5F8"] { fill: #2A313D; }
21
+ /* strokes (nodes, cluster, edges) */
22
+ [stroke="#2F7D5B"] { stroke: #4FA97F; }
23
+ [stroke="#2A5FA5"] { stroke: #5E92D6; }
24
+ [stroke="#A9B1BD"] { stroke: #8A93A1; }
25
+ [stroke="#B23A48"] { stroke: #D0687A; }
26
+ [stroke="#9AA6B8"] { stroke: #7B879B; }
27
+ [stroke="#E2E6EC"] { stroke: #39414E; }
28
+ [stroke="#3A424F"] { stroke: #AEB6C2; }
29
+ /* node text */
30
+ [fill="#1B5138"] { fill: #BCE6CF; }
31
+ [fill="#123A6D"] { fill: #C3DAF6; }
32
+ [fill="#495261"] { fill: #C9CFD9; }
33
+ [fill="#7C2430"] { fill: #F3C2CB; }
34
+ [fill="#46536B"] { fill: #C4CCDB; }
35
+ /* code panel + annotations */
36
+ [fill="#24292e"] { fill: #c9d1d9; }
37
+ [fill="#005cc5"] { fill: #79c0ff; }
38
+ [fill="#6f42c1"] { fill: #d2a8ff; }
39
+ [fill="#22863a"] { fill: #7ee787; }
40
+ [fill="#5a5a5a"] { fill: #8b949e; }
41
+ [stroke="#d0d0d0"] { stroke: #30363d; }
42
+ [stroke="#bbb"] { stroke: #484f58; }
43
+ [stroke="#c9ced6"] { stroke: #484f58; }
44
+ }
45
+ </style>
46
+
47
+ <!-- Page background (adaptive; light default keeps GitHub/README legible even
48
+ where prefers-color-scheme is not honored). -->
49
+ <rect class="bg" width="100%" height="100%" fill="white"/>
50
+
51
+ <!-- ============ LEFT PANEL: pipeline diagram (dj.Diagram notation) ============
52
+ Node styling mirrors the modernized dj.Diagram light theme:
53
+ Manual rectangle fill #E7F3EC stroke #2F7D5B
54
+ Lookup rectangle fill #F2F4F7 stroke #A9B1BD
55
+ Imported oval fill #E2ECFA stroke #2A5FA5
56
+ Computed oval fill #FBEAEC stroke #B23A48
57
+ Part rectangle fill #FFFFFF stroke #9AA6B8
58
+ Edge thickness encodes cardinality: thick = 1:1 (the FK is the child's
59
+ whole primary key), thin = one-to-many. A master and its parts sit in a
60
+ subtle rounded entity cluster. -->
61
+
62
+ <!-- master-part entity cluster (drawn behind its members) -->
63
+ <rect x="142" y="350" width="216" height="152" rx="14"
64
+ fill="#F3F5F8" stroke="#E2E6EC" stroke-width="1.4"/>
65
+
66
+ <!-- Edges (no arrowheads — vertical flow implies direction, as dj.Diagram renders) -->
67
+ <g stroke="#3A424F" fill="none">
68
+ <line x1="200" y1="84" x2="200" y2="110" stroke-width="1.4"/>
69
+ <line x1="200" y1="154" x2="200" y2="180" stroke-width="1.4"/>
70
+ <line x1="200" y1="224" x2="200" y2="262" stroke-width="3"/> <!-- Scan->AverageFrame: 1:1, thick -->
71
+ <line x1="210" y1="316" x2="244" y2="366" stroke-width="1.4"/>
72
+ <line x1="432" y1="300" x2="304" y2="380" stroke-width="1.4"/>
73
+ <line x1="250" y1="422" x2="250" y2="448" stroke-width="1.4"/>
74
+ </g>
75
+
76
+ <!-- Manual: Subject -->
77
+ <rect x="135" y="40" width="130" height="44" rx="6" fill="#E7F3EC" stroke="#2F7D5B" stroke-width="1.6"/>
78
+ <text x="200" y="69" text-anchor="middle" fill="#1B5138" font-weight="600">Subject</text>
79
+
80
+ <!-- Manual: Session -->
81
+ <rect x="135" y="110" width="130" height="44" rx="6" fill="#E7F3EC" stroke="#2F7D5B" stroke-width="1.6"/>
82
+ <text x="200" y="139" text-anchor="middle" fill="#1B5138" font-weight="600">Session</text>
83
+
84
+ <!-- Manual: Scan -->
85
+ <rect x="135" y="180" width="130" height="44" rx="6" fill="#E7F3EC" stroke="#2F7D5B" stroke-width="1.6"/>
86
+ <text x="200" y="209" text-anchor="middle" fill="#1B5138" font-weight="600">Scan</text>
87
+
88
+ <!-- Imported: AverageFrame -->
89
+ <ellipse cx="200" cy="290" rx="94" ry="28" fill="#E2ECFA" stroke="#2A5FA5" stroke-width="1.6"/>
90
+ <text x="200" y="298" text-anchor="middle" fill="#123A6D" font-weight="600">AverageFrame</text>
91
+
92
+ <!-- Lookup: SegmentationParams -->
93
+ <rect x="327" y="256" width="236" height="44" rx="6" fill="#F2F4F7" stroke="#A9B1BD" stroke-width="1.6"/>
94
+ <text x="445" y="285" text-anchor="middle" fill="#495261" font-weight="600">SegmentationParams</text>
95
+
96
+ <!-- Computed: Segmentation (master) -->
97
+ <ellipse cx="250" cy="392" rx="102" ry="30" fill="#FBEAEC" stroke="#B23A48" stroke-width="1.6"/>
98
+ <text x="250" y="400" text-anchor="middle" fill="#7C2430" font-weight="700">Segmentation</text>
99
+
100
+ <!-- Part: Activity -->
101
+ <rect class="part" x="176" y="448" width="148" height="42" rx="6" fill="#FFFFFF" stroke="#9AA6B8" stroke-width="1.6"/>
102
+ <text x="250" y="476" text-anchor="middle" fill="#46536B" font-weight="600">Activity</text>
103
+
104
+ <!-- zoom connectors: the code panel is the Segmentation master-part group -->
105
+ <g stroke="#c9ced6" stroke-width="1" stroke-dasharray="5,4" fill="none">
106
+ <line x1="358" y1="356" x2="588" y2="62"/>
107
+ <line x1="358" y1="496" x2="588" y2="658"/>
108
+ </g>
109
+
110
+ <!-- ============ RIGHT PANEL: code snippet ============
111
+ Indentation via per-line x offsets @ 16px monospace (~9.6 px/char):
112
+ L0 x=610, L1 x=648, L2 x=686, L3 x=724 -->
113
+ <rect class="panel" x="588" y="60" width="627" height="600" rx="6" fill="white" stroke="#d0d0d0" stroke-width="1"/>
114
+
115
+ <g font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
116
+ font-size="16" fill="#24292e">
117
+ <text x="610" y="92"><tspan fill="#005cc5">@schema</tspan></text>
118
+ <text x="610" y="113"><tspan fill="#005cc5">class</tspan> <tspan fill="#6f42c1" font-weight="600">Segmentation</tspan>(dj.Computed):</text>
119
+ <text x="648" y="134">definition = <tspan fill="#22863a">"""</tspan></text>
120
+ <text x="648" y="155" fill="#22863a">-&gt; AverageFrame</text>
121
+ <text x="648" y="176" fill="#22863a">-&gt; SegmentationParams</text>
122
+ <text x="648" y="197" fill="#22863a">---</text>
123
+ <text x="648" y="218" fill="#22863a">num_cells : int32</text>
124
+ <text x="648" y="239" fill="#22863a">"""</text>
125
+
126
+ <text x="648" y="281"><tspan fill="#005cc5">class</tspan> <tspan fill="#6f42c1" font-weight="600">Activity</tspan>(dj.Part):</text>
127
+ <text x="686" y="302">definition = <tspan fill="#22863a">"""</tspan></text>
128
+ <text x="686" y="323" fill="#22863a">-&gt; master</text>
129
+ <text x="686" y="344" fill="#22863a">roi_id : int32</text>
130
+ <text x="686" y="365" fill="#22863a">---</text>
131
+ <text x="686" y="386" fill="#22863a">cell_mask : &lt;blob@&gt;</text>
132
+ <text x="686" y="407" fill="#22863a">trace : &lt;blob@&gt;</text>
133
+ <text x="686" y="428" fill="#22863a">"""</text>
134
+
135
+ <text x="648" y="470"><tspan fill="#005cc5">def</tspan> <tspan fill="#6f42c1" font-weight="600">make</tspan>(self, key):</text>
136
+ <text x="686" y="491">frame = (AverageFrame &amp; key).fetch1(<tspan fill="#22863a">'frame'</tspan>)</text>
137
+ <text x="686" y="512">params = (SegmentationParams &amp; key).fetch1()</text>
138
+ <text x="686" y="533">masks, traces = segment(frame, **params)</text>
139
+ <text x="686" y="554">self.insert1(dict(key, num_cells=len(masks)))</text>
140
+ <text x="686" y="575">self.Activity.insert(</text>
141
+ <text x="724" y="596">dict(key, roi_id=i, cell_mask=m, trace=t)</text>
142
+ <text x="724" y="617"><tspan fill="#005cc5">for</tspan> i, (m, t) <tspan fill="#005cc5">in</tspan> enumerate(zip(masks, traces)))</text>
143
+ </g>
144
+
145
+ <!-- ============ Annotations ============ -->
146
+ <g font-style="italic" fill="#5a5a5a" font-size="18">
147
+ <text x="1235" y="92">database link</text>
148
+ <line x1="1230" y1="87" x2="700" y2="87" stroke="#bbb" stroke-width="0.7" stroke-dasharray="3,3"/>
149
+
150
+ <text x="1235" y="113">table name</text>
151
+ <line x1="1230" y1="108" x2="905" y2="108" stroke="#bbb" stroke-width="0.7" stroke-dasharray="3,3"/>
152
+
153
+ <text x="1235" y="155">dependency</text>
154
+ <line x1="1230" y1="150" x2="820" y2="150" stroke="#bbb" stroke-width="0.7" stroke-dasharray="3,3"/>
155
+
156
+ <text x="1235" y="281">part table</text>
157
+ <line x1="1230" y1="276" x2="835" y2="276" stroke="#bbb" stroke-width="0.7" stroke-dasharray="3,3"/>
158
+
159
+ <text x="1235" y="386">object-store attribute</text>
160
+ <line x1="1230" y1="381" x2="905" y2="381" stroke="#bbb" stroke-width="0.7" stroke-dasharray="3,3"/>
161
+
162
+ <text x="1235" y="491">computation</text>
163
+ <line x1="1230" y1="486" x2="985" y2="486" stroke="#bbb" stroke-width="0.7" stroke-dasharray="3,3"/>
164
+ </g>
165
+ </svg>
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["hatchling"]
2
+ requires = ["hatchling", "hatch-vcs"]
3
3
  build-backend = "hatchling.build"
4
4
 
5
5
  [project]
@@ -219,7 +219,14 @@ module = [
219
219
  ignore_errors = true
220
220
 
221
221
  [tool.hatch.version]
222
- path = "src/datajoint/version.py"
222
+ # Version is derived from the git tag at build time (hatch-vcs), so the tag is
223
+ # the single source of truth: `pip install git+...@vX.Y.Z` reports X.Y.Z. The
224
+ # resolved version is written to the generated (git-ignored) src/datajoint/_version.py
225
+ # by the build hook below; src/datajoint/version.py reads it back at runtime.
226
+ source = "vcs"
227
+
228
+ [tool.hatch.build.hooks.vcs]
229
+ version-file = "src/datajoint/_version.py"
223
230
 
224
231
  [tool.hatch.build.targets.wheel]
225
232
  packages = ["src/datajoint"]
@@ -0,0 +1,24 @@
1
+ # file generated by vcs-versioning
2
+ # don't change, don't track in version control
3
+ from __future__ import annotations
4
+
5
+ __all__ = [
6
+ "__version__",
7
+ "__version_tuple__",
8
+ "version",
9
+ "version_tuple",
10
+ "__commit_id__",
11
+ "commit_id",
12
+ ]
13
+
14
+ version: str
15
+ __version__: str
16
+ __version_tuple__: tuple[int | str, ...]
17
+ version_tuple: tuple[int | str, ...]
18
+ commit_id: str | None
19
+ __commit_id__: str | None
20
+
21
+ __version__ = version = '2.3.3'
22
+ __version_tuple__ = version_tuple = (2, 3, 3)
23
+
24
+ __commit_id__ = commit_id = None
@@ -617,6 +617,57 @@ class DatabaseAdapter(ABC):
617
617
  """
618
618
  return True # Default for MySQL, override in PostgreSQL
619
619
 
620
+ def get_pending_enum_ddl(self, schema_name: str) -> list[str]:
621
+ """
622
+ DDL for backend types that must exist before the columns using them,
623
+ clearing the pending list as it reads.
624
+
625
+ Backends that spell column types inline (MySQL) have none. PostgreSQL
626
+ overrides this to emit CREATE TYPE for enums registered while parsing.
627
+
628
+ Parameters
629
+ ----------
630
+ schema_name : str
631
+ Schema used to qualify the type names.
632
+
633
+ Returns
634
+ -------
635
+ list[str]
636
+ Empty for MySQL; CREATE TYPE statements for PostgreSQL.
637
+ """
638
+ return []
639
+
640
+ @property
641
+ def supports_column_position(self) -> bool:
642
+ """
643
+ Whether ALTER TABLE can place a column at a position (``AFTER x``).
644
+
645
+ MySQL supports it. PostgreSQL has no such clause and always appends,
646
+ so the position is dropped rather than emitted.
647
+
648
+ Returns
649
+ -------
650
+ bool
651
+ True for MySQL, False for PostgreSQL.
652
+ """
653
+ return True # Default for MySQL, override in PostgreSQL
654
+
655
+ @property
656
+ def auto_indexes_foreign_keys(self) -> bool:
657
+ """
658
+ Whether this backend implicitly indexes a foreign key's referencing
659
+ (child) columns as part of enforcing the constraint.
660
+
661
+ MySQL/InnoDB does; PostgreSQL does not (and offers no server setting to
662
+ make it), so DataJoint must emit an explicit index on that backend.
663
+
664
+ Returns
665
+ -------
666
+ bool
667
+ True for MySQL, False for PostgreSQL.
668
+ """
669
+ return True # Default for MySQL, override in PostgreSQL
670
+
620
671
  def create_index_ddl(
621
672
  self,
622
673
  full_table_name: str,
@@ -720,6 +720,22 @@ class PostgreSQLAdapter(DatabaseAdapter):
720
720
  """
721
721
  return False
722
722
 
723
+ @property
724
+ def supports_column_position(self) -> bool:
725
+ """
726
+ PostgreSQL has no ``AFTER`` clause in ALTER TABLE; added columns are
727
+ always appended.
728
+ """
729
+ return False
730
+
731
+ @property
732
+ def auto_indexes_foreign_keys(self) -> bool:
733
+ """
734
+ PostgreSQL never indexes a foreign key's referencing columns
735
+ automatically, so DataJoint emits an explicit (coverage-aware) index.
736
+ """
737
+ return False
738
+
723
739
  # =========================================================================
724
740
  # Introspection
725
741
  # =========================================================================