datajoint 2.3.2__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.
- {datajoint-2.3.2 → datajoint-2.3.3}/.github/workflows/test.yaml +35 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/CONTRIBUTING.md +12 -12
- {datajoint-2.3.2 → datajoint-2.3.3}/PKG-INFO +3 -3
- {datajoint-2.3.2 → datajoint-2.3.3}/README.md +1 -1
- datajoint-2.3.3/images/pipeline.svg +165 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/_version.py +2 -2
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/adapters/base.py +51 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/adapters/postgres.py +16 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/builtin_codecs/schema.py +13 -3
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/declare.py +109 -10
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/diagram.py +427 -165
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/heading.py +5 -1
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/migrate.py +28 -9
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/settings.py +20 -5
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/storage.py +42 -20
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/table.py +60 -6
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_declare.py +88 -0
- datajoint-2.3.2/tests/integration/test_erd.py → datajoint-2.3.3/tests/integration/test_diagram.py +23 -9
- datajoint-2.3.3/tests/integration/test_diagram_bundle_edge.py +211 -0
- datajoint-2.3.3/tests/integration/test_diagram_edge_weight.py +125 -0
- datajoint-2.3.3/tests/integration/test_diagram_nocontext.py +54 -0
- datajoint-2.3.3/tests/integration/test_diagram_style.py +197 -0
- datajoint-2.3.3/tests/integration/test_fk_index.py +170 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_multi_backend.py +85 -0
- datajoint-2.3.3/tests/unit/test_ddl_substitution.py +16 -0
- datajoint-2.3.3/tests/unit/test_gc.py +35 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_settings.py +31 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_storage_adapter.py +84 -1
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_storage_urls.py +15 -0
- datajoint-2.3.3/tests/unit/test_type_patterns.py +160 -0
- datajoint-2.3.2/images/pipeline.png +0 -0
- datajoint-2.3.2/images/pipeline.svg +0 -118
- {datajoint-2.3.2 → datajoint-2.3.3}/.coveragerc +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.dockerignore +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.gitattributes +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.github/DISCUSSION_TEMPLATE/rfc.yml +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.github/ISSUE_TEMPLATE/improvement_request.md +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.github/dependabot.yml +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.github/release_drafter.yaml +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.github/workflows/close_inactive_issues_prs.yaml +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.github/workflows/draft_release.yaml +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.github/workflows/lint.yaml +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.github/workflows/post_draft_release_published.yaml +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.gitignore +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/.pre-commit-config.yaml +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/CHANGELOG-archive.md +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/Dockerfile +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/LICENSE +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/RELEASE_MEMO.md +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/activate.sh +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/docker-compose.yaml +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/pixi.lock +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/pyproject.toml +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/__init__.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/adapters/__init__.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/adapters/mysql.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/autopopulate.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/blob.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/builtin_codecs/__init__.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/builtin_codecs/attach.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/builtin_codecs/blob.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/builtin_codecs/filepath.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/builtin_codecs/hash.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/builtin_codecs/npy.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/builtin_codecs/object.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/cli.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/codecs.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/condition.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/connection.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/dependencies.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/deploy.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/errors.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/expression.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/gc.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/hash_registry.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/instance.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/jobs.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/lineage.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/logging.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/objectref.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/preview.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/schemas.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/spark.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/staged_insert.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/storage_adapter.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/types.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/user_tables.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/utils.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/src/datajoint/version.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/__init__.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/conftest.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/__init__.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/data/Course.csv +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/data/CurrentTerm.csv +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/data/Department.csv +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/data/Enroll.csv +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/data/Grade.csv +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/data/Section.csv +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/data/Student.csv +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/data/StudentMajor.csv +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/data/Term.csv +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_aggr_regressions.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_alter.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_attach.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_autopopulate.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_blob.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_blob_matlab.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_cascade_delete.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_cascade_integrity.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_cascading_delete.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_cli.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_codec_chaining.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_codecs.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_connection.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_dependencies.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_fetch.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_fetch_same.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_foreign_keys.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_gc.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_groupby.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_hash_storage.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_hidden_job_metadata.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_insert.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_jobs.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_json.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_nan.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_npy_codec.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_object.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_privileges.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_reconnection.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_relation.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_relation_u.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_relational_operand.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_schema.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_schema_keywords.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_semantic_matching.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_skip_duplicates.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_tls.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_trace.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_type_aliases.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_university.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_update1.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_utils.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_uuid.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/integration/test_virtual_module.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema_advanced.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema_aggr_regress.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema_alter.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema_codecs.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema_external.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema_object.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema_privileges.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema_simple.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema_type_aliases.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema_university.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/schema_uuid.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/test_package.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/__init__.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_adapters.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_codecs.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_condition.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_connection_warning.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_declare_hidden_attribute.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_deploy.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_fetch_compat.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_lazy_imports.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_logging.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_pk_rules.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_spark.py +0 -0
- {datajoint-2.3.2 → datajoint-2.3.3}/tests/unit/test_thread_safe.py +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
|
|
@@ -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
|
|
45
|
-
pixi run test-cov
|
|
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
|
|
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.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: datajoint
|
|
3
|
-
Version: 2.3.
|
|
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
|
-

|
|
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
|
-

|
|
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
|
|
|
@@ -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">-> AverageFrame</text>
|
|
121
|
+
<text x="648" y="176" fill="#22863a">-> 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">-> 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 : <blob@></text>
|
|
132
|
+
<text x="686" y="407" fill="#22863a">trace : <blob@></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 & key).fetch1(<tspan fill="#22863a">'frame'</tspan>)</text>
|
|
137
|
+
<text x="686" y="512">params = (SegmentationParams & 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>
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.3.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 3,
|
|
21
|
+
__version__ = version = '2.3.3'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 3, 3)
|
|
23
23
|
|
|
24
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
|
# =========================================================================
|
|
@@ -28,6 +28,11 @@ class SchemaCodec(Codec, register=False):
|
|
|
28
28
|
- ``_build_path()``: Construct storage path from context
|
|
29
29
|
- ``_get_backend()``: Get storage backend by name
|
|
30
30
|
|
|
31
|
+
Both helpers take a ``config`` and fall back to the global ``dj.config``
|
|
32
|
+
without one. Read it off ``key["_config"]`` and pass it through, as below: it
|
|
33
|
+
is the calling connection's config, and in a process holding connections for
|
|
34
|
+
several users the global one belongs to none of them.
|
|
35
|
+
|
|
31
36
|
Comparison with Hash-addressed:
|
|
32
37
|
- **Schema-addressed** (this): Path from schema structure, no dedup
|
|
33
38
|
- **Hash-addressed**: Path from content hash, automatic dedup
|
|
@@ -39,13 +44,18 @@ class SchemaCodec(Codec, register=False):
|
|
|
39
44
|
|
|
40
45
|
def encode(self, value, *, key=None, store_name=None):
|
|
41
46
|
schema, table, field, pk = self._extract_context(key)
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
config = (key or {}).get("_config")
|
|
48
|
+
path, _ = self._build_path(
|
|
49
|
+
schema, table, field, pk, ext=".dat",
|
|
50
|
+
store_name=store_name, config=config,
|
|
51
|
+
)
|
|
52
|
+
backend = self._get_backend(store_name, config=config)
|
|
44
53
|
backend.put_buffer(serialize(value), path)
|
|
45
54
|
return {"path": path, "store": store_name, ...}
|
|
46
55
|
|
|
47
56
|
def decode(self, stored, *, key=None):
|
|
48
|
-
|
|
57
|
+
config = (key or {}).get("_config")
|
|
58
|
+
backend = self._get_backend(stored.get("store"), config=config)
|
|
49
59
|
return MyRef(stored, backend)
|
|
50
60
|
|
|
51
61
|
See Also
|