microsoft / microsoft/PowerPlatform-DataverseClient-Python

feat: make pandas an optional dependency

Ouverte
#199 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

enhancement
Langage dominant
Python
Étoiles
60
Forks
23
Merge moyen
13 h 53 min
PR mergées (30 j)
3

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par pyproject.toml et inspectez les références à pandas dans client.dataframe.* et client.records.create(table, dataframe). Vérifiez que l’installation principale ne nécessite plus pandas, tandis que l’extra dataframe rétablit l’intégration existante ; l’importation de client.dataframe sans l’extra devrait produire le ImportError clair proposé.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
pandas, python
Domaine
backend, build-system
Type d'issue
Fonctionnalité
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Active
Clarté
Clairement spécifiée
Accessibilité débutants
72/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.