Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

remove code_style_checks and add alembic validation

Kian Jonese876dd8b36ab
diff --git a/.github/workflows/alembic-validation.yml b/.github/workflows/alembic-validation.yml
index 890a503e4..97a069904 100644
--- a/.github/workflows/alembic-validation.yml
+++ b/.github/workflows/alembic-validation.yml
@@ -30,6 +30,7 @@ jobs:
with:
files: |
apps/core/alembic/**
+ alembic/**
.github/workflows/alembic-validation.yml
test-sqlite:
@@ -40,12 +41,25 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
+
+ - name: Detect core directory
+ id: detect-core-dir
+ run: |
+ if [ -d "apps/core" ]; then
+ echo "dir=apps/core" >> $GITHUB_OUTPUT
+ echo "detected=cloud" >> $GITHUB_OUTPUT
+ else
+ echo "dir=." >> $GITHUB_OUTPUT
+ echo "detected=oss" >> $GITHUB_OUTPUT
+ fi
+ echo "Using core directory: $(cat $GITHUB_OUTPUT | grep '^dir=' | cut -d'=' -f2)"
+
- name: Install dependencies
shell: bash
- working-directory: apps/core
+ working-directory: ${{ steps.detect-core-dir.outputs.dir }}
run: uv sync --no-install-project ${{ inputs.install-args || '--extra sqlite --extra external-tools --extra dev --extra cloud-tool-sandbox' }}
- name: Test alembic migration
- working-directory: apps/core
+ working-directory: ${{ steps.detect-core-dir.outputs.dir }}
run: |
uv run alembic upgrade head
# kinda janky but I think this might not matter for sqlite?
@@ -53,7 +67,7 @@ jobs:
- name: Cleanup persistent data
if: ${{ always() }}
- working-directory: apps/core
+ working-directory: ${{ steps.detect-core-dir.outputs.dir }}
run: |
echo "Cleaning up persistent data..."
sudo rm -rf ~/.letta || true
@@ -80,12 +94,25 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
+
+ - name: Detect core directory
+ id: detect-core-dir
+ run: |
+ if [ -d "apps/core" ]; then
+ echo "dir=apps/core" >> $GITHUB_OUTPUT
+ echo "detected=cloud" >> $GITHUB_OUTPUT
+ else
+ echo "dir=." >> $GITHUB_OUTPUT
+ echo "detected=oss" >> $GITHUB_OUTPUT
+ fi
+ echo "Using core directory: $(cat $GITHUB_OUTPUT | grep '^dir=' | cut -d'=' -f2)"
+
- name: Install dependencies
shell: bash
- working-directory: apps/core
+ working-directory: ${{ steps.detect-core-dir.outputs.dir }}
run: uv sync --no-install-project ${{ inputs.install-args || '--extra postgres --extra external-tools --extra dev --extra cloud-tool-sandbox' }}
- name: Test alembic migration
- working-directory: apps/core
+ working-directory: ${{ steps.detect-core-dir.outputs.dir }}
env:
LETTA_PG_PORT: 5432
LETTA_PG_USER: postgres
diff --git a/.github/workflows/code_style_checks.yml b/.github/workflows/code_style_checks.yml
deleted file mode 100644
index 2db567491..000000000
--- a/.github/workflows/code_style_checks.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-name: Code Style Checks
-
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-
-jobs:
- style-checks:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- python-version: ["3.11"] # Removed 3.12+ as minimal sets the standard. Adjust Python version matrix if needed
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v4
- with:
- ref: ${{ github.head_ref }} # Checkout the PR branch
- fetch-depth: 0 # Fetch all history for all branches and tags
-
- - name: Set up python
- id: setup-python
- uses: actions/setup-python@v5
- with:
- python-version: ${{ matrix.python-version }}
-
- - name: Install uv
- uses: astral-sh/setup-uv@v6
- with:
- enable-cache: true
- activate-environment: true
-
- - name: Install Dependencies
- run: |
- uv sync --extra dev --extra postgres --extra external-tools
-
- - name: Validate PR Title
- if: github.event_name == 'pull_request'
- uses: amannn/action-semantic-pull-request@v5
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Run Pyright
- uses: jakebailey/pyright-action@v2
- with:
- python-version: ${{ matrix.python-version }}
- level: "error"
- continue-on-error: true
-
- - name: Run isort
- run: uv run isort --profile black --check-only --diff .
-
- - name: Run Black
- run: uv run black --check .
-
- - name: Run Autoflake
- run: uv run autoflake --remove-all-unused-imports --remove-unused-variables --in-place --recursive --ignore-init-module-imports .