Enhancement: read `[options.extras_require]` from `setup.cfg` as optional dependencies

オープン 初心者向け
#708 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, typescript
領域
backend, data

調査の方向性

まず src/core-open/scanners/python-scanner.ts の parseSetupCfg(1131~1158 行付近)から始め、[options] と [project.optional-dependencies] の既存の処理を読んでください。挙げられた extras のケースのテストを追加し、期待される SBOM の範囲について test/sbom-python-optional.test.ts と docs/sbom-dependency-scope.md を確認してください。extras が optionalDependencies になり、本番要件が優先され、空または存在しない extras がパッケージを追加しない状態になれば完了です。

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

説明

enhancement good first issue
  • Difficulty: small
  • Area: Python scanner / SBOM
Problem

parseSetupCfg in src/core-open/scanners/python-scanner.ts (around lines 1131–1158) reads [options] install_requires and python_requires only. It never looks at [options.extras_require]:

[options.extras_require]
dev =
    pytest>=7
    ruff
docs = sphinx>=7

PEP 621 [project.optional-dependencies] is already exported as optionalDependencies. A setuptools project that still uses setup.cfg extras has those packages missing from vg scan and vg sbom export.

Expected behaviour

Every extra in [options.extras_require] becomes a row with section optionalDependencies, the same way [project.optional-dependencies] does. A package already listed in install_requires stays a production row and keeps the production spec. Extra names do not become packages.

Acceptance
  • Tests cover one extra, several extras, a package in both install_requires and an extra (production wins), and a setup.cfg with no extras section (unchanged).
  • vg sbom export marks those rows the same way other optional Python extras are marked (see docs/sbom-dependency-scope.md and test/sbom-python-optional.test.ts).
  • An empty extras section does not invent packages.

主要言語
TypeScript
スター
4
フォーク
3
平均マージ
1日 22時間
マージ済み PR(30日)
76

環境構築

はじめの一歩

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

vibgrate/cli のほかの issue

vibgrate/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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