From 48acd6325dea85a8eeca8c1a19d1e6da923e58da Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Wed, 3 Jun 2026 10:52:41 -0700 Subject: [PATCH 1/8] feat(pipeline): add Azure Pipelines configuration for building and publishing Kiota Python packages to PyPI Retire the GitHub action used to publish this package. --- .azure-pipelines/cd-publish-python.yml | 337 +++++++++++++++++++++++++ .github/workflows/publish.yml | 75 ------ 2 files changed, 337 insertions(+), 75 deletions(-) create mode 100644 .azure-pipelines/cd-publish-python.yml delete mode 100644 .github/workflows/publish.yml diff --git a/.azure-pipelines/cd-publish-python.yml b/.azure-pipelines/cd-publish-python.yml new file mode 100644 index 0000000..cb0f9b0 --- /dev/null +++ b/.azure-pipelines/cd-publish-python.yml @@ -0,0 +1,337 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +# Build, package, and deploy Kiota Python packages to PyPI + +name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) + +trigger: + branches: + include: + - main + tags: + include: + - 'microsoft-kiota-abstractions-v*' + +pr: none + +variables: + pythonVersion: '3.14' + +resources: + repositories: + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + pool: + name: Azure-Pipelines-1ESPT-ExDShared + vmImage: ubuntu-latest + stages: + + - stage: build + displayName: 'Build and Package Kiota Python Packages' + condition: or(contains(variables['Build.SourceBranch'], 'microsoft-kiota-abstractions-v'), eq(variables['Build.Reason'], 'Manual')) + jobs: + - job: build_python + displayName: 'Build, Test, and Package' + pool: + name: Azure-Pipelines-1ESPT-ExDShared + vmImage: ubuntu-latest + + steps: + - task: UsePythonVersion@0 + displayName: 'Install Python $(pythonVersion)' + inputs: + versionSpec: '$(pythonVersion)' + addToPath: true + + - script: python -m pip install --upgrade pip + displayName: 'Upgrade pip' + + - script: | + pip install poetry + pip install poetry-plugin-mono-repo-deps + displayName: 'Install Poetry and mono-repo-deps plugin' + + # Build and test kiota_abstractions + - script: poetry install + displayName: 'Install abstractions dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + - script: poetry run yapf -dr kiota_abstractions + displayName: 'Check code format - abstractions' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + - script: poetry run isort kiota_abstractions + displayName: 'Check import order - abstractions' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + - script: poetry run pylint kiota_abstractions --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - abstractions' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + - script: poetry run pytest + displayName: 'Run tests - abstractions' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + - script: poetry build + displayName: 'Build package - abstractions' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + # Build and test kiota_authentication_azure + - script: poetry install + displayName: 'Install authentication_azure dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + - script: poetry run yapf -dr kiota_authentication_azure + displayName: 'Check code format - authentication_azure' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + - script: poetry run isort kiota_authentication_azure + displayName: 'Check import order - authentication_azure' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + - script: poetry run pylint kiota_authentication_azure --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - authentication_azure' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + - script: poetry run pytest + displayName: 'Run tests - authentication_azure' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + - script: poetry build + displayName: 'Build package - authentication_azure' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + # Build and test kiota_http + - script: poetry install + displayName: 'Install http dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + - script: poetry run yapf -dr kiota_http + displayName: 'Check code format - http' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + - script: poetry run isort kiota_http + displayName: 'Check import order - http' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + - script: poetry run pylint kiota_http --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - http' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + - script: poetry run pytest + displayName: 'Run tests - http' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + - script: poetry build + displayName: 'Build package - http' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + # Build and test kiota_serialization_form + - script: poetry install + displayName: 'Install serialization_form dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + - script: poetry run yapf -dr kiota_serialization_form + displayName: 'Check code format - serialization_form' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + - script: poetry run isort kiota_serialization_form + displayName: 'Check import order - serialization_form' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + - script: poetry run pylint kiota_serialization_form --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - serialization_form' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + - script: poetry run pytest + displayName: 'Run tests - serialization_form' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + - script: poetry build + displayName: 'Build package - serialization_form' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + # Build and test kiota_serialization_json + - script: poetry install + displayName: 'Install serialization_json dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + - script: poetry run yapf -dr kiota_serialization_json + displayName: 'Check code format - serialization_json' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + - script: poetry run isort kiota_serialization_json + displayName: 'Check import order - serialization_json' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + - script: poetry run pylint kiota_serialization_json --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - serialization_json' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + - script: poetry run pytest + displayName: 'Run tests - serialization_json' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + - script: poetry build + displayName: 'Build package - serialization_json' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + # Build and test kiota_serialization_text + - script: poetry install + displayName: 'Install serialization_text dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + - script: poetry run yapf -dr kiota_serialization_text + displayName: 'Check code format - serialization_text' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + - script: poetry run isort kiota_serialization_text + displayName: 'Check import order - serialization_text' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + - script: poetry run pylint kiota_serialization_text --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - serialization_text' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + - script: poetry run pytest + displayName: 'Run tests - serialization_text' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + - script: poetry build + displayName: 'Build package - serialization_text' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + # Build and test kiota_serialization_multipart + - script: poetry install + displayName: 'Install serialization_multipart dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + - script: poetry run yapf -dr kiota_serialization_multipart + displayName: 'Check code format - serialization_multipart' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + - script: poetry run isort kiota_serialization_multipart + displayName: 'Check import order - serialization_multipart' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + - script: poetry run pylint kiota_serialization_multipart --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - serialization_multipart' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + - script: poetry run pytest + displayName: 'Run tests - serialization_multipart' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + - script: poetry build + displayName: 'Build package - serialization_multipart' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + # Build and test kiota_bundle + - script: poetry install + displayName: 'Install bundle dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' + + - script: poetry run yapf -dr kiota_bundle + displayName: 'Check code format - bundle' + workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' + + - script: poetry run isort kiota_bundle + displayName: 'Check import order - bundle' + workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' + + - script: poetry run pylint kiota_bundle --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - bundle' + workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' + + - script: poetry run pytest + displayName: 'Run tests - bundle' + workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' + + - script: poetry build + displayName: 'Build package - bundle' + workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' + + # Copy all built packages to staging + - task: CopyFiles@2 + displayName: 'Copy all package artifacts to staging' + inputs: + CleanTargetFolder: true + sourceFolder: '$(Build.SourcesDirectory)' + targetFolder: '$(Build.ArtifactStagingDirectory)/python/kiota_packages' + Contents: | + packages/abstractions/dist/*.tar.gz + packages/abstractions/dist/*.whl + packages/authentication/azure/dist/*.tar.gz + packages/authentication/azure/dist/*.whl + packages/http/httpx/dist/*.tar.gz + packages/http/httpx/dist/*.whl + packages/serialization/form/dist/*.tar.gz + packages/serialization/form/dist/*.whl + packages/serialization/json/dist/*.tar.gz + packages/serialization/json/dist/*.whl + packages/serialization/text/dist/*.tar.gz + packages/serialization/text/dist/*.whl + packages/serialization/multipart/dist/*.tar.gz + packages/serialization/multipart/dist/*.whl + packages/bundle/dist/*.tar.gz + packages/bundle/dist/*.whl + flattenFolders: true + + templateContext: + outputs: + - output: pipelineArtifact + displayName: 'Stage Kiota Python package artifacts' + artifactName: pypi_kiota_packages + targetPath: '$(Build.ArtifactStagingDirectory)/python/kiota_packages' + condition: or(contains(variables['Build.SourceBranch'], 'microsoft-kiota-abstractions-v'), eq(variables['Build.Reason'], 'Manual')) + + - stage: deploy + displayName: 'Publish Kiota Python Packages to PyPI' + dependsOn: build + condition: or(and(contains(variables['Build.SourceBranch'], 'microsoft-kiota-abstractions-v'), succeeded()), eq(variables['Build.Reason'], 'Manual')) + jobs: + - deployment: publish_python_packages + displayName: 'Publish Kiota Python Packages' + environment: kiota-python-prod + pool: + name: Azure-Pipelines-1ESPT-ExDShared + image: ubuntu-latest + os: linux + + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + artifactName: pypi_kiota_packages + targetPath: '$(Build.ArtifactStagingDirectory)/python' + strategy: + runOnce: + deploy: + steps: + - task: EsrpRelease@9 + displayName: 'Publish Kiota Python packages via ESRP Release' + inputs: + connectedservicename: "Federated DevX ESRP Managed Identity Connection" + usemanagedidentity: false + keyvaultname: 'akv-prod-eastus' + authcertname: 'ReferenceLibraryPrivateCert' + signcertname: 'ReferencePackagePublisherCertificate' + clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' + intent: 'PackageDistribution' + contenttype: 'PYPI' + contentsource: 'Folder' + folderlocation: '$(Build.ArtifactStagingDirectory)/python' + waitforreleasecompletion: true + owners: 'mmainer@microsoft.com,gavinbarron@microsoft.com' + approvers: 'mmainer@microsoft.com,christiano@microsoft.com,gavinbarron@microsoft.com,lramosvea@microsoft.com' + serviceendpointurl: 'https://api.esrp.microsoft.com' + mainpublisher: 'ESRPRELPACMAN' + domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 09c5c15..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Publish package to PyPI - -on: - push: - tags: - - "microsoft-kiota-abstractions-v*" # Push events to matching microsoft-kiota-abstractions-v*, i.e. microsoft-kiota-abstractions-v1.0, microsoft-kiota-abstractions-v20.15.10 - # All packages are ideally released together so we can use the same tag for all packages - -permissions: - contents: write - -jobs: - build: - uses: ./.github/workflows/build.yml - - publish: - name: Publish distribution to PyPI - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/microsoft-kiota-abstractions-v') - environment: pypi_prod - needs: [build] - env: - POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }} - steps: - - name: Checkout code - uses: actions/checkout@v6 - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: "3.14" - - name: Install poetry and mono-repo-deps plugin - run: | - python -m pip install --upgrade poetry - python -m pip install --upgrade poetry-plugin-mono-repo-deps - - name: Publish kiota_abstractions to PyPI - run: | - poetry install - poetry publish --build - working-directory: "./packages/abstractions" - - name: Publish kiota_authentication_azure to PyPI - run: | - poetry install - poetry publish --build - working-directory: "./packages/authentication/azure" - - name: Publish kiota_http to PyPI - run: | - poetry install - poetry publish --build - working-directory: "./packages/http/httpx" - - name: Publish kiota_serialization_form to PyPI - run: | - poetry install - poetry publish --build - working-directory: "./packages/serialization/form" - - name: Publish kiota_serialization_json to PyPI - run: | - poetry install - poetry publish --build - working-directory: "./packages/serialization/json" - - name: Publish kiota_serialization_text to PyPI - run: | - poetry install - poetry publish --build - working-directory: "./packages/serialization/text" - - name: Publish kiota_serialization_multipart to PyPI - run: | - poetry install - poetry publish --build - working-directory: "./packages/serialization/multipart" - - name: Publish kiota_bundle to PyPI - run: | - poetry install - poetry publish --build - working-directory: "./packages/bundle" - \ No newline at end of file From dc350f59fd970431a9d015041c08e1054f73eab9 Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Wed, 3 Jun 2026 13:36:02 -0700 Subject: [PATCH 2/8] chore(pipeline): add sdl pool info --- .azure-pipelines/cd-publish-python.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/cd-publish-python.yml b/.azure-pipelines/cd-publish-python.yml index cb0f9b0..4395ed7 100644 --- a/.azure-pipelines/cd-publish-python.yml +++ b/.azure-pipelines/cd-publish-python.yml @@ -31,6 +31,12 @@ extends: pool: name: Azure-Pipelines-1ESPT-ExDShared vmImage: ubuntu-latest + os: linux + sdl: + sourceAnalysisPool: + name: Azure-Pipelines-1ESPT-ExDShared + image: windows-2022 + os: windows stages: - stage: build @@ -299,7 +305,7 @@ extends: jobs: - deployment: publish_python_packages displayName: 'Publish Kiota Python Packages' - environment: kiota-python-prod + environment: pypi_prod pool: name: Azure-Pipelines-1ESPT-ExDShared image: ubuntu-latest From 39f77e426cb28a87b5926a548067f92743ab35e4 Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:52:22 -0700 Subject: [PATCH 3/8] chore: remove os setting --- .azure-pipelines/cd-publish-python.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.azure-pipelines/cd-publish-python.yml b/.azure-pipelines/cd-publish-python.yml index 4395ed7..e33d757 100644 --- a/.azure-pipelines/cd-publish-python.yml +++ b/.azure-pipelines/cd-publish-python.yml @@ -31,7 +31,6 @@ extends: pool: name: Azure-Pipelines-1ESPT-ExDShared vmImage: ubuntu-latest - os: linux sdl: sourceAnalysisPool: name: Azure-Pipelines-1ESPT-ExDShared From 4d9ac8cd3fdddc1874a2b64acb8372a790060a13 Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Wed, 3 Jun 2026 15:17:33 -0700 Subject: [PATCH 4/8] fix(pipeline): update Azure Pipelines configuration to use 'image' instead of 'vmImage' and specify OS --- .azure-pipelines/cd-publish-python.yml | 6 ++++-- .vscode/settings.json | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/cd-publish-python.yml b/.azure-pipelines/cd-publish-python.yml index e33d757..4cf1aa1 100644 --- a/.azure-pipelines/cd-publish-python.yml +++ b/.azure-pipelines/cd-publish-python.yml @@ -30,7 +30,8 @@ extends: parameters: pool: name: Azure-Pipelines-1ESPT-ExDShared - vmImage: ubuntu-latest + image: ubuntu-latest + os: linux sdl: sourceAnalysisPool: name: Azure-Pipelines-1ESPT-ExDShared @@ -46,7 +47,8 @@ extends: displayName: 'Build, Test, and Package' pool: name: Azure-Pipelines-1ESPT-ExDShared - vmImage: ubuntu-latest + image: ubuntu-latest + os: linux steps: - task: UsePythonVersion@0 diff --git a/.vscode/settings.json b/.vscode/settings.json index 790145e..7d688dd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,5 +16,6 @@ "--rootdir=${workspaceFolder}" ], "python.testing.unittestEnabled": false, - "python.testing.pytestEnabled": false, // Disable pytest (does not work with poetry yet) + "python.testing.pytestEnabled": false, + "azure-pipelines.1ESPipelineTemplatesSchemaFile": true, // Disable pytest (does not work with poetry yet) } \ No newline at end of file From 3dd59a43b5bb026deaf5947e877a7b13e4f6d496 Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Wed, 3 Jun 2026 15:31:50 -0700 Subject: [PATCH 5/8] feat(pipeline): add pip authentication step for Azure Artifacts in CI pipeline --- .azure-pipelines/cd-publish-python.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.azure-pipelines/cd-publish-python.yml b/.azure-pipelines/cd-publish-python.yml index 4cf1aa1..d836d6f 100644 --- a/.azure-pipelines/cd-publish-python.yml +++ b/.azure-pipelines/cd-publish-python.yml @@ -60,6 +60,11 @@ extends: - script: python -m pip install --upgrade pip displayName: 'Upgrade pip' + - task: PipAuthenticate@1 + displayName: "Authenticate pip to Azure Artifacts" + inputs: + artifactFeeds: "$(System.TeamProject)/msgraph-python-dev" + - script: | pip install poetry pip install poetry-plugin-mono-repo-deps From af456af8f62b19f27df062ae3b277b85c5004b23 Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Wed, 3 Jun 2026 15:37:52 -0700 Subject: [PATCH 6/8] chore: remove trigger on main Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .azure-pipelines/cd-publish-python.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.azure-pipelines/cd-publish-python.yml b/.azure-pipelines/cd-publish-python.yml index d836d6f..c27139b 100644 --- a/.azure-pipelines/cd-publish-python.yml +++ b/.azure-pipelines/cd-publish-python.yml @@ -6,13 +6,9 @@ name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) trigger: - branches: - include: - - main tags: include: - 'microsoft-kiota-abstractions-v*' - pr: none variables: From 4303fa425563b6b214c047a1eaa79c11df678eed Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Jun 2026 20:07:22 +0000 Subject: [PATCH 7/8] fix: move pytest note to pytest setting --- .vscode/settings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 7d688dd..201f3a8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,6 +16,6 @@ "--rootdir=${workspaceFolder}" ], "python.testing.unittestEnabled": false, - "python.testing.pytestEnabled": false, - "azure-pipelines.1ESPipelineTemplatesSchemaFile": true, // Disable pytest (does not work with poetry yet) + "python.testing.pytestEnabled": false, // Disable pytest (does not work with poetry yet) + "azure-pipelines.1ESPipelineTemplatesSchemaFile": true } \ No newline at end of file From b63c0106d0f29d017781501e3f3dbbae593f57a2 Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Fri, 5 Jun 2026 13:59:36 -0700 Subject: [PATCH 8/8] chore: drop poetry, migrate to pip + flit_core (#563) * chore: drop poetry, migrate to pip + flit_core - Replace poetry-core build backend with flit_core in all 8 packages - Convert all pyproject.toml from [tool.poetry] to PEP 621 [project] format - Fix [mypy] -> [tool.mypy] in abstractions, authentication/azure, bundle, tests/validation - Fix tests/validation mypy files setting to 'validation' - Create requirements-dev.txt per package (8 packages + tests/validation) - Update build.yml: replace poetry install/run with pip and direct commands - Update cd-publish-python.yml: replace poetry with pip install build + python -m build - Remove poetry-plugin-mono-repo-deps from root requirements_dev.txt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: update VSCode settings to maintain pytest configuration * chore: remove non-active approver * chore(pipeline): update artifact feed for pip authentication --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .azure-pipelines/cd-publish-python.yml | 106 +++++++++--------- .github/workflows/build.yml | 20 ++-- .vscode/settings.json | 4 +- packages/abstractions/pyproject.toml | 47 ++++---- packages/abstractions/requirements-dev.txt | 7 ++ packages/authentication/azure/pyproject.toml | 52 ++++----- .../authentication/azure/requirements-dev.txt | 9 ++ packages/bundle/pyproject.toml | 53 ++++----- packages/bundle/requirements-dev.txt | 13 +++ packages/http/httpx/pyproject.toml | 48 ++++---- packages/http/httpx/requirements-dev.txt | 9 ++ packages/serialization/form/pyproject.toml | 42 +++---- .../serialization/form/requirements-dev.txt | 9 ++ packages/serialization/json/pyproject.toml | 41 +++---- .../serialization/json/requirements-dev.txt | 8 ++ .../serialization/multipart/pyproject.toml | 42 +++---- .../multipart/requirements-dev.txt | 9 ++ packages/serialization/text/pyproject.toml | 41 +++---- .../serialization/text/requirements-dev.txt | 8 ++ requirements_dev.txt | 1 - tests/validation/pyproject.toml | 55 +-------- tests/validation/requirements-dev.txt | 7 ++ 22 files changed, 289 insertions(+), 342 deletions(-) create mode 100644 packages/abstractions/requirements-dev.txt create mode 100644 packages/authentication/azure/requirements-dev.txt create mode 100644 packages/bundle/requirements-dev.txt create mode 100644 packages/http/httpx/requirements-dev.txt create mode 100644 packages/serialization/form/requirements-dev.txt create mode 100644 packages/serialization/json/requirements-dev.txt create mode 100644 packages/serialization/multipart/requirements-dev.txt create mode 100644 packages/serialization/text/requirements-dev.txt create mode 100644 tests/validation/requirements-dev.txt diff --git a/.azure-pipelines/cd-publish-python.yml b/.azure-pipelines/cd-publish-python.yml index c27139b..2a4a61b 100644 --- a/.azure-pipelines/cd-publish-python.yml +++ b/.azure-pipelines/cd-publish-python.yml @@ -59,210 +59,208 @@ extends: - task: PipAuthenticate@1 displayName: "Authenticate pip to Azure Artifacts" inputs: - artifactFeeds: "$(System.TeamProject)/msgraph-python-dev" + artifactFeeds: "$(System.TeamProject)/GraphDeveloperExperiences_Public" - - script: | - pip install poetry - pip install poetry-plugin-mono-repo-deps - displayName: 'Install Poetry and mono-repo-deps plugin' + - script: pip install build + displayName: 'Install build' # Build and test kiota_abstractions - - script: poetry install + - script: pip install -r requirements-dev.txt displayName: 'Install abstractions dependencies' workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' - - script: poetry run yapf -dr kiota_abstractions + - script: yapf -dr kiota_abstractions displayName: 'Check code format - abstractions' workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' - - script: poetry run isort kiota_abstractions + - script: isort kiota_abstractions displayName: 'Check import order - abstractions' workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' - - script: poetry run pylint kiota_abstractions --disable=W --rcfile=.pylintrc + - script: pylint kiota_abstractions --disable=W --rcfile=.pylintrc displayName: 'Lint with Pylint - abstractions' workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' - - script: poetry run pytest + - script: pytest displayName: 'Run tests - abstractions' workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' - - script: poetry build + - script: python -m build displayName: 'Build package - abstractions' workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' # Build and test kiota_authentication_azure - - script: poetry install + - script: pip install -r requirements-dev.txt displayName: 'Install authentication_azure dependencies' workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' - - script: poetry run yapf -dr kiota_authentication_azure + - script: yapf -dr kiota_authentication_azure displayName: 'Check code format - authentication_azure' workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' - - script: poetry run isort kiota_authentication_azure + - script: isort kiota_authentication_azure displayName: 'Check import order - authentication_azure' workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' - - script: poetry run pylint kiota_authentication_azure --disable=W --rcfile=.pylintrc + - script: pylint kiota_authentication_azure --disable=W --rcfile=.pylintrc displayName: 'Lint with Pylint - authentication_azure' workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' - - script: poetry run pytest + - script: pytest displayName: 'Run tests - authentication_azure' workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' - - script: poetry build + - script: python -m build displayName: 'Build package - authentication_azure' workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' # Build and test kiota_http - - script: poetry install + - script: pip install -r requirements-dev.txt displayName: 'Install http dependencies' workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' - - script: poetry run yapf -dr kiota_http + - script: yapf -dr kiota_http displayName: 'Check code format - http' workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' - - script: poetry run isort kiota_http + - script: isort kiota_http displayName: 'Check import order - http' workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' - - script: poetry run pylint kiota_http --disable=W --rcfile=.pylintrc + - script: pylint kiota_http --disable=W --rcfile=.pylintrc displayName: 'Lint with Pylint - http' workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' - - script: poetry run pytest + - script: pytest displayName: 'Run tests - http' workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' - - script: poetry build + - script: python -m build displayName: 'Build package - http' workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' # Build and test kiota_serialization_form - - script: poetry install + - script: pip install -r requirements-dev.txt displayName: 'Install serialization_form dependencies' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' - - script: poetry run yapf -dr kiota_serialization_form + - script: yapf -dr kiota_serialization_form displayName: 'Check code format - serialization_form' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' - - script: poetry run isort kiota_serialization_form + - script: isort kiota_serialization_form displayName: 'Check import order - serialization_form' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' - - script: poetry run pylint kiota_serialization_form --disable=W --rcfile=.pylintrc + - script: pylint kiota_serialization_form --disable=W --rcfile=.pylintrc displayName: 'Lint with Pylint - serialization_form' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' - - script: poetry run pytest + - script: pytest displayName: 'Run tests - serialization_form' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' - - script: poetry build + - script: python -m build displayName: 'Build package - serialization_form' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' # Build and test kiota_serialization_json - - script: poetry install + - script: pip install -r requirements-dev.txt displayName: 'Install serialization_json dependencies' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' - - script: poetry run yapf -dr kiota_serialization_json + - script: yapf -dr kiota_serialization_json displayName: 'Check code format - serialization_json' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' - - script: poetry run isort kiota_serialization_json + - script: isort kiota_serialization_json displayName: 'Check import order - serialization_json' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' - - script: poetry run pylint kiota_serialization_json --disable=W --rcfile=.pylintrc + - script: pylint kiota_serialization_json --disable=W --rcfile=.pylintrc displayName: 'Lint with Pylint - serialization_json' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' - - script: poetry run pytest + - script: pytest displayName: 'Run tests - serialization_json' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' - - script: poetry build + - script: python -m build displayName: 'Build package - serialization_json' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' # Build and test kiota_serialization_text - - script: poetry install + - script: pip install -r requirements-dev.txt displayName: 'Install serialization_text dependencies' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' - - script: poetry run yapf -dr kiota_serialization_text + - script: yapf -dr kiota_serialization_text displayName: 'Check code format - serialization_text' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' - - script: poetry run isort kiota_serialization_text + - script: isort kiota_serialization_text displayName: 'Check import order - serialization_text' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' - - script: poetry run pylint kiota_serialization_text --disable=W --rcfile=.pylintrc + - script: pylint kiota_serialization_text --disable=W --rcfile=.pylintrc displayName: 'Lint with Pylint - serialization_text' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' - - script: poetry run pytest + - script: pytest displayName: 'Run tests - serialization_text' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' - - script: poetry build + - script: python -m build displayName: 'Build package - serialization_text' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' # Build and test kiota_serialization_multipart - - script: poetry install + - script: pip install -r requirements-dev.txt displayName: 'Install serialization_multipart dependencies' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' - - script: poetry run yapf -dr kiota_serialization_multipart + - script: yapf -dr kiota_serialization_multipart displayName: 'Check code format - serialization_multipart' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' - - script: poetry run isort kiota_serialization_multipart + - script: isort kiota_serialization_multipart displayName: 'Check import order - serialization_multipart' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' - - script: poetry run pylint kiota_serialization_multipart --disable=W --rcfile=.pylintrc + - script: pylint kiota_serialization_multipart --disable=W --rcfile=.pylintrc displayName: 'Lint with Pylint - serialization_multipart' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' - - script: poetry run pytest + - script: pytest displayName: 'Run tests - serialization_multipart' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' - - script: poetry build + - script: python -m build displayName: 'Build package - serialization_multipart' workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' # Build and test kiota_bundle - - script: poetry install + - script: pip install -r requirements-dev.txt displayName: 'Install bundle dependencies' workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' - - script: poetry run yapf -dr kiota_bundle + - script: yapf -dr kiota_bundle displayName: 'Check code format - bundle' workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' - - script: poetry run isort kiota_bundle + - script: isort kiota_bundle displayName: 'Check import order - bundle' workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' - - script: poetry run pylint kiota_bundle --disable=W --rcfile=.pylintrc + - script: pylint kiota_bundle --disable=W --rcfile=.pylintrc displayName: 'Lint with Pylint - bundle' workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' - - script: poetry run pytest + - script: pytest displayName: 'Run tests - bundle' workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' - - script: poetry build + - script: python -m build displayName: 'Build package - bundle' workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' @@ -339,7 +337,7 @@ extends: folderlocation: '$(Build.ArtifactStagingDirectory)/python' waitforreleasecompletion: true owners: 'mmainer@microsoft.com,gavinbarron@microsoft.com' - approvers: 'mmainer@microsoft.com,christiano@microsoft.com,gavinbarron@microsoft.com,lramosvea@microsoft.com' + approvers: 'mmainer@microsoft.com,christiano@microsoft.com,gavinbarron@microsoft.com' serviceendpointurl: 'https://api.esrp.microsoft.com' mainpublisher: 'ESRPRELPACMAN' domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65b882c..9cb766e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,28 +48,27 @@ jobs: - name: Install dependencies working-directory: ${{ matrix.library.path }} run: | - python -m pip install --upgrade poetry - poetry install + pip install -r requirements-dev.txt - name: Check code format working-directory: ${{ matrix.library.path }} run: | - poetry run yapf -dr ${{ matrix.library.name }} + yapf -dr ${{ matrix.library.name }} - name: Check import order working-directory: ${{ matrix.library.path }} run: | - poetry run isort ${{ matrix.library.name }} + isort ${{ matrix.library.name }} - name: Lint with Pylint working-directory: ${{ matrix.library.path }} run: | - poetry run pylint ${{ matrix.library.name }} --disable=W --rcfile=.pylintrc + pylint ${{ matrix.library.name }} --disable=W --rcfile=.pylintrc - name: Static type checking with Mypy working-directory: ${{ matrix.library.path }} run: | - poetry run mypy ${{ matrix.library.name }} + mypy ${{ matrix.library.name }} - name: Run the tests working-directory: ${{ matrix.library.path }} run: | - poetry run pytest + pytest validation-workflow-with-generated-code: runs-on: ubuntu-latest @@ -87,14 +86,13 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies - working-directory: "./tests/validation" + working-directory: "./tests/validation" run: | - python -m pip install --upgrade poetry - poetry install + pip install -r requirements-dev.txt - name: Static type checking with Mypy working-directory: "./tests/validation" run: | - poetry run mypy validation + mypy validation # The check-python-version-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure. diff --git a/.vscode/settings.json b/.vscode/settings.json index 201f3a8..36dc615 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,6 @@ { + "azure-pipelines.1ESPipelineTemplatesSchemaFile": true, "python.testing.cwd": ".", - // "python.poetryPath": ".venv/bin/poetry", - // "python.testing.pytestPath": ".venv/bin/pytest", - // "python.analysis.typeCheckingMode": "basic", "python.testing.pytestArgs": [ "packages/tests", "packages/abstractions/tests", diff --git a/packages/abstractions/pyproject.toml b/packages/abstractions/pyproject.toml index e033687..307ac9c 100644 --- a/packages/abstractions/pyproject.toml +++ b/packages/abstractions/pyproject.toml @@ -1,13 +1,13 @@ [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["flit_core>=3.2,<4"] +build-backend = "flit_core.buildapi" -[tool.poetry] +[project] name = "microsoft-kiota-abstractions" version = "1.10.2" description = "Core abstractions for kiota generated libraries in Python" -authors = ["Microsoft "] -license = "MIT" +authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] +license = {text = "MIT"} readme = "README.md" keywords = ["kiota", "openAPI", "Microsoft", "Graph"] classifiers = [ @@ -19,27 +19,22 @@ classifiers = [ "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", ] -homepage = "https://github.com/microsoft/kiota#readme" -repository = "https://github.com/microsoft/kiota-python" -documentation = "https://learn.microsoft.com/openapi/kiota/" -packages = [{include = "kiota_abstractions"}] +requires-python = ">=3.10" +dependencies = [ + "std-uritemplate>=2.0.0", + "opentelemetry-api>=1.27.0", + "opentelemetry-sdk>=1.27.0", +] -[tool.poetry.dependencies] -python = ">=3.10,<4.0" -std-uritemplate = ">=2.0.0" -opentelemetry-api = ">=1.27.0" -opentelemetry-sdk = ">=1.27.0" +[project.urls] +Homepage = "https://github.com/microsoft/kiota#readme" +Repository = "https://github.com/microsoft/kiota-python" +Documentation = "https://learn.microsoft.com/openapi/kiota/" -[tool.poetry.group.dev.dependencies] -yapf = ">=0.40.2,<0.44.0" -isort = ">=5.13.2,<9.0.0" -pylint = ">=3.2.7,<5.0.0" -mypy = ">=1.11.2,<3.0.0" -pytest = ">=8.3.2,<10.0.0" -pytest-asyncio = ">=0.24,<1.4" -poetry-plugin-mono-repo-deps = ">=0.2.1,<0.4.0" +[tool.flit.module] +name = "kiota_abstractions" -[mypy] +[tool.mypy] warn_unused_configs = true files = "kiota_abstractions" @@ -50,8 +45,4 @@ each_dict_entry_on_separate_line = true column_limit = 100 [tool.isort] -profile = "hug" - -[tool.poetry-monorepo.deps] -enabled = true -commands = ["build", "export", "publish"] \ No newline at end of file +profile = "hug" \ No newline at end of file diff --git a/packages/abstractions/requirements-dev.txt b/packages/abstractions/requirements-dev.txt new file mode 100644 index 0000000..f19e94f --- /dev/null +++ b/packages/abstractions/requirements-dev.txt @@ -0,0 +1,7 @@ +-e . +yapf>=0.40.2,<0.44.0 +isort>=5.13.2,<9.0.0 +pylint>=3.2.7,<5.0.0 +mypy>=1.11.2,<3.0.0 +pytest>=8.3.2,<10.0.0 +pytest-asyncio>=0.24,<1.4 diff --git a/packages/authentication/azure/pyproject.toml b/packages/authentication/azure/pyproject.toml index 6b3b627..d765ac5 100644 --- a/packages/authentication/azure/pyproject.toml +++ b/packages/authentication/azure/pyproject.toml @@ -1,13 +1,13 @@ [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["flit_core>=3.2,<4"] +build-backend = "flit_core.buildapi" -[tool.poetry] +[project] name = "microsoft-kiota-authentication-azure" version = "1.10.2" description = "Core abstractions for kiota generated libraries in Python" -authors = ["Microsoft "] -license = "MIT" +authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] +license = {text = "MIT"} readme = "README.md" keywords = ["kiota", "openAPI", "Microsoft", "Graph"] classifiers = [ @@ -19,30 +19,24 @@ classifiers = [ "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", ] -homepage = "https://github.com/microsoft/kiota#readme" -repository = "https://github.com/microsoft/kiota-python" -documentation = "https://learn.microsoft.com/openapi/kiota/" -packages = [{include = "kiota_authentication_azure"}] +requires-python = ">=3.10" +dependencies = [ + "aiohttp>=3.8.0", + "azure-core>=1.21.1", + "microsoft-kiota-abstractions>=1.10.2,<2.0.0", + "opentelemetry-api>=1.27.0", + "opentelemetry-sdk>=1.27.0", +] -[tool.poetry.dependencies] -python = ">=3.10,<4.0" -aiohttp = ">=3.8.0" -azure-core = ">=1.21.1" -microsoft-kiota-abstractions = {path="../../abstractions/", develop=true} -opentelemetry-api = ">=1.27.0" -opentelemetry-sdk = ">=1.27.0" +[project.urls] +Homepage = "https://github.com/microsoft/kiota#readme" +Repository = "https://github.com/microsoft/kiota-python" +Documentation = "https://learn.microsoft.com/openapi/kiota/" -[tool.poetry.group.dev.dependencies] -yapf = ">=0.40.2,<0.44.0" -isort = ">=5.13.2,<9.0.0" -pylint = ">=3.2.7,<5.0.0" -mypy = ">=1.11.2,<3.0.0" -pytest = ">=8.3.2,<10.0.0" -pytest-asyncio = ">=0.24,<1.4" -pytest-mock = "^3.14.0" -poetry-plugin-mono-repo-deps = ">=0.2.1,<0.4.0" +[tool.flit.module] +name = "kiota_authentication_azure" -[mypy] +[tool.mypy] warn_unused_configs = true files = "kiota_authentication_azure" @@ -53,8 +47,4 @@ each_dict_entry_on_separate_line = true column_limit = 100 [tool.isort] -profile = "hug" - -[tool.poetry-monorepo.deps] -enabled = true -commands = ["build", "export", "publish"] \ No newline at end of file +profile = "hug" \ No newline at end of file diff --git a/packages/authentication/azure/requirements-dev.txt b/packages/authentication/azure/requirements-dev.txt new file mode 100644 index 0000000..6dec3bf --- /dev/null +++ b/packages/authentication/azure/requirements-dev.txt @@ -0,0 +1,9 @@ +-e ../../abstractions +-e . +yapf>=0.40.2,<0.44.0 +isort>=5.13.2,<9.0.0 +pylint>=3.2.7,<5.0.0 +mypy>=1.11.2,<3.0.0 +pytest>=8.3.2,<10.0.0 +pytest-asyncio>=0.24,<1.4 +pytest-mock>=3.14.0,<4.0.0 diff --git a/packages/bundle/pyproject.toml b/packages/bundle/pyproject.toml index 0131aed..767f05b 100644 --- a/packages/bundle/pyproject.toml +++ b/packages/bundle/pyproject.toml @@ -1,13 +1,13 @@ [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["flit_core>=3.2,<4"] +build-backend = "flit_core.buildapi" -[tool.poetry] +[project] name = "microsoft-kiota-bundle" version = "1.10.2" description = "Bundle package for kiota generated libraries in Python" -authors = ["Microsoft "] -license = "MIT" +authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] +license = {text = "MIT"} readme = "README.md" keywords = ["kiota", "openAPI", "Microsoft", "Graph"] classifiers = [ @@ -19,30 +19,25 @@ classifiers = [ "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", ] -homepage = "https://github.com/microsoft/kiota#readme" -repository = "https://github.com/microsoft/kiota-python" -documentation = "https://learn.microsoft.com/openapi/kiota/" -packages = [{include = "kiota_bundle"}] +requires-python = ">=3.10" +dependencies = [ + "microsoft-kiota-abstractions>=1.10.2,<2.0.0", + "microsoft-kiota-http>=1.10.2,<2.0.0", + "microsoft-kiota-serialization-json>=1.10.2,<2.0.0", + "microsoft-kiota-serialization-form>=1.10.2,<2.0.0", + "microsoft-kiota-serialization-text>=1.10.2,<2.0.0", + "microsoft-kiota-serialization-multipart>=1.10.2,<2.0.0", +] -[tool.poetry.dependencies] -python = ">=3.10,<4.0" -microsoft-kiota-abstractions = {path="../../packages/abstractions/", develop=true} -microsoft-kiota-http = {path="../../packages/http/httpx/", develop=true} -microsoft-kiota-serialization-json = {path="../../packages/serialization/json/", develop=true} -microsoft-kiota-serialization-form = {path="../../packages/serialization/form/", develop=true} -microsoft-kiota-serialization-text = {path="../../packages/serialization/text/", develop=true} -microsoft-kiota-serialization-multipart = {path="../../packages/serialization/multipart/", develop=true} +[project.urls] +Homepage = "https://github.com/microsoft/kiota#readme" +Repository = "https://github.com/microsoft/kiota-python" +Documentation = "https://learn.microsoft.com/openapi/kiota/" -[tool.poetry.group.dev.dependencies] -yapf = "^0.40.2" -isort = "^5.13.2" -pylint = "^3.2.7" -mypy = "^1.11.2" -pytest = "^8.3.2" -pytest-asyncio = "^0.24.0" -poetry-plugin-mono-repo-deps = "^0.2.1" +[tool.flit.module] +name = "kiota_bundle" -[mypy] +[tool.mypy] warn_unused_configs = true files = "kiota_bundle" @@ -53,8 +48,4 @@ each_dict_entry_on_separate_line = true column_limit = 100 [tool.isort] -profile = "hug" - -[tool.poetry-monorepo.deps] -enabled = true -commands = ["build", "export", "publish"] \ No newline at end of file +profile = "hug" \ No newline at end of file diff --git a/packages/bundle/requirements-dev.txt b/packages/bundle/requirements-dev.txt new file mode 100644 index 0000000..175c439 --- /dev/null +++ b/packages/bundle/requirements-dev.txt @@ -0,0 +1,13 @@ +-e ../abstractions +-e ../http/httpx +-e ../serialization/json +-e ../serialization/form +-e ../serialization/text +-e ../serialization/multipart +-e . +yapf>=0.40.2,<0.44.0 +isort>=5.13.2,<9.0.0 +pylint>=3.2.7,<5.0.0 +mypy>=1.11.2,<3.0.0 +pytest>=8.3.2,<10.0.0 +pytest-asyncio>=0.24,<1.4 diff --git a/packages/http/httpx/pyproject.toml b/packages/http/httpx/pyproject.toml index 3b8fd20..838919f 100644 --- a/packages/http/httpx/pyproject.toml +++ b/packages/http/httpx/pyproject.toml @@ -1,13 +1,13 @@ [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["flit_core>=3.2,<4"] +build-backend = "flit_core.buildapi" -[tool.poetry] +[project] name = "microsoft-kiota-http" version = "1.10.2" description = "Core abstractions for kiota generated libraries in Python" -authors = ["Microsoft "] -license = "MIT" +authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] +license = {text = "MIT"} readme = "README.md" keywords = ["kiota", "openAPI", "Microsoft", "Graph"] classifiers = [ @@ -19,27 +19,21 @@ classifiers = [ "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", ] -homepage = "https://github.com/microsoft/kiota#readme" -repository = "https://github.com/microsoft/kiota-python" -documentation = "https://learn.microsoft.com/openapi/kiota/" -packages = [{include = "kiota_http"}] +requires-python = ">=3.10" +dependencies = [ + "microsoft-kiota-abstractions>=1.10.2,<2.0.0", + "opentelemetry-api>=1.27.0", + "opentelemetry-sdk>=1.27.0", + "httpx[http2]>=0.25,<1.0.0", +] -[tool.poetry.dependencies] -python = ">=3.10,<4.0" -microsoft-kiota-abstractions = {path="../../abstractions/", develop=true} -opentelemetry-api = ">=1.27.0" -opentelemetry-sdk = ">=1.27.0" -httpx = {extras = ["http2"], version = ">=0.25,<1.0.0"} +[project.urls] +Homepage = "https://github.com/microsoft/kiota#readme" +Repository = "https://github.com/microsoft/kiota-python" +Documentation = "https://learn.microsoft.com/openapi/kiota/" -[tool.poetry.group.dev.dependencies] -yapf = ">=0.40.2,<0.44.0" -isort = ">=5.13.2,<9.0.0" -pylint = ">=3.2.7,<5.0.0" -mypy = ">=1.11.2,<3.0.0" -pytest = ">=8.3.2,<10.0.0" -pytest-asyncio = ">=0.24,<1.4" -pytest-mock = "^3.14.0" -poetry-plugin-mono-repo-deps = ">=0.2.1,<0.4.0" +[tool.flit.module] +name = "kiota_http" [tool.mypy] warn_unused_configs = true @@ -52,8 +46,4 @@ each_dict_entry_on_separate_line = true column_limit = 100 [tool.isort] -profile = "hug" - -[tool.poetry-monorepo.deps] -enabled = true -commands = ["build", "export", "publish"] \ No newline at end of file +profile = "hug" \ No newline at end of file diff --git a/packages/http/httpx/requirements-dev.txt b/packages/http/httpx/requirements-dev.txt new file mode 100644 index 0000000..6dec3bf --- /dev/null +++ b/packages/http/httpx/requirements-dev.txt @@ -0,0 +1,9 @@ +-e ../../abstractions +-e . +yapf>=0.40.2,<0.44.0 +isort>=5.13.2,<9.0.0 +pylint>=3.2.7,<5.0.0 +mypy>=1.11.2,<3.0.0 +pytest>=8.3.2,<10.0.0 +pytest-asyncio>=0.24,<1.4 +pytest-mock>=3.14.0,<4.0.0 diff --git a/packages/serialization/form/pyproject.toml b/packages/serialization/form/pyproject.toml index 084b424..c3d6099 100644 --- a/packages/serialization/form/pyproject.toml +++ b/packages/serialization/form/pyproject.toml @@ -1,13 +1,13 @@ [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["flit_core>=3.2,<4"] +build-backend = "flit_core.buildapi" -[tool.poetry] +[project] name = "microsoft-kiota-serialization-form" version = "1.10.2" description = "Core abstractions for kiota generated libraries in Python" -authors = ["Microsoft "] -license = "MIT" +authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] +license = {text = "MIT"} readme = "README.md" keywords = ["kiota", "openAPI", "Microsoft", "Graph"] classifiers = [ @@ -19,24 +19,18 @@ classifiers = [ "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", ] -homepage = "https://github.com/microsoft/kiota#readme" -repository = "https://github.com/microsoft/kiota-python" -documentation = "https://learn.microsoft.com/openapi/kiota/" -packages = [{include = "kiota_serialization_form"}] +requires-python = ">=3.10" +dependencies = [ + "microsoft-kiota-abstractions>=1.10.2,<2.0.0", +] -[tool.poetry.dependencies] -python = ">=3.10,<4.0" -microsoft-kiota-abstractions = {path="../../abstractions/", develop=true} +[project.urls] +Homepage = "https://github.com/microsoft/kiota#readme" +Repository = "https://github.com/microsoft/kiota-python" +Documentation = "https://learn.microsoft.com/openapi/kiota/" -[tool.poetry.group.dev.dependencies] -yapf = ">=0.40.2,<0.44.0" -isort = ">=5.13.2,<9.0.0" -pylint = ">=3.2.7,<5.0.0" -mypy = ">=1.11.2,<3.0.0" -pytest = ">=8.3.2,<10.0.0" -pytest-asyncio = ">=0.24,<1.4" -poetry-plugin-mono-repo-deps = ">=0.2.1,<0.4.0" -types-python-dateutil = "^2.9.0.20240906" +[tool.flit.module] +name = "kiota_serialization_form" [tool.mypy] warn_unused_configs = true @@ -49,8 +43,4 @@ each_dict_entry_on_separate_line = true column_limit = 100 [tool.isort] -profile = "hug" - -[tool.poetry-monorepo.deps] -enabled = true -commands = ["build", "export", "publish"] +profile = "hug" \ No newline at end of file diff --git a/packages/serialization/form/requirements-dev.txt b/packages/serialization/form/requirements-dev.txt new file mode 100644 index 0000000..e293f1b --- /dev/null +++ b/packages/serialization/form/requirements-dev.txt @@ -0,0 +1,9 @@ +-e ../../abstractions +-e . +yapf>=0.40.2,<0.44.0 +isort>=5.13.2,<9.0.0 +pylint>=3.2.7,<5.0.0 +mypy>=1.11.2,<3.0.0 +pytest>=8.3.2,<10.0.0 +pytest-asyncio>=0.24,<1.4 +types-python-dateutil>=2.9.0.20240906,<3.0.0 diff --git a/packages/serialization/json/pyproject.toml b/packages/serialization/json/pyproject.toml index 220b222..e51f219 100644 --- a/packages/serialization/json/pyproject.toml +++ b/packages/serialization/json/pyproject.toml @@ -1,13 +1,13 @@ [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["flit_core>=3.2,<4"] +build-backend = "flit_core.buildapi" -[tool.poetry] +[project] name = "microsoft-kiota-serialization-json" version = "1.10.2" description = "Core abstractions for kiota generated libraries in Python" -authors = ["Microsoft "] -license = "MIT" +authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] +license = {text = "MIT"} readme = "README.md" keywords = ["kiota", "openAPI", "Microsoft", "Graph"] classifiers = [ @@ -19,23 +19,18 @@ classifiers = [ "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", ] -homepage = "https://github.com/microsoft/kiota#readme" -repository = "https://github.com/microsoft/kiota-python" -documentation = "https://learn.microsoft.com/openapi/kiota/" -packages = [{include = "kiota_serialization_json"}] +requires-python = ">=3.10" +dependencies = [ + "microsoft-kiota-abstractions>=1.10.2,<2.0.0", +] -[tool.poetry.dependencies] -python = ">=3.10,<4.0" -microsoft-kiota-abstractions = {path="../../abstractions/", develop=true} +[project.urls] +Homepage = "https://github.com/microsoft/kiota#readme" +Repository = "https://github.com/microsoft/kiota-python" +Documentation = "https://learn.microsoft.com/openapi/kiota/" -[tool.poetry.group.dev.dependencies] -yapf = ">=0.40.2,<0.44.0" -isort = ">=5.13.2,<9.0.0" -pylint = ">=3.2.7,<5.0.0" -mypy = ">=1.11.2,<3.0.0" -pytest = ">=8.3.2,<10.0.0" -pytest-asyncio = ">=0.24,<1.4" -poetry-plugin-mono-repo-deps = ">=0.2.1,<0.4.0" +[tool.flit.module] +name = "kiota_serialization_json" [tool.mypy] warn_unused_configs = true @@ -48,8 +43,4 @@ each_dict_entry_on_separate_line = true column_limit = 100 [tool.isort] -profile = "hug" - -[tool.poetry-monorepo.deps] -enabled = true -commands = ["build", "export", "publish"] +profile = "hug" \ No newline at end of file diff --git a/packages/serialization/json/requirements-dev.txt b/packages/serialization/json/requirements-dev.txt new file mode 100644 index 0000000..c0eb1ac --- /dev/null +++ b/packages/serialization/json/requirements-dev.txt @@ -0,0 +1,8 @@ +-e ../../abstractions +-e . +yapf>=0.40.2,<0.44.0 +isort>=5.13.2,<9.0.0 +pylint>=3.2.7,<5.0.0 +mypy>=1.11.2,<3.0.0 +pytest>=8.3.2,<10.0.0 +pytest-asyncio>=0.24,<1.4 diff --git a/packages/serialization/multipart/pyproject.toml b/packages/serialization/multipart/pyproject.toml index f4455d7..3a2901c 100644 --- a/packages/serialization/multipart/pyproject.toml +++ b/packages/serialization/multipart/pyproject.toml @@ -1,13 +1,13 @@ [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["flit_core>=3.2,<4"] +build-backend = "flit_core.buildapi" -[tool.poetry] +[project] name = "microsoft-kiota-serialization-multipart" version = "1.10.2" description = "Core abstractions for kiota generated libraries in Python" -authors = ["Microsoft "] -license = "MIT" +authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] +license = {text = "MIT"} readme = "README.md" keywords = ["kiota", "openAPI", "Microsoft", "Graph"] classifiers = [ @@ -19,24 +19,18 @@ classifiers = [ "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", ] -homepage = "https://github.com/microsoft/kiota#readme" -repository = "https://github.com/microsoft/kiota-python" -documentation = "https://learn.microsoft.com/openapi/kiota/" -packages = [{include = "kiota_serialization_multipart"}] +requires-python = ">=3.10" +dependencies = [ + "microsoft-kiota-abstractions>=1.10.2,<2.0.0", +] -[tool.poetry.dependencies] -python = ">=3.10,<4.0" -microsoft-kiota-abstractions = {path="../../abstractions/", develop=true} +[project.urls] +Homepage = "https://github.com/microsoft/kiota#readme" +Repository = "https://github.com/microsoft/kiota-python" +Documentation = "https://learn.microsoft.com/openapi/kiota/" -[tool.poetry.group.dev.dependencies] -yapf = "^0.40.2" -isort = "^5.13.2" -pylint = "^3.2.7" -mypy = "^1.11.2" -pytest = "^8.3.2" -pytest-asyncio = "^0.24.0" -poetry-plugin-mono-repo-deps = "^0.2.1" -microsoft-kiota-serialization-json = {path="../json/", develop=true} +[tool.flit.module] +name = "kiota_serialization_multipart" [tool.mypy] warn_unused_configs = true @@ -49,8 +43,4 @@ each_dict_entry_on_separate_line = true column_limit = 100 [tool.isort] -profile = "hug" - -[tool.poetry-monorepo.deps] -enabled = true -commands = ["build", "export", "publish"] \ No newline at end of file +profile = "hug" \ No newline at end of file diff --git a/packages/serialization/multipart/requirements-dev.txt b/packages/serialization/multipart/requirements-dev.txt new file mode 100644 index 0000000..f27a188 --- /dev/null +++ b/packages/serialization/multipart/requirements-dev.txt @@ -0,0 +1,9 @@ +-e ../../abstractions +-e ../json +-e . +yapf>=0.40.2,<0.44.0 +isort>=5.13.2,<9.0.0 +pylint>=3.2.7,<5.0.0 +mypy>=1.11.2,<3.0.0 +pytest>=8.3.2,<10.0.0 +pytest-asyncio>=0.24,<1.4 diff --git a/packages/serialization/text/pyproject.toml b/packages/serialization/text/pyproject.toml index 1357373..0496477 100644 --- a/packages/serialization/text/pyproject.toml +++ b/packages/serialization/text/pyproject.toml @@ -1,13 +1,13 @@ [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["flit_core>=3.2,<4"] +build-backend = "flit_core.buildapi" -[tool.poetry] +[project] name = "microsoft-kiota-serialization-text" version = "1.10.2" description = "Core abstractions for kiota generated libraries in Python" -authors = ["Microsoft "] -license = "MIT" +authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] +license = {text = "MIT"} readme = "README.md" keywords = ["kiota", "openAPI", "Microsoft", "Graph"] classifiers = [ @@ -19,23 +19,18 @@ classifiers = [ "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", ] -homepage = "https://github.com/microsoft/kiota#readme" -repository = "https://github.com/microsoft/kiota-python" -documentation = "https://learn.microsoft.com/openapi/kiota/" -packages = [{include = "kiota_serialization_text"}] +requires-python = ">=3.10" +dependencies = [ + "microsoft-kiota-abstractions>=1.10.2,<2.0.0", +] -[tool.poetry.dependencies] -python = ">=3.10,<4.0" -microsoft-kiota-abstractions = {path="../../abstractions/", develop=true} +[project.urls] +Homepage = "https://github.com/microsoft/kiota#readme" +Repository = "https://github.com/microsoft/kiota-python" +Documentation = "https://learn.microsoft.com/openapi/kiota/" -[tool.poetry.group.dev.dependencies] -yapf = ">=0.40.2,<0.44.0" -isort = ">=5.13.2,<9.0.0" -pylint = ">=3.2.7,<5.0.0" -mypy = ">=1.11.2,<3.0.0" -pytest = ">=8.3.2,<10.0.0" -pytest-asyncio = ">=0.24,<1.4" -poetry-plugin-mono-repo-deps = ">=0.2.1,<0.4.0" +[tool.flit.module] +name = "kiota_serialization_text" [tool.mypy] warn_unused_configs = true @@ -48,8 +43,4 @@ each_dict_entry_on_separate_line = true column_limit = 100 [tool.isort] -profile = "hug" - -[tool.poetry-monorepo.deps] -enabled = true -commands = ["build", "export", "publish"] \ No newline at end of file +profile = "hug" \ No newline at end of file diff --git a/packages/serialization/text/requirements-dev.txt b/packages/serialization/text/requirements-dev.txt new file mode 100644 index 0000000..c0eb1ac --- /dev/null +++ b/packages/serialization/text/requirements-dev.txt @@ -0,0 +1,8 @@ +-e ../../abstractions +-e . +yapf>=0.40.2,<0.44.0 +isort>=5.13.2,<9.0.0 +pylint>=3.2.7,<5.0.0 +mypy>=1.11.2,<3.0.0 +pytest>=8.3.2,<10.0.0 +pytest-asyncio>=0.24,<1.4 diff --git a/requirements_dev.txt b/requirements_dev.txt index 74ce4cb..e6fe96a 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,2 +1 @@ pylint==3.2.7 -poetry-plugin-mono-repo-deps==0.3.0 diff --git a/tests/validation/pyproject.toml b/tests/validation/pyproject.toml index 7a037aa..62618ff 100644 --- a/tests/validation/pyproject.toml +++ b/tests/validation/pyproject.toml @@ -1,51 +1,6 @@ -[build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" - -[tool.poetry] -name = "validation-client" -version = "1.3.4" -package-mode = false -description = "Core abstractions for kiota generated libraries in Python" -authors = ["Microsoft "] -license = "MIT" -readme = "README.md" -keywords = ["kiota", "openAPI", "Microsoft", "Graph"] -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", - "License :: OSI Approved :: MIT License", -] -homepage = "https://github.com/microsoft/kiota#readme" -repository = "https://github.com/microsoft/kiota-python" -documentation = "https://learn.microsoft.com/openapi/kiota/" -packages = [{include = "kiota_abstractions"}] - -[tool.poetry.dependencies] -python = ">=3.10,<4.0" -microsoft-kiota-abstractions = {path="../../packages/abstractions/", develop=true} -microsoft-kiota-http = {path="../../packages/http/httpx/", develop=true} -microsoft-kiota-serialization-json = {path="../../packages/serialization/json/", develop=true} -microsoft-kiota-serialization-form = {path="../../packages/serialization/form/", develop=true} -microsoft-kiota-serialization-text = {path="../../packages/serialization/text/", develop=true} -microsoft-kiota-serialization-multipart = {path="../../packages/serialization/multipart/", develop=true} - -[tool.poetry.group.dev.dependencies] -yapf = "^0.40.2" -isort = "^5.13.2" -pylint = "^3.2.7" -mypy = "^1.11.2" -pytest = "^8.3.2" -pytest-asyncio = "^0.24.0" -poetry-plugin-mono-repo-deps = "^0.2.1" - -[mypy] +[tool.mypy] warn_unused_configs = true -files = "kiota_abstractions" +files = "validation" [tool.yapf] based_on_style = "pep8" @@ -54,8 +9,4 @@ each_dict_entry_on_separate_line = true column_limit = 100 [tool.isort] -profile = "hug" - -[tool.poetry-monorepo.deps] -enabled = true -commands = ["build", "export", "publish"] \ No newline at end of file +profile = "hug" \ No newline at end of file diff --git a/tests/validation/requirements-dev.txt b/tests/validation/requirements-dev.txt new file mode 100644 index 0000000..54c0c17 --- /dev/null +++ b/tests/validation/requirements-dev.txt @@ -0,0 +1,7 @@ +-e ../../packages/abstractions +-e ../../packages/http/httpx +-e ../../packages/serialization/json +-e ../../packages/serialization/form +-e ../../packages/serialization/text +-e ../../packages/serialization/multipart +mypy>=1.11.2,<3.0.0