diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index f0d9b491..bff3186b 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -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: @@ -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 diff --git a/.github/workflows/auto-doc.yml b/.github/workflows/auto-doc.yml index a8ff7e19..82fc9207 100644 --- a/.github/workflows/auto-doc.yml +++ b/.github/workflows/auto-doc.yml @@ -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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b1af86e..c4961c2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | @@ -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 @@ -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: @@ -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: @@ -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: diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index e826ff4a..d889eb29 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -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 diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml index 34f82034..f9fa0df2 100644 --- a/.github/workflows/snapshot-release.yml +++ b/.github/workflows/snapshot-release.yml @@ -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: | diff --git a/.github/workflows/teardown-integration-env.yml b/.github/workflows/teardown-integration-env.yml index 4cc5117f..bba9cd5a 100644 --- a/.github/workflows/teardown-integration-env.yml +++ b/.github/workflows/teardown-integration-env.yml @@ -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 diff --git a/TODO.md b/TODO.md index f97a526c..b7969dbc 100644 --- a/TODO.md +++ b/TODO.md @@ -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` @@ -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 diff --git a/packages/gen/README.md b/packages/gen/README.md index 6b26b2c5..52e9ea4e 100644 --- a/packages/gen/README.md +++ b/packages/gen/README.md @@ -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):