microsoft / microsoft/PowerPlatform-DataverseClient-Python

feat: make pandas an optional dependency

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

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

enhancement
主要言語
Python
スター
60
フォーク
23
平均マージ
13時間 53分
マージ済み PR(30日)
3

説明

Summary

pandas is a required dependency (pandas>=2.0.0 in pyproject.toml) but is only used by the DataFrame integration (client.dataframe.*, client.records.create(table, dataframe)). The core SDK surface (client.tables.*, client.records.* with dict input, client.query.*) does not import pandas at all.

This makes the SDK unsuitable as a lightweight dependency for services that need only schema manipulation (e.g., table creation, column addition, relationship management) without DataFrame support. pandas adds ~30MB to the installed footprint.

Proposal

Move pandas to an optional extra:

` oml
[project]
dependencies = [
"azure-identity>=1.17.0",
"azure-core>=1.30.2",
"requests>=2.32.0",
]

[project.optional-dependencies]
dataframe = ["pandas>=2.0.0"]
`

Users who need DataFrame integration install pip install powerplatform-dataverse[dataframe]. The core SDK installs with zero heavy dependencies beyond azure-identity and requests.

Motivation

The Cowork (M365 Copilot) runtime is evaluating the SDK as the backend for Dataverse schema operations in the App Builder experience. The runtime already has azure-identity, azure-core, and requests -- but adding pandas (~30MB) as a transitive dependency for unused DataFrame features is a container footprint concern. Making pandas optional would unblock SDK adoption for schema-only use cases.

Backward compatibility

No breaking change: pip install powerplatform-dataverse[dataframe] gives the same behavior as today. Users who import client.dataframe without the extra get an ImportError with a clear message suggesting the extra.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

pyproject.toml から始め、client.dataframe.* と client.records.create(table, dataframe) にある pandas への参照を調査します。コアインストールで pandas が不要になっている一方で、dataframe extra によって既存の統合が復元されることを確認します。extra なしで client.dataframe をインポートすると、提案された明確な ImportError が発生するはずです。

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

評価

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

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

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