Skip to content

Releases: datajoint/datajoint-python

Release 2.2.4

05 Jun 19:07
fedd2ea

Choose a tag to compare

Highlights

A small follow-up patch on 2.2.3 cleaning up rough edges discovered during the docs review:

  • dj.StorageAdapter and dj.get_storage_adapter() exposed at top level. The Storage Adapter plugin contract documented in the spec used these names as if they were re-exported from the top-level datajoint namespace, but they were not. Plugin authors following the spec literally hit AttributeError. Both symbols are now in datajoint.__all__ and importable as dj.StorageAdapter / dj.get_storage_adapter.
  • packaging declared as an explicit dependency. src/datajoint/migrate.py imports packaging.version.Version, but the package was never declared in pyproject.toml. With Python 3.12 venvs no longer shipping setuptools (which used to pull packaging transitively), pip install datajoint==2.2.3 into a clean Py3.12 venv hit ModuleNotFoundError: No module named 'packaging' on import datajoint. Fixed.
  • Source-side version markers refreshed in settings.py docstrings and comments to match the public docs.

⚡️ Enhancements

🐛 Bug Fixes

📝 Documentation

Companion docs: datajoint/datajoint-docs#172 — env-var configuration of stores + Storage Adapter API spec.

Full Changelog: v2.2.3...v2.2.4

Release 2.2.3

05 Jun 14:46
7e609a6

Choose a tag to compare

Highlights

This patch release adds env-var configuration for object stores (closes the gap for env-var-only deployments such as the DataJoint platform, Kubernetes, and Lambda) and ships several minor fixes and documentation improvements.

  • DJ_STORES — JSON-encoded copy of the stores dict, same shape as in datajoint.json. Replaces the file's stores block when set, with arbitrary adapter-defined attribute names (token, api_key, workspace_url…).
  • DJ_IGNORE_CONFIG_FILE (default false) — when true, skips datajoint.json, the project .secrets/, and /run/secrets/datajoint/ entirely. Hard guarantee that no file on disk leaks into config.
  • .secrets/stores.<name>.<attr> now accepts any attribute, not only access_key / secret_key — supports plugin-registered adapters (e.g. Databricks Unity Catalog Volumes) with non-S3-style credential fields.

Precedence (high → low): programmatic dj.config["stores"] > DJ_STORES > datajoint.json > .secrets/stores.<name>.<attr> (fills missing attrs only).

⚡️ Enhancements

📝 Documentation

Companion docs: datajoint/datajoint-docs#172

Full Changelog: v2.2.2...v2.2.3

Release 2.2.2

01 May 18:37
53dd595

Choose a tag to compare

⚡️ Enhancements

🐛 Bug Fixes

Full Changelog: v2.2.1...v2.2.2

Release 2.2.1

09 Apr 14:19
7e825eb

Choose a tag to compare

Released: 2026-04-09

⚡️ Enhancements

  • feat: add database.name setting for PostgreSQL connections (#1426) @kushalbakshi
    • Configurable database name via dj.config["database.name"], DJ_DATABASE_NAME env var, or database_name kwarg on Connection
    • Extracts _build_connect_kwargs() helper to eliminate duplicated connection parameter construction
    • __repr__ and logger show database name when set (e.g., user@host:5432/my_db)
    • Warns when database.name is set with MySQL backend
    • Deprecates database_prefix (warning emitted at Schema.activate())

📝 Documentation

Full Changelog: v2.2.0...v2.2.1

v2.2.0

01 Apr 15:51
865bd29

Choose a tag to compare

What's Changed

For a comprehensive overview of all new features, see What's New in DataJoint 2.2.

Added

  • Graph-driven cascade delete and restrict on Diagram (#1407, fixes #865, #1110): New Diagram.cascade(), Diagram.restrict(), Diagram.prune(), and Diagram.counts() methods replace the error-driven cascade approach. Delete and drop operations now use the pipeline DAG to determine affected tables before executing, with full dry-run support via safemode=True.
  • Thread-safe mode with dj.Instance (#1404): New dj.Instance() class provides independent database connections with connection-scoped configuration. Enables safe concurrent access from multiple threads (e.g., web servers, parallel workers).
  • Directory references in <filepath@store> (#1415, fixes #1410): Filepath storage now supports directory references. is_dir is detected dynamically; existence checks and storage operations handle directories correctly.

Fixed

  • populate() with reserve_jobs=True ignores restrictions (#1414, fixes #1413): Restrictions are now correctly applied when fetching pending keys in distributed mode, matching the behavior of direct (non-distributed) populate.
  • Populate antijoin uses .proj() for correct pending key computation (#1405): Fixes cases where overlapping secondary attributes caused incorrect pending key calculations.
  • Allow attribute names starting with 'index' in declarations (#1412, fixes #1411): Table definitions with attribute names like index_value no longer raise parse errors.
  • Cascade delete failures on MySQL 8 (fixes #1110): The graph-driven cascade in #1407 eliminates the error code mismatch (1217 vs 1451) that caused cascade delete failures on MySQL 8.

Changed

  • Backend-agnostic quoting and adapter abstractions (#1419): Refactored identifier quoting, table name construction, and schema queries into adapter methods for cleaner multi-backend (MySQL + PostgreSQL) support.
  • skip_duplicates=True behavior documented for PostgreSQL (#1417, fixes #1049): PostgreSQL already enforces secondary unique constraints when skip_duplicates=True (raises DuplicateError on secondary unique conflicts, unlike MySQL which skips silently). This asymmetry is now documented and tested.

Full Changelog: v2.1.1...v2.2.0

v2.1.1

17 Feb 19:54
4a7e1e8

Choose a tag to compare

What's Changed

Bug Fixes

  • Atomic job reservation to prevent race condition (#1399, fixes #1398): Job.reserve() now uses a single atomic UPDATE ... WHERE status='pending' instead of a non-atomic SELECT→UPDATE pattern, preventing multiple workers from reserving the same key.
  • Hide comments from table preview display (#1393): SQL comments in table definitions are no longer shown in .preview() output.
  • Correct Part table names in diagrams (#1392): Part tables now display correctly in diagrams by properly stripping the module prefix.

Removals

  • Remove size_on_disk (#1395): Removed size_on_disk property from Table and Schema classes. Use database-native tools for storage metrics.

Full Changelog: v2.1.0...v2.1.1

v0.14.9

17 Feb 19:40
1e6cc11

Choose a tag to compare

What's Changed

Bug Fix

  • Skip redundant S3 upload when file already exists (#1400, fixes #1397): After a transaction rollback, upload_filepath no longer re-uploads files that already exist in S3 with matching size and contents hash. This avoids unnecessary network transfers and potential timeouts on large files.

Maintenance

  • Pin setuptools<82 for pkg_resources compatibility (#1396, fixes #1394)

Full Changelog: v0.14.8...v0.14.9

Release 2.1.0

05 Feb 21:43
a1ab055

Choose a tag to compare

What's Changed

Added

  • PostgreSQL backend support — DataJoint now supports PostgreSQL as an alternative to MySQL. Use dj.config['database.backend'] = 'postgresql' to connect to PostgreSQL databases. (#1338, #1339, #1340)

  • Diagram improvements (#1345)

    • New collapse() method for high-level pipeline views
    • Mermaid output format support via output='mermaid'
    • Schema grouping with module labels
    • Direction control (direction='LR' or direction='TB')
    • Default diagram direction changed from TB to LR
  • Singleton tables — Support for tables with empty primary keys (#1341)

Changed

  • Performance: Lazy-load deepdiff and tqdm in autopopulate for faster imports (#1349)
  • Packaging: Switched from setuptools to hatchling for build system (#1358)

Deprecated

  • The migrate module shows deprecation warning (#1373)

Fixed

  • Allow table class names with underscores (with warning) (#1375)

Documentation

  • Converted all docstrings to NumPy style (#1378)

Full Changelog: v2.0.2...v2.1.0

DataJoint 2.0.2

05 Feb 18:35
da0cc0c

Choose a tag to compare

Bug Fixes

  • fix: Support 'KEY' in fetch() for backward compatibility (#1384)

    • Restores fetch('KEY') syntax from DataJoint 0.14
    • Fixes #1381
  • fix: Handle inhomogeneous array shapes in to_arrays() (#1382)

    • Correctly handles blob arrays with different shapes
    • Fixes #1380
  • fix: Handle semantic_check for job table operations (#1383)

    • Fixes populate(reserve_jobs=True) when keep_completed=True
    • Fixes #1379
  • fix: Handle missing SSL context in multiprocess populate (#1377)

    • Prevents errors when SSL context is not available in child processes

Installation

pip install datajoint==2.0.2

DataJoint 0.14.8

05 Feb 20:11
60a8f05

Choose a tag to compare

Bug Fixes

  • fix: Add config option to skip filepath checksum on insert (#1387)
    • New filepath_checksum_size_limit_insert config option
    • Prevents transaction timeouts when inserting large files with filepath attributes in three-part make() methods
    • Fixes #1386

Usage

import datajoint as dj

# Skip checksum on insert for files > 1GB
dj.config['filepath_checksum_size_limit_insert'] = 1024 * 1024 * 1024

Installation

pip install datajoint==0.14.8