Validate mutually exclusive traits

Đang mở
#64 0 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python, yaml
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

Bắt đầu bằng cách lần theo schema trait YAML và điểm vào của quá trình xác thực tại thời điểm sinh. Xác định cách một thuộc tính tùy chọn loại trừ lẫn nhau và các kiểm tra tính nhất quán của danh sách phải xử lý các trait cùng package và các trait xuyên package. Hoàn thành khi các tập trait không hợp lệ và các khai báo không nhất quán bị từ chối, đồng thời hành vi được hỗ trợ được ghi lại.

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

Mô tả

What

Investigate adding an optional property to the YAML schema for traits, for calling out other traits that are mutually exclusive to this one, and so should not appear in the same trait set.

If possible, validate at generation time that specifications do not violate this condition, and validate that mutually exclusive lists are consistent with one-another.

Why

The absence of a trait from a trait set does not mean the negation of that trait. In order to represent negation, we need a separate trait to represent the alternative.

Such opposite pairs of traits should clearly not be allowed together in the same trait set.

It is also not always clear at a glance what the "negative trait" for a given trait is.

More generally, there may be arbitrarily large subsets of traits, elements of which should never appear together in the same entity trait set (or specification).

So from both a validation and a documentation perspective, having a structured way to describe mutually exclusive groups of traits is valuable.

Notes

Cross-package mutually-exclusive traits present a difficulty for validation. So we can either skip validating these, or revisit the idea of requiring the .yml of dependencies during generation.

Ngôn ngữ chính
Python
Star
7
Fork
7
Merge trung bình
1 giờ 7 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 OpenAssetIO/OpenAssetIO-TraitGen

Tất cả issue của OpenAssetIO/OpenAssetIO-TraitGen

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.