datajoint 2.2.2__tar.gz → 2.2.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.
- {datajoint-2.2.2 → datajoint-2.2.4}/.pre-commit-config.yaml +0 -1
- {datajoint-2.2.2 → datajoint-2.2.4}/PKG-INFO +4 -3
- {datajoint-2.2.2 → datajoint-2.2.4}/README.md +2 -2
- datajoint-2.2.4/images/pipeline.png +0 -0
- datajoint-2.2.4/images/pipeline.svg +118 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/pyproject.toml +1 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/__init__.py +4 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/codecs.py +56 -41
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/migrate.py +4 -4
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/settings.py +78 -31
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/storage_adapter.py +3 -10
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/version.py +1 -1
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_settings.py +119 -0
- datajoint-2.2.2/.devcontainer/Dockerfile +0 -14
- datajoint-2.2.2/.devcontainer/devcontainer.json +0 -6
- datajoint-2.2.2/.devcontainer/docker-compose.yml +0 -14
- datajoint-2.2.2/.vscode/launch.json +0 -16
- datajoint-2.2.2/images/pipeline.drawio +0 -1
- datajoint-2.2.2/images/pipeline.png +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.coveragerc +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.dockerignore +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.gitattributes +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.github/DISCUSSION_TEMPLATE/rfc.yml +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.github/ISSUE_TEMPLATE/improvement_request.md +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.github/dependabot.yml +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.github/release_drafter.yaml +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.github/workflows/close_inactive_issues_prs.yaml +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.github/workflows/draft_release.yaml +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.github/workflows/lint.yaml +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.github/workflows/post_draft_release_published.yaml +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.github/workflows/test.yaml +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/.gitignore +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/CHANGELOG-archive.md +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/CONTRIBUTING.md +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/Dockerfile +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/LICENSE +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/RELEASE_MEMO.md +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/activate.sh +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/docker-compose.yaml +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/pixi.lock +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/adapters/__init__.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/adapters/base.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/adapters/mysql.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/adapters/postgres.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/autopopulate.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/blob.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/builtin_codecs/__init__.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/builtin_codecs/attach.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/builtin_codecs/blob.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/builtin_codecs/filepath.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/builtin_codecs/hash.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/builtin_codecs/npy.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/builtin_codecs/object.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/builtin_codecs/schema.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/cli.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/condition.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/connection.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/declare.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/dependencies.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/diagram.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/errors.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/expression.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/gc.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/hash_registry.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/heading.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/instance.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/jobs.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/lineage.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/logging.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/objectref.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/preview.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/schemas.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/staged_insert.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/storage.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/table.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/types.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/user_tables.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/src/datajoint/utils.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/__init__.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/conftest.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/__init__.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/data/Course.csv +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/data/CurrentTerm.csv +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/data/Department.csv +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/data/Enroll.csv +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/data/Grade.csv +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/data/Section.csv +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/data/Student.csv +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/data/StudentMajor.csv +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/data/Term.csv +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_aggr_regressions.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_alter.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_attach.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_autopopulate.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_blob.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_blob_matlab.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_cascade_delete.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_cascading_delete.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_cli.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_codec_chaining.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_codecs.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_connection.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_declare.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_dependencies.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_erd.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_fetch.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_fetch_same.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_foreign_keys.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_gc.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_groupby.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_hash_storage.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_hidden_job_metadata.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_insert.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_jobs.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_json.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_multi_backend.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_nan.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_npy_codec.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_object.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_privileges.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_reconnection.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_relation.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_relation_u.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_relational_operand.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_schema.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_schema_keywords.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_semantic_matching.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_skip_duplicates.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_tls.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_type_aliases.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_university.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_update1.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_utils.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_uuid.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/integration/test_virtual_module.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema_advanced.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema_aggr_regress.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema_alter.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema_codecs.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema_external.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema_object.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema_privileges.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema_simple.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema_type_aliases.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema_university.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/schema_uuid.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/test_package.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/__init__.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_adapters.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_codecs.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_condition.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_connection_warning.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_declare_hidden_attribute.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_fetch_compat.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_lazy_imports.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_pk_rules.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_storage_adapter.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_storage_urls.py +0 -0
- {datajoint-2.2.2 → datajoint-2.2.4}/tests/unit/test_thread_safe.py +0 -0
|
@@ -12,7 +12,6 @@ repos:
|
|
|
12
12
|
- id: check-yaml
|
|
13
13
|
exclude: 'docs/mkdocs.yaml' # exclude mkdocs.yaml since pymdownx.emoji !! usage
|
|
14
14
|
- id: check-json
|
|
15
|
-
exclude: '(.vscode|.devcontainer)' # exclude these since // was used for comments
|
|
16
15
|
- id: check-toml
|
|
17
16
|
- id: check-added-large-files
|
|
18
17
|
- repo: https://github.com/codespell-project/codespell
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datajoint
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.4
|
|
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/
|
|
@@ -216,6 +216,7 @@ Requires-Dist: deepdiff
|
|
|
216
216
|
Requires-Dist: fsspec>=2023.1.0
|
|
217
217
|
Requires-Dist: networkx
|
|
218
218
|
Requires-Dist: numpy
|
|
219
|
+
Requires-Dist: packaging
|
|
219
220
|
Requires-Dist: pandas
|
|
220
221
|
Requires-Dist: pydantic-settings>=2.0.0
|
|
221
222
|
Requires-Dist: pydot
|
|
@@ -330,9 +331,9 @@ conda install -c conda-forge datajoint
|
|
|
330
331
|
|
|
331
332
|
## Example Pipeline
|
|
332
333
|
|
|
333
|
-

|
|
334
335
|
|
|
335
|
-
[Yatsenko et al.,
|
|
336
|
+
**Cite DataJoint:** [Yatsenko et al., 2026](https://arxiv.org/abs/2602.16585) — RRID: [SCR_014543](https://scicrunch.org/resolver/SCR_014543)
|
|
336
337
|
|
|
337
338
|
## Resources
|
|
338
339
|
|
|
@@ -69,9 +69,9 @@ conda install -c conda-forge datajoint
|
|
|
69
69
|
|
|
70
70
|
## Example Pipeline
|
|
71
71
|
|
|
72
|
-

|
|
73
73
|
|
|
74
|
-
[Yatsenko et al.,
|
|
74
|
+
**Cite DataJoint:** [Yatsenko et al., 2026](https://arxiv.org/abs/2602.16585) — RRID: [SCR_014543](https://scicrunch.org/resolver/SCR_014543)
|
|
75
75
|
|
|
76
76
|
## Resources
|
|
77
77
|
|
|
Binary file
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1500 540"
|
|
2
|
+
font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif"
|
|
3
|
+
font-size="22">
|
|
4
|
+
<defs>
|
|
5
|
+
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5"
|
|
6
|
+
markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
|
7
|
+
<path d="M0,0 L10,5 L0,10 z" fill="#666"/>
|
|
8
|
+
</marker>
|
|
9
|
+
</defs>
|
|
10
|
+
|
|
11
|
+
<!-- Opaque white background — keeps the whole illustration legible
|
|
12
|
+
on any page theme (e.g. GitHub dark-mode README rendering). -->
|
|
13
|
+
<rect width="100%" height="100%" fill="white"/>
|
|
14
|
+
|
|
15
|
+
<!-- ============ LEFT PANEL: Pipeline diagram ============ -->
|
|
16
|
+
|
|
17
|
+
<!-- Edges -->
|
|
18
|
+
<g stroke="#666" stroke-width="1.6" fill="none">
|
|
19
|
+
<line x1="200" y1="90" x2="200" y2="118" marker-end="url(#arrow)"/>
|
|
20
|
+
<line x1="200" y1="160" x2="200" y2="188" marker-end="url(#arrow)"/>
|
|
21
|
+
<line x1="200" y1="230" x2="200" y2="259" marker-end="url(#arrow)"/>
|
|
22
|
+
<line x1="215" y1="316" x2="232" y2="352" marker-end="url(#arrow)"/>
|
|
23
|
+
<line x1="320" y1="310" x2="294" y2="358" marker-end="url(#arrow)"/>
|
|
24
|
+
<line x1="250" y1="410" x2="250" y2="441" marker-end="url(#arrow)"/>
|
|
25
|
+
</g>
|
|
26
|
+
|
|
27
|
+
<!-- Manual: Subject -->
|
|
28
|
+
<rect x="135" y="50" width="130" height="40" rx="3"
|
|
29
|
+
fill="#7eca9c" stroke="none"/>
|
|
30
|
+
<text x="200" y="78" text-anchor="middle" fill="#1a1a1a" font-weight="500">Subject</text>
|
|
31
|
+
|
|
32
|
+
<!-- Manual: Session -->
|
|
33
|
+
<rect x="135" y="120" width="130" height="40" rx="3"
|
|
34
|
+
fill="#7eca9c" stroke="none"/>
|
|
35
|
+
<text x="200" y="148" text-anchor="middle" fill="#1a1a1a" font-weight="500">Session</text>
|
|
36
|
+
|
|
37
|
+
<!-- Manual: Scan -->
|
|
38
|
+
<rect x="135" y="190" width="130" height="40" rx="3"
|
|
39
|
+
fill="#7eca9c" stroke="none"/>
|
|
40
|
+
<text x="200" y="218" text-anchor="middle" fill="#1a1a1a" font-weight="500">Scan</text>
|
|
41
|
+
|
|
42
|
+
<!-- Imported: AverageFrame -->
|
|
43
|
+
<ellipse cx="200" cy="290" rx="90" ry="28"
|
|
44
|
+
fill="#7eb6ca" stroke="none"/>
|
|
45
|
+
<text x="200" y="298" text-anchor="middle" fill="#1a1a1a" font-weight="500">AverageFrame</text>
|
|
46
|
+
|
|
47
|
+
<!-- Lookup: SegmentationParams -->
|
|
48
|
+
<rect x="320" y="270" width="220" height="40" rx="3"
|
|
49
|
+
fill="#e8e8e8" stroke="none"/>
|
|
50
|
+
<text x="430" y="298" text-anchor="middle" fill="#1a1a1a" font-weight="500">SegmentationParams</text>
|
|
51
|
+
|
|
52
|
+
<!-- Computed: Segmentation (highlighted — origin of zoom callout) -->
|
|
53
|
+
<ellipse cx="250" cy="380" rx="100" ry="30"
|
|
54
|
+
fill="#ca7e7e" stroke="none"/>
|
|
55
|
+
<text x="250" y="388" text-anchor="middle" fill="#1a1a1a" font-weight="600">Segmentation</text>
|
|
56
|
+
|
|
57
|
+
<!-- Computed: Activity -->
|
|
58
|
+
<ellipse cx="250" cy="470" rx="74" ry="26"
|
|
59
|
+
fill="#ca7e7e" stroke="none"/>
|
|
60
|
+
<text x="250" y="478" text-anchor="middle" fill="#1a1a1a" font-weight="500">Activity</text>
|
|
61
|
+
|
|
62
|
+
<!-- ============ Zoom-in callout ============ -->
|
|
63
|
+
<g stroke="#999" stroke-width="1" stroke-dasharray="5,4" fill="none">
|
|
64
|
+
<line x1="340" y1="358" x2="580" y2="80"/>
|
|
65
|
+
<line x1="340" y1="402" x2="580" y2="470"/>
|
|
66
|
+
</g>
|
|
67
|
+
|
|
68
|
+
<!-- ============ RIGHT PANEL: Code snippet ============ -->
|
|
69
|
+
<!-- Indentation handled via per-line x offsets:
|
|
70
|
+
level 0 (no indent): x = 600
|
|
71
|
+
level 1 (4 spaces): x = 643
|
|
72
|
+
level 2 (8 spaces): x = 686
|
|
73
|
+
Char width @ 18px monospace ≈ 10.8 -->
|
|
74
|
+
|
|
75
|
+
<rect x="580" y="80" width="660" height="390" rx="4"
|
|
76
|
+
fill="white" stroke="#d0d0d0" stroke-width="1"/>
|
|
77
|
+
|
|
78
|
+
<g font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
79
|
+
font-size="18" fill="#24292e">
|
|
80
|
+
<text x="600" y="112"><tspan fill="#005cc5">@schema</tspan></text>
|
|
81
|
+
<text x="600" y="136"><tspan fill="#005cc5">class</tspan> <tspan fill="#6f42c1" font-weight="600">Segmentation</tspan>(dj.Computed):</text>
|
|
82
|
+
<text x="643" y="160">definition = <tspan fill="#22863a">"""</tspan></text>
|
|
83
|
+
<text x="643" y="184" fill="#22863a">-> AverageFrame</text>
|
|
84
|
+
<text x="643" y="208" fill="#22863a">-> SegmentationParams</text>
|
|
85
|
+
<text x="643" y="232" fill="#22863a">---</text>
|
|
86
|
+
<text x="643" y="256" fill="#22863a">num_cells<tspan dx="11">: int32</tspan></text>
|
|
87
|
+
<text x="643" y="280" fill="#22863a">cell_masks : <blob@></text>
|
|
88
|
+
<text x="643" y="304" fill="#22863a">"""</text>
|
|
89
|
+
<text x="643" y="352"><tspan fill="#005cc5">def</tspan> <tspan fill="#6f42c1" font-weight="600">make</tspan>(self, key):</text>
|
|
90
|
+
<text x="686" y="376">frame = (AverageFrame & key).fetch1(<tspan fill="#22863a">'frame'</tspan>)</text>
|
|
91
|
+
<text x="686" y="400">params = (SegmentationParams & key).fetch1()</text>
|
|
92
|
+
<text x="686" y="424">masks, n = segment(frame, **params)</text>
|
|
93
|
+
<text x="686" y="448">self.insert1(dict(key, num_cells=n, cell_masks=masks))</text>
|
|
94
|
+
</g>
|
|
95
|
+
|
|
96
|
+
<!-- ============ Annotations ============ -->
|
|
97
|
+
<g font-style="italic" fill="#5a5a5a" font-size="19">
|
|
98
|
+
<text x="1260" y="112">database link</text>
|
|
99
|
+
<line x1="1255" y1="107" x2="690" y2="107"
|
|
100
|
+
stroke="#bbb" stroke-width="0.7" stroke-dasharray="3,3"/>
|
|
101
|
+
|
|
102
|
+
<text x="1260" y="136">table name</text>
|
|
103
|
+
<line x1="1255" y1="131" x2="855" y2="131"
|
|
104
|
+
stroke="#bbb" stroke-width="0.7" stroke-dasharray="3,3"/>
|
|
105
|
+
|
|
106
|
+
<text x="1260" y="208">dependency</text>
|
|
107
|
+
<line x1="1255" y1="203" x2="850" y2="203"
|
|
108
|
+
stroke="#bbb" stroke-width="0.7" stroke-dasharray="3,3"/>
|
|
109
|
+
|
|
110
|
+
<text x="1260" y="280">object-store attribute</text>
|
|
111
|
+
<line x1="1255" y1="275" x2="900" y2="275"
|
|
112
|
+
stroke="#bbb" stroke-width="0.7" stroke-dasharray="3,3"/>
|
|
113
|
+
|
|
114
|
+
<text x="1260" y="400">computation</text>
|
|
115
|
+
<line x1="1255" y1="395" x2="970" y2="395"
|
|
116
|
+
stroke="#bbb" stroke-width="0.7" stroke-dasharray="3,3"/>
|
|
117
|
+
</g>
|
|
118
|
+
</svg>
|
|
@@ -51,6 +51,9 @@ __all__ = [
|
|
|
51
51
|
"get_codec",
|
|
52
52
|
"ObjectRef",
|
|
53
53
|
"NpyRef",
|
|
54
|
+
# Storage Adapter API
|
|
55
|
+
"StorageAdapter",
|
|
56
|
+
"get_storage_adapter",
|
|
54
57
|
# Other
|
|
55
58
|
"errors",
|
|
56
59
|
"migrate",
|
|
@@ -82,6 +85,7 @@ from .expression import AndList, Not, Top, U
|
|
|
82
85
|
from .instance import Instance, _ConfigProxy, _get_singleton_connection, _global_config, _check_thread_safe
|
|
83
86
|
from .logging import logger
|
|
84
87
|
from .objectref import ObjectRef
|
|
88
|
+
from .storage_adapter import StorageAdapter, get_storage_adapter
|
|
85
89
|
from .schemas import _Schema, VirtualModule, list_schemas, virtual_schema
|
|
86
90
|
from .autopopulate import AutoPopulate
|
|
87
91
|
from .jobs import Job
|
|
@@ -8,29 +8,32 @@ semantics for complex Python objects.
|
|
|
8
8
|
Codecs auto-register when subclassed - no decorator needed (Python 3.10+).
|
|
9
9
|
|
|
10
10
|
Example:
|
|
11
|
-
class GraphCodec(dj.Codec):
|
|
12
|
-
name = "graph"
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
```python
|
|
13
|
+
class GraphCodec(dj.Codec):
|
|
14
|
+
name = "graph"
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
def get_dtype(self, is_store: bool) -> str:
|
|
17
|
+
return "<blob>"
|
|
18
|
+
|
|
19
|
+
def encode(self, graph, *, key=None, store_name=None):
|
|
20
|
+
return {'nodes': list(graph.nodes()), 'edges': list(graph.edges())}
|
|
21
|
+
|
|
22
|
+
def decode(self, stored, *, key=None):
|
|
23
|
+
import networkx as nx
|
|
24
|
+
G = nx.Graph()
|
|
25
|
+
G.add_nodes_from(stored['nodes'])
|
|
26
|
+
G.add_edges_from(stored['edges'])
|
|
27
|
+
return G
|
|
28
|
+
|
|
29
|
+
# Then use in table definitions:
|
|
30
|
+
class MyTable(dj.Manual):
|
|
31
|
+
definition = '''
|
|
32
|
+
id : uint16
|
|
33
|
+
---
|
|
34
|
+
data : <graph>
|
|
35
|
+
'''
|
|
36
|
+
```
|
|
34
37
|
"""
|
|
35
38
|
|
|
36
39
|
from __future__ import annotations
|
|
@@ -85,20 +88,24 @@ class Codec(ABC):
|
|
|
85
88
|
... G.add_edges_from(stored['edges'])
|
|
86
89
|
... return G
|
|
87
90
|
|
|
88
|
-
Use in table definitions
|
|
91
|
+
Use in table definitions:
|
|
89
92
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
```python
|
|
94
|
+
class Connectivity(dj.Manual):
|
|
95
|
+
definition = '''
|
|
96
|
+
id : uint16
|
|
97
|
+
---
|
|
98
|
+
graph_data : <graph>
|
|
99
|
+
'''
|
|
100
|
+
```
|
|
96
101
|
|
|
97
|
-
Skip auto-registration for abstract base classes
|
|
102
|
+
Skip auto-registration for abstract base classes:
|
|
98
103
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
```python
|
|
105
|
+
class ExternalOnlyCodec(dj.Codec, register=False):
|
|
106
|
+
'''Abstract base - not registered.'''
|
|
107
|
+
...
|
|
108
|
+
```
|
|
102
109
|
"""
|
|
103
110
|
|
|
104
111
|
name: str | None = None # Must be set by concrete subclasses
|
|
@@ -520,18 +527,26 @@ def decode_attribute(attr, data, squeeze: bool = False, connection=None):
|
|
|
520
527
|
Decode raw database value using attribute's codec or native type handling.
|
|
521
528
|
|
|
522
529
|
This is the central decode function used by all fetch methods. It handles:
|
|
523
|
-
|
|
530
|
+
|
|
531
|
+
- Codec chains (e.g., ``<blob@store>`` → ``<hash>`` → ``bytes``)
|
|
524
532
|
- Native type conversions (JSON, UUID)
|
|
525
|
-
- Object storage downloads (via config["download_path"])
|
|
533
|
+
- Object storage downloads (via ``config["download_path"]``)
|
|
526
534
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
535
|
+
Parameters
|
|
536
|
+
----------
|
|
537
|
+
attr : Attribute
|
|
538
|
+
Attribute from the table's heading.
|
|
539
|
+
data : any
|
|
540
|
+
Raw value fetched from the database.
|
|
541
|
+
squeeze : bool, optional
|
|
542
|
+
If True, remove singleton dimensions from numpy arrays.
|
|
543
|
+
connection : Connection, optional
|
|
544
|
+
Connection instance for config access. If provided,
|
|
545
|
+
``connection._config`` is passed to codecs via the key dict.
|
|
533
546
|
|
|
534
|
-
Returns
|
|
547
|
+
Returns
|
|
548
|
+
-------
|
|
549
|
+
any
|
|
535
550
|
Decoded Python value.
|
|
536
551
|
"""
|
|
537
552
|
import json
|
|
@@ -7,8 +7,8 @@ explicit `<blob>` type declarations.
|
|
|
7
7
|
|
|
8
8
|
.. note::
|
|
9
9
|
This module is provided temporarily to assist with migration from pre-2.0.
|
|
10
|
-
It
|
|
11
|
-
Complete your migrations while on DataJoint 2.
|
|
10
|
+
It is scheduled for removal in DataJoint 2.4 or 2.5.
|
|
11
|
+
Complete your migrations while on DataJoint 2.3 or earlier.
|
|
12
12
|
|
|
13
13
|
Note on Terminology
|
|
14
14
|
-------------------
|
|
@@ -32,8 +32,8 @@ from .version import __version__
|
|
|
32
32
|
# Show deprecation warning starting in 2.1
|
|
33
33
|
if Version(__version__) >= Version("2.1"):
|
|
34
34
|
warnings.warn(
|
|
35
|
-
"datajoint.migrate is deprecated and
|
|
36
|
-
"Complete your schema migrations
|
|
35
|
+
"datajoint.migrate is deprecated and is scheduled for removal in DataJoint 2.4 or 2.5. "
|
|
36
|
+
"Complete your schema migrations while on DataJoint 2.3 or earlier.",
|
|
37
37
|
DeprecationWarning,
|
|
38
38
|
stacklevel=2,
|
|
39
39
|
)
|
|
@@ -335,17 +335,32 @@ class Config(BaseSettings):
|
|
|
335
335
|
jobs: JobsSettings = Field(default_factory=JobsSettings)
|
|
336
336
|
|
|
337
337
|
# Unified stores configuration (replaces external and object_storage)
|
|
338
|
+
# ``validation_alias`` redirects pydantic-settings' env source away from the
|
|
339
|
+
# natural ``DJ_STORES`` so it doesn't auto-parse on Config() construction.
|
|
340
|
+
# ``DJ_STORES`` is handled by ``_apply_stores_env`` after the config file
|
|
341
|
+
# load so env-var precedence is honored. *New in 2.2.3.*
|
|
338
342
|
stores: dict[str, Any] = Field(
|
|
339
343
|
default_factory=dict,
|
|
344
|
+
validation_alias="_DJ_STORES_PYDANTIC_DISABLED",
|
|
340
345
|
description="Unified object storage configuration. "
|
|
341
346
|
"Use stores.default to designate default store. "
|
|
342
|
-
"Configure named stores as stores.<name>.protocol, stores.<name>.location, etc."
|
|
347
|
+
"Configure named stores as stores.<name>.protocol, stores.<name>.location, etc. "
|
|
348
|
+
"Set via DJ_STORES (JSON object) or in datajoint.json. *New in 2.2.3* for "
|
|
349
|
+
"DJ_STORES env-var support.",
|
|
343
350
|
)
|
|
344
351
|
|
|
345
352
|
# Top-level settings
|
|
346
353
|
loglevel: Literal["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] = Field(default="INFO", validation_alias="DJ_LOG_LEVEL")
|
|
347
354
|
safemode: bool = True
|
|
348
355
|
|
|
356
|
+
ignore_config_file: bool = Field(
|
|
357
|
+
default=False,
|
|
358
|
+
validation_alias="DJ_IGNORE_CONFIG_FILE",
|
|
359
|
+
description="If True, skip loading datajoint.json and the secrets directory. "
|
|
360
|
+
"Intended for env-var-only deployments (e.g. the DataJoint platform). "
|
|
361
|
+
"*New in 2.2.3.*",
|
|
362
|
+
)
|
|
363
|
+
|
|
349
364
|
# Cache path for query results
|
|
350
365
|
query_cache: Path | None = None
|
|
351
366
|
|
|
@@ -691,26 +706,50 @@ class Config(BaseSettings):
|
|
|
691
706
|
self.database.password = db_password
|
|
692
707
|
logger.debug(f"Loaded database.password from {secrets_dir}")
|
|
693
708
|
|
|
694
|
-
# Load per-store secrets
|
|
695
|
-
#
|
|
709
|
+
# Load per-store secrets from any stores.<name>.<attr> file.
|
|
710
|
+
# The attr name is recorded as-is on stores.<name>; this lets
|
|
711
|
+
# plugin-registered adapters define their own secret fields
|
|
712
|
+
# (e.g. a Bearer ``token`` for HTTP-based protocols) without
|
|
713
|
+
# forcing AWS-style ``access_key`` / ``secret_key`` naming.
|
|
696
714
|
if secrets_dir.is_dir():
|
|
697
715
|
for secret_file in secrets_dir.iterdir():
|
|
698
716
|
if not secret_file.is_file() or secret_file.name.startswith("."):
|
|
699
717
|
continue
|
|
700
718
|
|
|
701
719
|
parts = secret_file.name.split(".")
|
|
702
|
-
# Check for stores.<name>.access_key or stores.<name>.secret_key pattern
|
|
703
720
|
if len(parts) == 3 and parts[0] == "stores":
|
|
704
721
|
store_name, attr = parts[1], parts[2]
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
722
|
+
value = secret_file.read_text().strip()
|
|
723
|
+
# Initialize store dict if needed
|
|
724
|
+
if store_name not in self.stores:
|
|
725
|
+
self.stores[store_name] = {}
|
|
726
|
+
# Only set if not already present (config / env vars win)
|
|
727
|
+
if attr not in self.stores[store_name]:
|
|
728
|
+
self.stores[store_name][attr] = value
|
|
729
|
+
logger.debug(f"Loaded stores.{store_name}.{attr} from {secrets_dir}")
|
|
730
|
+
|
|
731
|
+
def _apply_stores_env(self) -> None:
|
|
732
|
+
"""Replace ``self.stores`` from the ``DJ_STORES`` env var if set.
|
|
733
|
+
|
|
734
|
+
``DJ_STORES`` holds a JSON object in the same shape as the ``stores``
|
|
735
|
+
block of ``datajoint.json``. This lets env-var-only deployments
|
|
736
|
+
configure plugin-registered storage adapters with arbitrary attr
|
|
737
|
+
names (e.g. a Bearer ``token`` field) without negotiating an env-var
|
|
738
|
+
naming scheme per attr.
|
|
739
|
+
|
|
740
|
+
*New in 2.2.3.*
|
|
741
|
+
"""
|
|
742
|
+
raw = os.environ.get("DJ_STORES")
|
|
743
|
+
if not raw:
|
|
744
|
+
return
|
|
745
|
+
try:
|
|
746
|
+
data = json.loads(raw)
|
|
747
|
+
except json.JSONDecodeError as e:
|
|
748
|
+
raise ValueError(f"DJ_STORES contains invalid JSON: {e}") from e
|
|
749
|
+
if not isinstance(data, dict):
|
|
750
|
+
raise ValueError(f"DJ_STORES must be a JSON object, got {type(data).__name__}")
|
|
751
|
+
self.stores = data
|
|
752
|
+
logger.debug("Loaded stores from DJ_STORES env var")
|
|
714
753
|
|
|
715
754
|
@contextmanager
|
|
716
755
|
def override(self, **kwargs: Any) -> Iterator["Config"]:
|
|
@@ -785,9 +824,13 @@ class Config(BaseSettings):
|
|
|
785
824
|
|
|
786
825
|
Credentials should NOT be stored in datajoint.json. Instead, use either:
|
|
787
826
|
|
|
788
|
-
- Environment variables (``DJ_USER``, ``DJ_PASS``, ``DJ_HOST``,
|
|
827
|
+
- Environment variables (``DJ_USER``, ``DJ_PASS``, ``DJ_HOST``,
|
|
828
|
+
``DJ_STORES`` for JSON-encoded store configs, etc.)
|
|
789
829
|
- The ``.secrets/`` directory (created alongside datajoint.json)
|
|
790
830
|
|
|
831
|
+
Set ``DJ_IGNORE_CONFIG_FILE=true`` to skip both ``datajoint.json`` and
|
|
832
|
+
the secrets directory entirely (env-var-only configuration).
|
|
833
|
+
|
|
791
834
|
Parameters
|
|
792
835
|
----------
|
|
793
836
|
path : str or Path, optional
|
|
@@ -962,25 +1005,29 @@ def _create_config() -> Config:
|
|
|
962
1005
|
"""Create and initialize the global config instance."""
|
|
963
1006
|
cfg = Config()
|
|
964
1007
|
|
|
965
|
-
|
|
966
|
-
|
|
1008
|
+
config_path: Path | None = None
|
|
1009
|
+
if not cfg.ignore_config_file:
|
|
1010
|
+
config_path = find_config_file()
|
|
1011
|
+
if config_path is not None:
|
|
1012
|
+
try:
|
|
1013
|
+
cfg.load(config_path)
|
|
1014
|
+
except Exception as e:
|
|
1015
|
+
warnings.warn(f"Failed to load config from {config_path}: {e}")
|
|
1016
|
+
else:
|
|
1017
|
+
warnings.warn(
|
|
1018
|
+
f"No {CONFIG_FILENAME} found. Using defaults and environment variables. "
|
|
1019
|
+
f"Run `dj.config.save_template()` to create a template configuration.",
|
|
1020
|
+
stacklevel=2,
|
|
1021
|
+
)
|
|
967
1022
|
|
|
968
|
-
if
|
|
969
|
-
|
|
970
|
-
cfg.load(config_path)
|
|
971
|
-
except Exception as e:
|
|
972
|
-
warnings.warn(f"Failed to load config from {config_path}: {e}")
|
|
973
|
-
else:
|
|
974
|
-
warnings.warn(
|
|
975
|
-
f"No {CONFIG_FILENAME} found. Using defaults and environment variables. "
|
|
976
|
-
f"Run `dj.config.save_template()` to create a template configuration.",
|
|
977
|
-
stacklevel=2,
|
|
978
|
-
)
|
|
1023
|
+
# DJ_STORES (if set) overrides the stores dict from the config file
|
|
1024
|
+
cfg._apply_stores_env()
|
|
979
1025
|
|
|
980
|
-
#
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1026
|
+
# Secrets fill missing attrs in whatever ended up in self.stores
|
|
1027
|
+
if not cfg.ignore_config_file:
|
|
1028
|
+
secrets_dir = find_secrets_dir(config_path)
|
|
1029
|
+
if secrets_dir is not None:
|
|
1030
|
+
cfg._load_secrets(secrets_dir)
|
|
984
1031
|
|
|
985
1032
|
# Set initial log level
|
|
986
1033
|
logger.setLevel(cfg.loglevel)
|
|
@@ -86,16 +86,9 @@ def get_storage_adapter(protocol: str) -> StorageAdapter | None:
|
|
|
86
86
|
|
|
87
87
|
def _discover_adapters() -> None:
|
|
88
88
|
"""Load storage adapters from datajoint.storage entry points."""
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
logger.debug("importlib.metadata not available, skipping adapter discovery")
|
|
93
|
-
return
|
|
94
|
-
|
|
95
|
-
try:
|
|
96
|
-
eps = entry_points(group="datajoint.storage")
|
|
97
|
-
except TypeError:
|
|
98
|
-
eps = entry_points().get("datajoint.storage", [])
|
|
89
|
+
from importlib.metadata import entry_points
|
|
90
|
+
|
|
91
|
+
eps = entry_points(group="datajoint.storage")
|
|
99
92
|
|
|
100
93
|
for ep in eps:
|
|
101
94
|
if ep.name in _adapter_registry:
|