Validate mutually exclusive traits

オープン
#64 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python, yaml

調査の方向性

まず、YAML trait スキーマと生成時バリデーションのエントリポイントを追跡します。オプションの相互排他的なプロパティとリストの整合性チェックで、同一パッケージの trait とパッケージ間の trait をどのように扱うべきかを定義します。無効な trait セットと整合性のない宣言が拒否され、サポートされる動作が文書化されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
7
フォーク
7
平均マージ
1時間 7分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenAssetIO/OpenAssetIO-TraitGen のほかの issue

OpenAssetIO/OpenAssetIO-TraitGen の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。