Rename the table tiers to a consistent axis — `dj.Entry`, `dj.Ingest`, `dj.Compute` (keep `Manual`/`Imported`/`Computed` as permanent aliases)

Đang mở
#1,546 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, sql

Hướng nghiên cứu

Bắt đầu bằng cách xác định các định nghĩa lớp tier và mọi đường dẫn được nêu trong issue: tiền tố tier của SQL, dj.config/Role, lookup_class_name, phát hiện tier, repr/kiểm tra nội quan, thông báo lỗi và nhãn dj.Diagram. Công việc hoàn tất khi Entry/Ingest/Compute có sẵn với hành vi và tiền tố giống hệt các bí danh vĩnh viễn Manual/Imported/Computed, đồng thời các nhãn chuẩn được yêu cầu được xử lý cho 2.4.0.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Full tier rename proposed in datajoint/datajoint-docs#267. Filing the class-name change here; the naming decision itself is settled and is not re-opened by this issue.

Why

The populated tiers sit on inconsistent axes: Manual names the writer, Imported names the origin, Computed names the result. A reader reasoning from the names alone lands in the wrong tier — the classic failure being an Imported table with no make() and a permanent allow_direct_insert=True papering over a real modeling error. Putting every populated tier on one axis — what the table does to get its rows — and naming it with that verb removes the confusion.

The rename

Today New primary name The table's rows…
dj.Manual dj.Entry enter the pipeline from outside (a person, an instrument, an ingestion script) — inserted directly, no make()
dj.Imported dj.Ingest are produced by make() that reads an external source
dj.Computed dj.Compute are produced by make() that derives from other DataJoint tables

dj.Lookup and dj.Part are unchanged.

Compatibility

  • dj.Manual, dj.Imported, and dj.Computed remain permanently as backward-compatible aliases — no deprecation, no migration. Existing pipelines, tutorials, and stored tier prefixes keep working; new material teaches the new names.
  • Verify the SQL tier prefix, dj.config/Role, lookup_class_name, and every tier-detection path treat each alias identically to its new name (same prefix, same reserved status) so the aliases are fully transparent on existing schemas.

Why Compute, not Derive

Derive collides with an entrenched database meaning: a derived table / derived relation is the result of a query (a subquery or view), computed on read and not stored — the opposite of a Compute table, whose rows are materialized by make() and persisted with lineage. Database-literate readers would mis-read Derive as "a view." Compute also aligns with how we frame DataJoint — a computational database. (Full discussion in datajoint-docs#267.)

Naming-form note

Entry is a noun; Ingest/Compute are verbs. Python class names read as nouns (class TuningCurve(dj.Compute):), so the verb tiers carry a short adoption cost — an ergonomics tradeoff, not a correctness objection (raised by @gtouloumes in #267). Worth reinforcing the new names consistently across the docs when adopted.

Rollout (2.3.4 → 2.4.0)

Additive and backward-compatible throughout — no deprecation at any point.

  • 2.3.4 — add the names (non-breaking). Introduce dj.Entry, dj.Ingest, and dj.Compute as aliases resolving to the existing tiers, so old and new names produce identical tables (same SQL prefix, same Role). No change to defaults, repr, or what the docs teach yet. Early adopters and new examples can use the names immediately with zero migration. Land the alias-transparency checks (prefix / Role / lookup_class_name / tier detection) in this release.
  • 2.4.0 — make them canonical. Promote the new names to primary: repr/introspection, error messages, and dj.Diagram tier labels emit Entry/Ingest/Compute; the docs and tutorials teach them by default (with the datajoint-docs#267 axis explanation and a terminology sweep shipping alongside). dj.Manual/dj.Imported/dj.Computed remain permanent aliases — kept indefinitely, never deprecated.

Related

  • datajoint/datajoint-docs#267 — the tier-axis explanation (docs) and origin of this proposal.
Ngôn ngữ chính
Python
Star
197
Fork
98
Merge trung bình
6 ngày 10 giờ
Pull request đã merge (30 ngày)
4

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của datajoint/datajoint-python

Tất cả issue của datajoint/datajoint-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.