Skip to content

Commit c7daa5e

Browse files
author
Max Wang
committed
Merge branch 'main' of https://github.com/microsoft/PowerPlatform-DataverseClient-Python into users/zhaodongwang/docstringUpdate
2 parents 8ec6e2e + fd32669 commit c7daa5e

38 files changed

Lines changed: 628 additions & 919 deletions

.azdo/ci-pr.yaml

Lines changed: 69 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,72 @@ pr:
66

77
trigger: none # Only run on PRs, not on direct pushes
88

9-
pool:
10-
vmImage: ubuntu-latest
11-
12-
# Simplified to single Python version (per project requirements)
13-
# Can expand to matrix testing later if needed
14-
15-
steps:
16-
- task: UsePythonVersion@0
17-
inputs:
18-
versionSpec: '3.12'
19-
addToPath: true
20-
displayName: 'Use Python 3.12'
21-
22-
- script: |
23-
python -m pip install --upgrade pip
24-
python -m pip install flake8 black build
25-
if [ -f dev_dependencies.txt ]; then pip install -r dev_dependencies.txt; fi
26-
displayName: 'Install dependencies'
27-
28-
- script: |
29-
black src tests --check
30-
displayName: 'Check format with black'
31-
continueOnError: true # TODO: fix detected formatting errors and remove this line
32-
33-
- script: |
34-
# stop the build if there are Python syntax errors or undefined names
35-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36-
# exit-zero treats all errors as warnings
37-
flake8 . --count --exit-zero --show-source --statistics
38-
displayName: 'Lint with flake8'
39-
40-
- script: |
41-
python -m build
42-
displayName: 'Build package'
43-
44-
- script: |
45-
python -m pip install dist/*.whl
46-
displayName: 'Install wheel'
47-
48-
- script: |
49-
pytest
50-
displayName: 'Test with pytest'
51-
52-
- task: PublishTestResults@2
53-
condition: succeededOrFailed()
54-
inputs:
55-
testResultsFiles: '**/test-*.xml'
56-
testRunTitle: 'Python 3.12'
57-
displayName: 'Publish test results'
9+
resources:
10+
repositories:
11+
- repository: 1ESPipelineTemplates
12+
type: git
13+
name: 1ESPipelineTemplates/1ESPipelineTemplates
14+
ref: refs/tags/release
15+
16+
extends:
17+
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
18+
parameters:
19+
pool:
20+
name: Azure-Pipelines-1ESPT-ExDShared
21+
image: ubuntu-latest
22+
os: linux
23+
sdl:
24+
sourceAnalysisPool:
25+
name: Azure-Pipelines-1ESPT-ExDShared # Name of your hosted pool
26+
image: windows-latest
27+
os: windows
28+
stages:
29+
- stage: Build
30+
jobs:
31+
- job: Python
32+
# Simplified to single Python version (per project requirements)
33+
# Can expand to matrix testing later if needed
34+
35+
steps:
36+
- task: UsePythonVersion@0
37+
inputs:
38+
versionSpec: '3.12'
39+
addToPath: true
40+
displayName: 'Use Python 3.12'
41+
42+
- script: |
43+
python -m pip install --upgrade pip
44+
python -m pip install flake8 black build
45+
python -m pip install -e .[dev]
46+
displayName: 'Install dependencies'
47+
48+
- script: |
49+
black src tests --check
50+
displayName: 'Check format with black'
51+
continueOnError: true # TODO: fix detected formatting errors and remove this line
52+
53+
- script: |
54+
# stop the build if there are Python syntax errors or undefined names
55+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
56+
# exit-zero treats all errors as warnings
57+
flake8 . --count --exit-zero --show-source --statistics
58+
displayName: 'Lint with flake8'
59+
60+
- script: |
61+
python -m build
62+
displayName: 'Build package'
63+
64+
- script: |
65+
python -m pip install dist/*.whl
66+
displayName: 'Install wheel'
67+
68+
- script: |
69+
pytest
70+
displayName: 'Test with pytest'
71+
72+
- task: PublishTestResults@2
73+
condition: succeededOrFailed()
74+
inputs:
75+
testResultsFiles: '**/test-*.xml'
76+
testRunTitle: 'Python 3.12'
77+
displayName: 'Publish test results'

CHANGELOG.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ All notable changes to this project will be documented in this file.
2323
**Table Management:**
2424
- Table metadata operations (create, inspect, delete custom tables)
2525

26-
**Integration & Analysis:**
27-
- Pandas DataFrame integration for seamless data analysis workflows
28-
2926
**Reliability & Error Handling:**
3027
- Comprehensive error handling with specific exception types (`DataverseError`, `AuthenticationError`, etc.)
3128
- HTTP retry logic with exponential backoff for resilient operations

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
A Python client library for Microsoft Dataverse that provides a unified interface for CRUD operations, SQL queries, table metadata management, and file uploads through the Dataverse Web API.
88

9-
**[Source code](https://github.com/microsoft/PowerPlatform-DataverseClient-Python)** | **[Package (PyPI)](https://pypi.org/project/PowerPlatform-Dataverse-Client/)** | **[API reference documentation](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/sdk-python/)** | **[Product documentation](https://learn.microsoft.com/en-us/python/api/dataverse-sdk-docs-python/dataverse-overview?view=dataverse-sdk-python-latest/)** | **[Samples](https://github.com/microsoft/PowerPlatform-DataverseClient-Python/tree/main/examples)**
9+
**[Source code](https://github.com/microsoft/PowerPlatform-DataverseClient-Python)** | **[Package (PyPI)](https://pypi.org/project/PowerPlatform-Dataverse-Client/)** | **[API reference documentation](https://learn.microsoft.com/python/api/dataverse-sdk-docs-python/dataverse-overview?view=dataverse-sdk-python-latest)** | **[Product documentation](https://learn.microsoft.com/power-apps/developer/data-platform/sdk-python/)** | **[Samples](https://github.com/microsoft/PowerPlatform-DataverseClient-Python/tree/main/examples)**
1010

1111
> [!IMPORTANT]
1212
> This library is currently in **preview**. Preview versions are provided for early access to new features and may contain breaking changes.
@@ -39,7 +39,6 @@ A Python client library for Microsoft Dataverse that provides a unified interfac
3939
- **📎 File Operations**: Upload files to Dataverse file columns with automatic chunking for large files
4040
- **🔐 Azure Identity**: Built-in authentication using Azure Identity credential providers with comprehensive support
4141
- **🛡️ Error Handling**: Structured exception hierarchy with detailed error context and retry guidance
42-
- **🐼 Pandas Integration**: Preliminary DataFrame-oriented operations for data analysis workflows
4342

4443
## Getting started
4544

@@ -262,9 +261,8 @@ Explore our comprehensive examples in the [`examples/`](examples/) directory:
262261
- **[Functional Testing](examples/basic/functional_testing.py)** - Test core functionality in your environment
263262

264263
**🚀 Advanced Usage:**
265-
- **[Complete Walkthrough](examples/advanced/complete_walkthrough.py)** - Full feature demonstration with production patterns
264+
- **[Complete Walkthrough](examples/advanced/walkthrough.py)** - Full feature demonstration with production patterns
266265
- **[File Upload](examples/advanced/file_upload.py)** - Upload files to Dataverse file columns
267-
- **[Pandas Integration](examples/advanced/pandas_integration.py)** - DataFrame-based operations for data analysis
268266

269267
📖 See the [examples README](examples/README.md) for detailed guidance and learning progression.
270268

@@ -325,11 +323,9 @@ For optimal performance in production environments:
325323
### Limitations
326324

327325
- SQL queries are **read-only** and support a limited subset of SQL syntax
328-
- Create Table supports a limited number of column types.
326+
- Create Table supports a limited number of column types. Lookup columns are not yet supported.
329327
- Creating relationships between tables is not yet supported.
330328
- File uploads are limited by Dataverse file size restrictions (default 128MB per file)
331-
- Custom table creation requires appropriate security privileges in the target environment
332-
- Rate limits apply based on your Power Platform license and environment configuration
333329

334330
## Contributing
335331

examples/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Start here for getting up and running with the SDK:
3232
### 🔬 Advanced Examples (`advanced/`)
3333
Deep-dive into production-ready patterns and specialized functionality:
3434

35-
- **`complete_walkthrough.py`** - **COMPREHENSIVE DEMO** 🚀
35+
- **`walkthrough.py`** - **COMPREHENSIVE DEMO** 🚀
3636
- Full SDK feature demonstration with production-ready patterns
3737
- Table creation with custom schemas and enums
3838
- Single and bulk CRUD operations with error handling
@@ -44,9 +44,6 @@ Deep-dive into production-ready patterns and specialized functionality:
4444
- File upload to Dataverse file columns with chunking
4545
- Advanced file handling patterns
4646

47-
- **`pandas_integration.py`** - **DATA ANALYSIS** 📊
48-
- DataFrame-based operations for data analysis
49-
- Pandas integration patterns
5047

5148
## 🚀 Getting Started
5249

@@ -70,15 +67,15 @@ python examples/basic/functional_testing.py
7067
### 🚀 Step 3: Master Advanced Features
7168
```bash
7269
# Comprehensive walkthrough with production patterns
73-
python examples/advanced/complete_walkthrough.py
70+
python examples/advanced/walkthrough.py
7471
```
7572

7673
## 🎯 Quick Start Recommendations
7774

7875
- **New to the SDK?** → Start with `examples/basic/installation_example.py`
7976
- **Need to test/validate?** → Use `examples/basic/functional_testing.py`
80-
- **Want to see all features?** → Run `examples/advanced/complete_walkthrough.py`
81-
- **Building production apps?** → Study patterns in `examples/advanced/complete_walkthrough.py`
77+
- **Want to see all features?** → Run `examples/advanced/walkthrough.py`
78+
- **Building production apps?** → Study patterns in `examples/advanced/walkthrough.py`
8279

8380
## 📋 Prerequisites
8481

examples/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT license.
33

4-
"""Examples package for the Dataverse SDK."""
4+
"""Examples package for the Dataverse SDK."""

examples/advanced/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT license.
33

4-
"""Advanced examples showcasing complex Dataverse SDK features."""
4+
"""Advanced examples showcasing complex Dataverse SDK features."""

0 commit comments

Comments
 (0)