Mateo/lchainversion (#551)
This commit is contained in:
parent
a06b00ccc1
commit
a97450b3af
6 changed files with 22 additions and 146 deletions
17
.github/actions/setup-uv-env/action.yml
vendored
17
.github/actions/setup-uv-env/action.yml
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
76
.github/workflows/publish-langchain.yml
vendored
76
.github/workflows/publish-langchain.yml
vendored
|
|
@ -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 }}"
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
65
.github/workflows/test-langchain.yml
vendored
65
.github/workflows/test-langchain.yml
vendored
|
|
@ -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
|
||||
6
.github/workflows/test-toolkits.yml
vendored
6
.github/workflows/test-toolkits.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue