-
Notifications
You must be signed in to change notification settings - Fork 11
Initial PR & build pipeline definitions #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Azure DevOps PR validation pipeline | ||
| # Matches GitHub Actions workflow for consistency | ||
|
|
||
| pr: | ||
| - main | ||
|
|
||
| trigger: none # Only run on PRs, not on direct pushes | ||
|
|
||
| pool: | ||
| vmImage: ubuntu-latest | ||
|
|
||
| # Simplified to single Python version (per project requirements) | ||
| # Can expand to matrix testing later if needed | ||
|
|
||
| steps: | ||
| - task: UsePythonVersion@0 | ||
| inputs: | ||
| versionSpec: '3.12' | ||
| addToPath: true | ||
| displayName: 'Use Python 3.12' | ||
|
|
||
| - script: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install flake8 black build | ||
| if [ -f dev_dependencies.txt ]; then pip install -r dev_dependencies.txt; fi | ||
| displayName: 'Install dependencies' | ||
|
|
||
| - script: | | ||
| black src tests --check | ||
| displayName: 'Check format with black' | ||
|
|
||
| - script: | | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings | ||
| flake8 . --count --exit-zero --show-source --statistics | ||
| displayName: 'Lint with flake8' | ||
|
|
||
| - script: | | ||
| python -m build | ||
| displayName: 'Build package' | ||
|
|
||
| - script: | | ||
| python -m pip install dist/*.whl | ||
| displayName: 'Install wheel' | ||
|
|
||
| - script: | | ||
| pytest | ||
| displayName: 'Test with pytest' | ||
|
|
||
| - task: PublishTestResults@2 | ||
| condition: succeededOrFailed() | ||
| inputs: | ||
| testResultsFiles: '**/test-*.xml' | ||
| testRunTitle: 'Python 3.12' | ||
| displayName: 'Publish test results' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| [flake8] | ||
| max-line-length = 120 | ||
| max-complexity = 10 | ||
| exclude = | ||
| __pycache__ | ||
| .venv | ||
| venv | ||
| build | ||
| dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: Python package | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| # Simplified to single Python version (per project requirements) | ||
| # Can expand to matrix testing later: strategy.matrix.python-version: ["3.10", "3.11", "3.12", "3.13"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python 3.12 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install flake8 black build | ||
| if [ -f dev_dependencies.txt ]; then pip install -r dev_dependencies.txt; fi | ||
|
|
||
| - name: Check format with black | ||
| continue-on-error: true # TODO: fix detected formatting errors and remove this line. | ||
| run: | | ||
| black src tests --check | ||
|
|
||
| - name: Lint with flake8 | ||
| run: | | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings, matching Agents-for-python approach | ||
| flake8 . --count --exit-zero --show-source --statistics | ||
|
|
||
| - name: Build package | ||
| run: | | ||
| python -m build | ||
|
|
||
| - name: Install wheel | ||
| run: | | ||
| python -m pip install dist/*.whl | ||
|
|
||
| - name: Test with pytest | ||
| run: | | ||
| pytest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
| - Initial SDK implementation with CRUD operations | ||
| - Service principal authentication support | ||
| - Interactive browser authentication support | ||
| - SQL query execution via `query_sql()` | ||
| - File upload capabilities | ||
| - Pandas integration for query results | ||
| - Structured error handling with specific exception types | ||
| - GitHub Actions CI pipeline for automated testing | ||
| - Azure DevOps PR validation pipeline | ||
|
|
||
| ### Changed | ||
| - N/A | ||
|
|
||
| ### Deprecated | ||
| - N/A | ||
|
|
||
| ### Removed | ||
| - N/A | ||
|
|
||
| ### Fixed | ||
| - N/A | ||
|
|
||
| ### Security | ||
| - N/A | ||
|
|
||
| ## [0.1.0] - TBD | ||
|
|
||
| ### Added | ||
| - First alpha release | ||
| - Core Dataverse client with authentication | ||
| - Basic CRUD operations (create, get, update, delete) | ||
| - OData query support | ||
| - SQL query support | ||
| - Error handling framework | ||
| - Example scripts for common scenarios | ||
|
|
||
| --- | ||
|
|
||
| ## Release Notes Template | ||
|
|
||
| When creating a new release, copy this template: | ||
|
|
||
| ```markdown | ||
| ## [X.Y.Z] - YYYY-MM-DD | ||
|
|
||
| ### Added | ||
| - New features | ||
|
|
||
| ### Changed | ||
| - Changes in existing functionality | ||
|
|
||
| ### Deprecated | ||
| - Soon-to-be removed features | ||
|
|
||
| ### Removed | ||
| - Removed features | ||
|
|
||
| ### Fixed | ||
| - Bug fixes | ||
|
|
||
| ### Security | ||
| - Security improvements or fixes | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Development dependencies for dataverse-client-python | ||
| # Install with: pip install -r dev_dependencies.txt | ||
|
|
||
| pytest>=8.3.1 | ||
| pytest-asyncio>=0.21 | ||
| pytest-mock>=3.0 | ||
| black>=23.0 | ||
| flake8>=6.0 | ||
| build>=0.10 | ||
| twine>=4.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,32 @@ | ||
| [build-system] | ||
| requires = ["setuptools>=61.0"] | ||
| requires = ["setuptools>=64"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "dataverse-python-client" | ||
| name = "dataverse-client-python" | ||
| version = "0.1.0" | ||
| description = "Dataverse Python client" | ||
| authors = [{ name = "POC" }] | ||
| readme = "README.md" | ||
| description = "Python SDK for Microsoft Dataverse" | ||
| readme = {file = "README.md", content-type = "text/markdown"} | ||
| authors = [{name = "Microsoft Corporation"}] | ||
| license = "MIT" | ||
| license-files = ["LICENSE"] | ||
| requires-python = ">=3.10" | ||
| classifiers = [ | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", | ||
| "Operating System :: OS Independent", | ||
| ] | ||
| dependencies = [ | ||
| "azure-identity>=1.17.0", | ||
| "azure-core>=1.30.2", | ||
| "requests>=2.32.0", | ||
| "pytest>=8.3.1", | ||
| "pandas>=2.2.0", | ||
| "azure-identity>=1.17.0", | ||
| "azure-core>=1.30.2", | ||
| "requests>=2.32.0", | ||
| "pandas>=2.2.0", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| "Homepage" = "https://github.com/microsoft/PowerPlatform-DataverseClient-Python" | ||
|
|
||
| [tool.setuptools] | ||
| # Use the src/ layout | ||
| package-dir = {"" = "src"} | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| # Discover packages under src/, include our package, and exclude non-package folders | ||
| where = ["src"] | ||
| include = ["dataverse_sdk*"] | ||
| exclude = ["tests*", "examples*"] | ||
|
|
||
| [tool.pytest.ini_options] | ||
| addopts = "-q" | ||
| pythonpath = ["src"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| from .__version__ import __version__ | ||
| from .client import DataverseClient | ||
|
|
||
| __all__ = ["DataverseClient"] | ||
| __all__ = ["DataverseClient", "__version__"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| """Version information for dataverse-client-python package.""" | ||
|
|
||
| __version__ = "0.1.0" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.