Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
version: 2
updates:
# Python pip dependencies
# Non-major (minor + patch) version updates are batched into one grouped PR;
# majors are left ungrouped so each breaking bump lands in its own PR for
# review. Security updates (enabled in repo settings) come as a separate
# grouped PR of their own
# Python pip dependencies - security updates only
# Regular version updates are disabled because we use compatible release
# constraints (~=) in pyproject.toml to pin patch versions.
# Dependabot Security Updates (enabled in repo settings) bypass these rules.
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
groups:
version-minor-patch:
patterns:
- "*"
# Ignore all regular version updates - security updates still come through
ignore:
- dependency-name: "*"
update-types:
- "minor"
- "patch"
security:
applies-to: security-updates
patterns:
- "*"
labels:
- "dependencies"
- "version-update:semver-major"
- "version-update:semver-minor"
- "version-update:semver-patch"
# Commit message configuration
commit-message:
prefix: "chore"
Expand All @@ -46,11 +39,6 @@ updates:
labels:
- "dependencies"
- "github-actions"
# Batch all Actions bumps (including majors) into one PR
groups:
github-actions:
patterns:
- "*"
commit-message:
prefix: "chore"
include: "scope"
47 changes: 0 additions & 47 deletions .github/scripts/check_version_bump.py

This file was deleted.

56 changes: 0 additions & 56 deletions .github/scripts/validate_prerelease.py

This file was deleted.

27 changes: 13 additions & 14 deletions .github/workflows/check-version-bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,29 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"

- name: Install version comparison dependency
run: python -m pip install packaging

- name: Check that version was bumped if src/ was modified
run: |
BASE_SHA="${{ github.event.pull_request.base.sha }}"
HEAD_SHA="${{ github.event.pull_request.head.sha }}"
MERGE_BASE=$(git merge-base "$BASE_SHA" "$HEAD_SHA")

CHANGED_FILES=$(git diff --name-only "$MERGE_BASE" "$HEAD_SHA")
CHANGED_FILES=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")

if echo "$CHANGED_FILES" | grep -qE "^src/.*\.(py|pyi|proto)$"; then
BASE_VERSION=$(git show "$MERGE_BASE:pyproject.toml" | grep "^version = " | cut -d'"' -f2)
BASE_VERSION=$(git show "$BASE_SHA:pyproject.toml" | grep "^version = " | cut -d'"' -f2)
HEAD_VERSION=$(git show "$HEAD_SHA:pyproject.toml" | grep "^version = " | cut -d'"' -f2)

# Use PEP 440 ordering because sort -V ranks RCs above final releases
python .github/scripts/check_version_bump.py \
"$BASE_VERSION" "$HEAD_VERSION"
if [ "$BASE_VERSION" = "$HEAD_VERSION" ]; then
echo "ERROR: Source files under src/ were modified but the version in pyproject.toml was not bumped (still $HEAD_VERSION)."
exit 1
fi

HIGHER=$(printf '%s\n' "$BASE_VERSION" "$HEAD_VERSION" | sort -V | tail -1)
if [ "$HIGHER" != "$HEAD_VERSION" ]; then
echo "ERROR: Version regression detected. Base is $BASE_VERSION but PR has $HEAD_VERSION."
exit 1
fi

echo "Version bump OK: $BASE_VERSION → $HEAD_VERSION"
else
echo "No source file changes under src/. Version bump not required."
fi
12 changes: 2 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,13 @@ jobs:
- name: Read package name and version from pyproject.toml
id: metadata
run: |
python -m pip install toml packaging
pip install toml
PKG_NAME=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['name'])")
VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])")
echo "Publishing $PKG_NAME version $VERSION to PyPI"
echo "name=$PKG_NAME" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Validate pre-release status
env:
PACKAGE_VERSION: ${{ steps.metadata.outputs.version }}
RELEASE_IS_PRERELEASE: ${{ github.event.release.prerelease }}
run: |
python .github/scripts/validate_prerelease.py \
"$PACKAGE_VERSION" "$RELEASE_IS_PRERELEASE"

- name: Check if version already exists on PyPI
run: |
PKG_NAME="${{ steps.metadata.outputs.name }}"
Expand All @@ -65,4 +57,4 @@ jobs:
run: uv build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.14.2
uses: pypa/gh-action-pypi-publish@v1.14.0
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[project]
name = "sap-cloud-sdk"

version = "0.53.1"
description = "SAP Cloud SDK for Python"
readme = "README.md"
Expand Down
20 changes: 17 additions & 3 deletions src/sap_cloud_sdk/adms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,20 @@
)
from sap_cloud_sdk.adms._models import (
AllowedDomain,
ApplicationTenant,
BaseType,
BusinessObjectNodeChangeLog,
BusinessObjectNodeType,
ChangeLog,
CreateAllowedDomainInput,
CreateApplicationTenantInput,
CreateBusinessObjectNodeTypeInput,
CreateDocumentTypeBoTypeMapInput,
CreateDocumentInput,
CreateDocumentRelationInput,
CreateDocumentTypeInput,
CreateFileExtensionPolicyInput,
DeleteBusinessObjectNodeResult,
DeleteUserDataJobParameters,
Document,
DocumentContentVersion,
Expand All @@ -74,6 +80,7 @@
DraftActivateInput,
DraftAdministrativeData,
DraftInput,
FileExtensionPolicy,
JobInput,
JobOutput,
JobStatus,
Expand Down Expand Up @@ -113,8 +120,11 @@
"ScanNotCleanError",
# models — core
"BaseType",
"ChangeLog",
"BusinessObjectNodeChangeLog",
"CreateDocumentInput",
"CreateDocumentRelationInput",
"DeleteBusinessObjectNodeResult",
"DeleteUserDataJobParameters",
"Document",
"DocumentContentVersion",
Expand All @@ -131,17 +141,21 @@
"ZipDownloadJobParameters",
# models — config
"AllowedDomain",
"ApplicationTenant",
"BusinessObjectNodeType",
"CreateAllowedDomainInput",
"CreateApplicationTenantInput",
"CreateBusinessObjectNodeTypeInput",
"UpdateAllowedDomainInput",
"UpdateBusinessObjectNodeTypeInput",
"UpdateDocumentTypeInput",
"CreateDocumentTypeBoTypeMapInput",
"CreateDocumentTypeInput",
"CreateFileExtensionPolicyInput",
"DocumentType",
"DocumentTypeBusinessObjectTypeMap",
"DocumentTypeText",
"FileExtensionPolicy",
"UpdateAllowedDomainInput",
"UpdateBusinessObjectNodeTypeInput",
"UpdateDocumentTypeInput",
# query options
"ConfigQueryOptions",
"DocumentQueryOptions",
Expand Down
Loading