Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Support multiple versions of target dandischema

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
cli

調査の方向性

まず、dandi-cli と dandi-archive が現在どのように Python ライブラリ dandischema を再利用しているかを確認し、次に提案されている LinkML への移行と schema/releases 配下のエクスポート済みモデルを読みます。実装前に、バージョン選択の設計、互換性ルール、既存の Pydantic インターフェースの扱いを明確にしてください。完了条件は、dandi-cli がサーバーから要求された互換スキーマバージョンに対してメタデータを操作および検証できることです。

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

説明

schema vendoring

Inspired by

by @kabilar , and ongoing work on "vendorization" of DANDI archive codebase to support multiple instances of DANDI.

ATM both dandi-cli and dandi-archive re-use dandischema Python library for manipulating and validating metadata records. As a result, any upgrade of dandischema in server requires upgrade of dandischema in dandi-cli installation which also might require upgrade of dandi-cli itself.

With multiple archive instances in play (already DANDI and LINC and EMBER is coming), synchronizing all of them to align with most recent dandischema would be getting close to infeasible. So I think we should distill a solution which would allow dandi-cli to manipulate different/needed versions of dandischema.

Possible roadmap to achieve that

  • migrate pydantic model to linkml (effort ongoing by @candleindark ) + potentially additional "instance specific" restrictions (TODO: link issues in dandi-schema)
  • export linkml models into https://github.com/dandi/schema/tree/master/releases
  • define dandischema_schema_version -- as long as it is "compatible" in terms of its formulation with dandi-cli. In a similar situation in BIDS we have BIDS_VERSION and its SCHEMA_VERSION, see https://github.com/bids-standard/bids-specification/tree/master/src/schema#version-of-the-schema
  • in dandi-cli implement loading of models from linkml models for the version desired by the server:
    • as long as that linkml model is described in compatible version of schema (based on minimal dandischema_schema_version supported by dandi-cli) , we should be good
    • potentially extend the model with instance specific models where needed for validation (most likely the base model would be sufficient to describe)
    • not yet sure what we should do for currently used pydantic models in Python interfaces, might need to populate classes for different versions. So issue similarish to what we discussed with @rly and other nwb developers about nwb versions.

Also attn @jwodder @satra @bendichter @dandi/dandiarchive to potentially also think about enhancement to above plan or just to suggest alternative approaches.

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

環境構築

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

はじめの一歩

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

dandi/dandi-cli のほかの issue

dandi/dandi-cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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