[Feature]: Add annotation-based YAML parser for CoP and AdvCP configs

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

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

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

評価

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

調査の方向性

Start by locating the existing YAML parsing and default merging in coperception.visualization, coperception.metrics.metric_configs, and the AdvCP attack config. Read those call sites and compare the nested config fields named in the issue; completion means a reusable annotation-based parser supports the listed types and reports full config paths, with the three migration targets using it.

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

説明

AdvCP CoP enhancement
Problem or motivation

CoP and AdvCP YAML configs are currently parsed manually in several places using dict.get(...), local default merging, and ad-hoc validation helpers. This spreads schema knowledge across managers, visualizers, metrics, and attack helpers.

As configs grow, this makes it easier to miss invalid YAML, duplicate parsing logic, or produce unclear errors when a nested key is malformed.

Proposed solution

Add a reusable annotation-based YAML parser that loads YAML mappings into typed Python config objects, likely dataclasses, using Python type annotations as the schema source.

The parser should support:

  • Nested typed config objects.
  • Defaults and optional fields.
  • Basic scalar coercion / validation for int, float, bool, str.
  • Lists, tuples, and mappings where needed.
  • Clear validation errors with full config paths, e.g. coperception.visualization.bbox_colors.pred.

Initial migration targets:

  • coperception.visualization
  • coperception.metrics.metric_configs
  • AdvCP attack config, including mode, attacker ids, density, spoofing/removal parameters, and boxes.
Area

Cooperative perception

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

環境構築

はじめの一歩

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

CAVISE/OpenCDA のほかの issue

CAVISE/OpenCDA の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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