microsoft / microsoft/PowerPlatform-DataverseClient-Python

feat: make pandas an optional dependency

Aperta
#199 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement
Lingua principale
Python
Stelle
60
Fork
23
Merge medio
13h 53m
PR unite (30g)
3

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da pyproject.toml e ispeziona i riferimenti a pandas in client.dataframe.* e client.records.create(table, dataframe). Verifica che l’installazione principale non richieda più pandas, mentre l’extra dataframe ripristini l’integrazione esistente; l’importazione di client.dataframe senza l’extra dovrebbe produrre il chiaro ImportError proposto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
pandas, python
Ambito
backend, build-system
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
72/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.