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
23 changes: 1 addition & 22 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ inputs:
python-version:
description: 'Python version'
default: '3.13'
index-username:
description: 'Username for the PyPI index'
default: ''
index-token:
description: 'Auth token for the PyPI index'
default: ''

runs:
using: composite
steps:
Expand All @@ -43,18 +36,4 @@ runs:
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 #v8.2.0
- name: Install dependencies
shell: bash
env:
INDEX_USERNAME: ${{ inputs.index-username }}
INDEX_TOKEN: ${{ inputs.index-token }}
IS_FORK: ${{ github.event.pull_request.head.repo.fork == true }}
run: |
if [[ "$IS_FORK" == "true" ]]; then
echo "Fork detected — syncing from PyPI without lockfile"
UV_INDEX_URL="https://pypi.org/simple/" \
uv sync --all-packages --all-extras
else
echo "Syncing from Artifactory with lockfile"
UV_INDEX_ARTIFACTORY_USERNAME="${INDEX_USERNAME}" \
UV_INDEX_ARTIFACTORY_PASSWORD="${INDEX_TOKEN}" \
uv sync --all-packages --all-extras --locked
fi
run: uv sync --all-packages --all-extras --locked
2 changes: 0 additions & 2 deletions .github/workflows/auto-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
token: ${{ steps.app-token.outputs.token }}
persist-credentials: true
ref: ${{ github.head_ref }}
index-username: ${{ secrets.ARTIFACTORY_USERNAME }}
index-token: ${{ secrets.ARTIFACTORY_TOKEN }}

- name: Configure git
env:
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: SAP/ai-sdk-python/.github/actions/setup@main
with:
index-username: ${{ secrets.ARTIFACTORY_USERNAME }}
index-token: ${{ secrets.ARTIFACTORY_TOKEN }}

- name: Run pylint
run: |
Expand Down Expand Up @@ -54,8 +51,6 @@ jobs:
- uses: SAP/ai-sdk-python/.github/actions/setup@main
with:
python-version: ${{ matrix.python-version }}
index-username: ${{ secrets.ARTIFACTORY_USERNAME }}
index-token: ${{ secrets.ARTIFACTORY_TOKEN }}

- name: Run unit tests with coverage
id: run-tests
Expand All @@ -78,9 +73,6 @@ jobs:
github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: SAP/ai-sdk-python/.github/actions/setup@main
with:
index-username: ${{ secrets.ARTIFACTORY_USERNAME }}
index-token: ${{ secrets.ARTIFACTORY_TOKEN }}

- name: Run base integration tests
env:
Expand Down Expand Up @@ -114,9 +106,6 @@ jobs:
github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: SAP/ai-sdk-python/.github/actions/setup@main
with:
index-username: ${{ secrets.ARTIFACTORY_USERNAME }}
index-token: ${{ secrets.ARTIFACTORY_TOKEN }}

- name: Run core integration tests
env:
Expand Down Expand Up @@ -155,9 +144,6 @@ jobs:
github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: SAP/ai-sdk-python/.github/actions/setup@main
with:
index-username: ${{ secrets.ARTIFACTORY_USERNAME }}
index-token: ${{ secrets.ARTIFACTORY_TOKEN }}

- name: Run gen integration tests
env:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
uses: SAP/ai-sdk-python/.github/actions/setup@main
with:
ref: ${{ github.ref_name }}
index-username: ${{ secrets.ARTIFACTORY_USERNAME }}
index-token: ${{ secrets.ARTIFACTORY_TOKEN }}

- name: Make HTML
working-directory: packages/gen/docs
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,11 @@ jobs:
permissions:
id-token: write
contents: read
env:
UV_INDEX_ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
UV_INDEX_ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_TOKEN }}

steps:
- uses: SAP/ai-sdk-python/.github/actions/setup@main
with:
fetch-depth: 0
index-username: ${{ secrets.ARTIFACTORY_USERNAME }}
index-token: ${{ secrets.ARTIFACTORY_TOKEN }}

- name: Bump versions
run: |
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/teardown-integration-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: SAP/ai-sdk-python/.github/actions/setup@main
with:
index-username: ${{ secrets.ARTIFACTORY_USERNAME }}
index-token: ${{ secrets.ARTIFACTORY_TOKEN }}

- name: Tear down integration test environment
run: bash scripts/teardown-integration-env.sh
5 changes: 2 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
- [x] remove all "requires more effort to fix" from zizmor
- [x] make repo compliant
- [ ] setup trusted publishing with PyPI
- [ ] replace Artifactory tokens with ones from the team
- [ ] ensure tear down always runs
- [x] update status checks in branch protection rules
- [ ] add `__repr__` function after code is freshly moved + `_NamedPartial` + `NoDefault`
Expand All @@ -20,6 +19,6 @@ class CredentialsValue:

after os-migration PR is merged:

- [ ] create initial version tags (and delete old incorrect ones)
- [ ] use setup action from main not os-migration
- [x] create initial version tags (and delete old incorrect ones)
- [x] use setup action from main not os-migration
- [ ] update gen version + release notes after internal version is published
14 changes: 0 additions & 14 deletions packages/gen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,6 @@ The class names have not changed i.e., you can continue to use existing code.
> [!NOTE]
> Please refer to the [Generative AI Hub SDK Documentation](https://github.wdf.sap.corp/pages/AI/generative-ai-hub-sdk)

### For SAP Internal Teams

For internal SAP teams, the latest version of the SDK is available in our private artifactory. You will need to modify your pip.conf file to point to our internal repository. Here's how your pip.conf should look like :

```conf
[global]
index-url = https://int.repositories.cloud.sap/artifactory/api/pypi/build-snapshots-pypi/simple
trusted-host = int.repositories.cloud.sap
```

This will ensure pip looks for packages in the SAP internal repository.

After setting up the pip.conf file, you can install the SDK using the same pip command mentioned in the documentation.

## Development

The main modules are located in the subfolder [proxy](https://github.wdf.sap.corp/AI/generative-ai-hub-sdk/tree/main/gen_ai_hub/proxy):
Expand Down