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
48 changes: 48 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Claude PR Assistant

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude-code-action:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude'))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude PR Action
uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
# Or use OAuth token instead:
# claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
timeout_minutes: "60"
# mode: tag # Default: responds to @claude mentions
# Optional: Restrict network access to specific domains only
# experimental_allowed_domains: |
# .anthropic.com
# .github.com
# api.github.com
# .githubusercontent.com
# bun.sh
# registry.npmjs.org
# .blob.core.windows.net
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ USER ${USERNAME}
RUN /usr/local/bin/python -m pip install --upgrade pip --no-cache-dir \
&& /usr/local/bin/python -m pip install --upgrade setuptools --no-cache-dir \
&& python3 -m venv "${POETRY_HOME}" \
&& "${POETRY_HOME}/bin/pip" install poetry --no-cache-dir \
# https://python-poetry.org/blog/announcing-poetry-1.4.0/#faster-installation-of-packages
# a somewhat breaking change was introduced in 1.4.0 that requires this config or else certain packages fail to install
# in our case it was the openai package
&& "${POETRY_HOME}/bin/poetry" config installer.modern-installation false
&& "${POETRY_HOME}/bin/pip" install poetry --no-cache-dir

# Copy poetry.lock* in case it doesn't exist in the repo
COPY --chown=${USERNAME}:${USER_GID} \
Expand Down
5 changes: 3 additions & 2 deletions alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
)

from app.db.base_class import Base # noqa
#from app.db.extensions import pgvector_ex

# from app.db.extensions import pgvector_ex
from app.db.functions import (
public_encode_uri_component,
refresh_search_view_v1_function,
Expand All @@ -42,7 +43,7 @@
[
# Extensions
# pg_cron_ex,
#pgvector_ex,
# pgvector_ex,
# Functions
update_edition_title,
update_edition_title_from_work,
Expand Down
7 changes: 4 additions & 3 deletions alembic/versions/156d8781d7b8_add_vertexai_orgin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
Create Date: 2024-06-09 18:29:19.197616

"""
from alembic import op

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision = '156d8781d7b8'
down_revision = '7dd85b891761'
revision = "156d8781d7b8"
down_revision = "7dd85b891761"
branch_labels = None
depends_on = None
old_values = """'HUMAN', 'GPT4', 'PREDICTED_NIELSEN', 'NIELSEN_CBMC', 'NIELSEN_BIC', 'NIELSEN_THEMA', 'NIELSEN_IA', 'NIELSEN_RA', 'CLUSTER_RELEVANCE', 'CLUSTER_ZAINAB', 'OTHER'"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

# revision identifiers, used by Alembic.


revision = "35112b0ae03e"
down_revision = "77c90a741ba7"
branch_labels = None
Expand Down
Loading
Loading