diff --git a/.github/actions/setup-uv-env/action.yml b/.github/actions/setup-uv-env/action.yml index 8a07bffe..9e80f0bd 100644 --- a/.github/actions/setup-uv-env/action.yml +++ b/.github/actions/setup-uv-env/action.yml @@ -10,6 +10,14 @@ inputs: required: false description: "Whether this is a toolkit package" default: "false" + is-contrib: + required: false + description: "Whether this is a contrib package" + default: "false" + is-lib: + required: false + description: "Whether this is a library package" + default: "false" working-directory: required: false description: "Working directory for the installation (used for toolkits)" @@ -19,15 +27,16 @@ runs: using: "composite" steps: - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@v6 with: + working-directory: ${{ inputs.working-directory }} python-version: ${{ inputs.python-version }} - - name: Install toolkit dependencies - if: inputs.is-toolkit == 'true' + - name: Install package dependencies + if: inputs.is-toolkit == 'true' || inputs.is-contrib == 'true' working-directory: ${{ inputs.working-directory }} run: | - echo "Installing toolkit dependencies for ${{ inputs.working-directory }}" + echo "Installing dependencies for ${{ inputs.working-directory }}" make install shell: bash diff --git a/.github/workflows/publish-langchain.yml b/.github/workflows/publish-langchain.yml deleted file mode 100644 index b356056a..00000000 --- a/.github/workflows/publish-langchain.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Publish LangChain Arcade - -on: - workflow_dispatch: - inputs: - version: - description: "Version to release (leave empty to use version from pyproject.toml)" - required: false - -jobs: - test-and-publish: - runs-on: ubuntu-latest - permissions: - contents: write - packages: write - id-token: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up the environment - uses: ./.github/actions/setup-uv-env - with: - python-version: "3.11" - working-directory: contrib/langchain - - - name: Test LangChain Arcade - working-directory: contrib/langchain - run: | - make install - make check - make test - - - name: Set version if provided - if: inputs.version != '' - working-directory: contrib/langchain - run: | - uv version ${{ inputs.version }} - - - name: Build release distributions - working-directory: contrib/langchain - run: | - VERSION=$(uv version --short) - echo "VERSION=$VERSION" >> $GITHUB_ENV - - uv build --out-dir dist | tee build.log - - # Verify build artifacts - ls -la dist/ - echo "Built artifacts for langchain_arcade v${{ env.VERSION }}" - - - name: Upload release distributions - uses: actions/upload-artifact@v4 - with: - name: release-dists-langchain_arcade-${{ env.VERSION }} - path: dist/ - - - name: Publish release distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - - - name: Send status to Slack - if: always() - uses: slackapi/slack-github-action@v2.0.0 - with: - webhook: ${{ secrets.PACKAGE_RELEASE_SLACK_WEBHOOK_URL }} - webhook-type: webhook-trigger - payload: | - { - "status": "${{ job.status == 'failure' || job.status == 'cancelled' && 'Failed' || 'Success' }}", - "package": "langchain_arcade", - "version": "${{ env.VERSION }}", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - } diff --git a/.github/workflows/release-on-version-change.yml b/.github/workflows/release-on-version-change.yml index 07331eac..8b6e8d47 100644 --- a/.github/workflows/release-on-version-change.yml +++ b/.github/workflows/release-on-version-change.yml @@ -81,6 +81,8 @@ jobs: with: python-version: "3.10" is-toolkit: ${{ startsWith(matrix.package, 'toolkits/') }} + is-contrib: ${{ startsWith(matrix.package, 'contrib/') }} + is-lib: ${{ startsWith(matrix.package, 'libs/') }} working-directory: ${{ matrix.package }} - name: Run tests diff --git a/.github/workflows/test-langchain.yml b/.github/workflows/test-langchain.yml deleted file mode 100644 index 71499980..00000000 --- a/.github/workflows/test-langchain.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Test LangChain Arcade - -on: - push: - branches: - - main - paths: - - "contrib/langchain/**" - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - paths: - - "contrib/langchain/**" - -jobs: - quality: - runs-on: ubuntu-latest - steps: - - name: Check out - uses: actions/checkout@v4 - - - - name: Set up the environment - uses: ./.github/actions/setup-uv-env - with: - python-version: "3.11" - working-directory: contrib/langchain - - - name: Install - run: cd contrib/langchain && make install && make check - - test: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.10", "3.11", "3.12"] - fail-fast: false - steps: - - name: Check out - uses: actions/checkout@v4 - - - name: Set up python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Set up the environment - uses: ./.github/actions/setup-uv-env - with: - python-version: ${{ matrix.python-version }} - working-directory: contrib/langchain - - - name: Install dependencies - run: cd contrib/langchain && make install - - - name: Test & Coverage - run: | - cd contrib/langchain && make test && make coverage - - - name: Upload coverage reports to Codecov with GitHub Action on Python 3.11 - uses: codecov/codecov-action@v4.0.1 - if: ${{ matrix.python-version == '3.11' }} - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: contrib/langchain/coverage.xml - flags: langchain diff --git a/.github/workflows/test-toolkits.yml b/.github/workflows/test-toolkits.yml index 83f42edb..ed05bf57 100644 --- a/.github/workflows/test-toolkits.yml +++ b/.github/workflows/test-toolkits.yml @@ -43,6 +43,9 @@ jobs: - name: Set up the environment uses: ./.github/actions/setup-uv-env + with: + is-toolkit: "true" + working-directory: toolkits/${{ matrix.toolkit }} - name: Install toolkit dependencies working-directory: toolkits/${{ matrix.toolkit }} @@ -80,6 +83,9 @@ jobs: - name: Set up the environment uses: ./.github/actions/setup-uv-env + with: + is-toolkit: "true" + working-directory: toolkits/${{ matrix.toolkit }} - name: Install toolkit dependencies working-directory: toolkits/${{ matrix.toolkit }} diff --git a/contrib/langchain/pyproject.toml b/contrib/langchain/pyproject.toml index 10b2d819..ac26a6c1 100644 --- a/contrib/langchain/pyproject.toml +++ b/contrib/langchain/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "langchain-arcade" -version = "1.4.1" +version = "1.4.4" description = "An integration package connecting Arcade and Langchain/LangGraph" readme = "README.md" repository = "https://github.com/arcadeai/arcade-ai/tree/main/contrib/langchain"