diff --git a/.azure-pipelines/cd-publish-python.yml b/.azure-pipelines/cd-publish-python.yml new file mode 100644 index 00000000..2a4a61b6 --- /dev/null +++ b/.azure-pipelines/cd-publish-python.yml @@ -0,0 +1,343 @@ +# 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: + 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 + image: ubuntu-latest + os: linux + sdl: + sourceAnalysisPool: + name: Azure-Pipelines-1ESPT-ExDShared + image: windows-2022 + os: windows + 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 + image: ubuntu-latest + os: linux + + steps: + - task: UsePythonVersion@0 + displayName: 'Install Python $(pythonVersion)' + inputs: + versionSpec: '$(pythonVersion)' + addToPath: true + + - script: python -m pip install --upgrade pip + displayName: 'Upgrade pip' + + - task: PipAuthenticate@1 + displayName: "Authenticate pip to Azure Artifacts" + inputs: + artifactFeeds: "$(System.TeamProject)/GraphDeveloperExperiences_Public" + + - script: pip install build + displayName: 'Install build' + + # Build and test kiota_abstractions + - script: pip install -r requirements-dev.txt + displayName: 'Install abstractions dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + - script: yapf -dr kiota_abstractions + displayName: 'Check code format - abstractions' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + - script: isort kiota_abstractions + displayName: 'Check import order - abstractions' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + - script: pylint kiota_abstractions --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - abstractions' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + - script: pytest + displayName: 'Run tests - abstractions' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + - script: python -m build + displayName: 'Build package - abstractions' + workingDirectory: '$(Build.SourcesDirectory)/packages/abstractions' + + # Build and test kiota_authentication_azure + - script: pip install -r requirements-dev.txt + displayName: 'Install authentication_azure dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + - script: yapf -dr kiota_authentication_azure + displayName: 'Check code format - authentication_azure' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + - script: isort kiota_authentication_azure + displayName: 'Check import order - authentication_azure' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + - script: pylint kiota_authentication_azure --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - authentication_azure' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + - script: pytest + displayName: 'Run tests - authentication_azure' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + - script: python -m build + displayName: 'Build package - authentication_azure' + workingDirectory: '$(Build.SourcesDirectory)/packages/authentication/azure' + + # Build and test kiota_http + - script: pip install -r requirements-dev.txt + displayName: 'Install http dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + - script: yapf -dr kiota_http + displayName: 'Check code format - http' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + - script: isort kiota_http + displayName: 'Check import order - http' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + - script: pylint kiota_http --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - http' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + - script: pytest + displayName: 'Run tests - http' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + - script: python -m build + displayName: 'Build package - http' + workingDirectory: '$(Build.SourcesDirectory)/packages/http/httpx' + + # Build and test kiota_serialization_form + - script: pip install -r requirements-dev.txt + displayName: 'Install serialization_form dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + - script: yapf -dr kiota_serialization_form + displayName: 'Check code format - serialization_form' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + - script: isort kiota_serialization_form + displayName: 'Check import order - serialization_form' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + - script: pylint kiota_serialization_form --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - serialization_form' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + - script: pytest + displayName: 'Run tests - serialization_form' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + - script: python -m build + displayName: 'Build package - serialization_form' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/form' + + # Build and test kiota_serialization_json + - script: pip install -r requirements-dev.txt + displayName: 'Install serialization_json dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + - script: yapf -dr kiota_serialization_json + displayName: 'Check code format - serialization_json' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + - script: isort kiota_serialization_json + displayName: 'Check import order - serialization_json' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + - script: pylint kiota_serialization_json --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - serialization_json' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + - script: pytest + displayName: 'Run tests - serialization_json' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + - script: python -m build + displayName: 'Build package - serialization_json' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/json' + + # Build and test kiota_serialization_text + - script: pip install -r requirements-dev.txt + displayName: 'Install serialization_text dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + - script: yapf -dr kiota_serialization_text + displayName: 'Check code format - serialization_text' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + - script: isort kiota_serialization_text + displayName: 'Check import order - serialization_text' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + - script: pylint kiota_serialization_text --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - serialization_text' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + - script: pytest + displayName: 'Run tests - serialization_text' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + - script: python -m build + displayName: 'Build package - serialization_text' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/text' + + # Build and test kiota_serialization_multipart + - script: pip install -r requirements-dev.txt + displayName: 'Install serialization_multipart dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + - script: yapf -dr kiota_serialization_multipart + displayName: 'Check code format - serialization_multipart' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + - script: isort kiota_serialization_multipart + displayName: 'Check import order - serialization_multipart' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + - script: pylint kiota_serialization_multipart --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - serialization_multipart' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + - script: pytest + displayName: 'Run tests - serialization_multipart' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + - script: python -m build + displayName: 'Build package - serialization_multipart' + workingDirectory: '$(Build.SourcesDirectory)/packages/serialization/multipart' + + # Build and test kiota_bundle + - script: pip install -r requirements-dev.txt + displayName: 'Install bundle dependencies' + workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' + + - script: yapf -dr kiota_bundle + displayName: 'Check code format - bundle' + workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' + + - script: isort kiota_bundle + displayName: 'Check import order - bundle' + workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' + + - script: pylint kiota_bundle --disable=W --rcfile=.pylintrc + displayName: 'Lint with Pylint - bundle' + workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' + + - script: pytest + displayName: 'Run tests - bundle' + workingDirectory: '$(Build.SourcesDirectory)/packages/bundle' + + - script: python -m 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: pypi_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' + 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 65b882c2..9cb766e2 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/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 09c5c15b..00000000 --- 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 diff --git a/.vscode/settings.json b/.vscode/settings.json index 790145ea..36dc615f 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", @@ -17,4 +15,5 @@ ], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": false, // Disable pytest (does not work with poetry yet) + "azure-pipelines.1ESPipelineTemplatesSchemaFile": true } \ No newline at end of file diff --git a/packages/abstractions/pyproject.toml b/packages/abstractions/pyproject.toml index e0336871..307ac9c7 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 00000000..f19e94f4 --- /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 6b3b6275..d765ac57 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 00000000..6dec3bf1 --- /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 0131aede..767f05b0 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 00000000..175c4393 --- /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 3b8fd209..838919f2 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 00000000..6dec3bf1 --- /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 084b4240..c3d60992 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 00000000..e293f1bd --- /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 220b2224..e51f219a 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 00000000..c0eb1acf --- /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 f4455d77..3a2901cf 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 00000000..f27a1880 --- /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 1357373a..04964772 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 00000000..c0eb1acf --- /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 74ce4cb1..e6fe96a1 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 7a037aaa..62618ffd 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 00000000..54c0c174 --- /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