Decide on a pydantic v3 BaseModel tagged union method and document it here
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- ドキュメント
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
まず、pydantic v3で提案されている変更を念頭に置き、scanspec、FastCS、pvi、ibek、blueapiで使用されているタグ付きユニオンのアプローチを比較します。プロジェクト間で共通のBaseModelアプローチに合意し、その方法と関連するトレードオフがここに文書化されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
At the moment we have multiple ways of using pydantic and tagged unions:
scanspecusing pydantic dataclasses and a decorator to make a tagged union of subclasses, it requires positional argsFastCSusing plain dataclasses and a pydantic BaseModel creation function to do serialization and deserializationpviuses an explicitly created union of BaseModelsibekuses automatically created Entity BaseModels from EntityModel instancesblueapidoes something with BaseModels too, but I can't remember what
With the advent of pydantic v3, now would be a good time to look at investigating a common approach for all these usecases. Standardising on BaseModel instances would probably give us the most tool support for things like documenting models in sphinx, FastAPI and GraphQL support, and downstream serialization
@GDYendell @gilesknap @DiamondJoseph @tpoliaw @abbiemery FYI
@hyperrealist I'm hoping you'll take this on at some point in the new year
- 主要言語
- Jinja
- スター
- 25
- フォーク
- 10
- 平均マージ
- 4日 17時間
- マージ済み PR(30日)
- 7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DiamondLightSource/python-copier-template のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
documentation good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
DiamondLightSource/python-copier-template の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · コメント 1 件 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
rust-bitcoin/rust-bitcoin#6930 · コメント 1 件 ·
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Automattic/blocks-engine#2161 ·