Skip to content

Commit

Permalink
Remove all Compass/Celery/Sync code
Browse files Browse the repository at this point in the history
  • Loading branch information
tianjing-li committed Sep 18, 2024
1 parent 1e5c5e0 commit 6acf4da
Show file tree
Hide file tree
Showing 60 changed files with 237 additions and 4,586 deletions.
7 changes: 0 additions & 7 deletions .env-template
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@ OIDC_WELL_KNOWN_ENDPOINT=<OIDC_WELL_KNOWN_ENDPOINT>
SCIM_USER=<SCIM_USER>
SCIM_PASSWORD=<SCIM_PASSWORD>

# Compass

COHERE_COMPASS_USERNAME=
COHERE_COMPASS_PASSWORD=
COHERE_COMPASS_API_URL=
COHERE_COMPASS_PARSER_URL=

# Google Drive

GOOGLE_DRIVE_CLIENT_ID=
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ ipython_config.py
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

Expand Down
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,3 @@ test-db:
docker compose stop test_db
docker compose rm -f test_db
docker compose up test_db -d

.PHONY: dev-sync
dev-sync:
@docker compose up --build sync_worker sync_publisher flower -d

.PHONY: dev-sync-down
dev-sync-down:
@docker compose down sync_worker sync_publisher flower
65 changes: 0 additions & 65 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,59 +85,6 @@ services:
networks:
- proxynet

sync_worker:
build:
context: .
args:
DOCKER_BUILDKIT: 1
dockerfile: ./src/backend/Dockerfile
command: ["./src/backend/services/sync/executor.sh", "${ENVIRONMENT}"]
restart: unless-stopped
profiles:
- sync
develop:
watch:
- action: sync
path: ./src/backend
target: /workspace/src/backend
ignore:
- __pycache__/
- alembic/
- data/
stdin_open: true
tty: true
depends_on:
- db
- redis
networks:
- proxynet

sync_publisher:
build:
context: .
args:
DOCKER_BUILDKIT: 1
dockerfile: ./src/backend/services/sync/Dockerfile
restart: unless-stopped
profiles:
- sync
develop:
watch:
- action: sync
path: ./src/backend
target: /workspace/src/backend
ignore:
- __pycache__/
- alembic/
- data/
stdin_open: true
tty: true
depends_on:
- db
- redis
networks:
- proxynet

frontend:
build:
target: ${BUILD_TARGET:-prod}
Expand Down Expand Up @@ -172,18 +119,6 @@ services:
networks:
- proxynet

flower:
image: mher/flower
profiles:
- sync
environment:
- CELERY_BROKER_URL=redis://:redis@redis:6379
- FLOWER_PORT=5555
ports:
- 5555:5555
networks:
- proxynet

volumes:
db:
name: cohere_toolkit_db
Expand Down
265 changes: 1 addition & 264 deletions poetry.lock

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ google_auth_oauthlib = "^1.2.0"
google-auth-httplib2 = "^0.2.0"
google-api-python-client = "^2.133.0"
openpyxl = "^3.1.5"
celery = {version = "^5.4.0", extras = ["gevent"]}
kombu = "^5.3.7"
watchdog = "^4.0.1"
redis = {extras = ["hiredis"], version = "^5.0.7"}
Expand All @@ -55,19 +54,6 @@ structlog = "^24.4.0"
pyyaml = "^6.0.1"
nltk = "^3.9.1"

[tool.poetry.group.compass]
optional = false

[tool.poetry.group.compass.dependencies]
# Compass dependencies - To be removed once Compass is OSS
fsspec = "2024.2.0"
joblib = "*"
pydantic = ">=2.6.3"
python = ">=3.9,<3.12"
requests = ">=2.25.0,<3.0.0"
tenacity = "8.2.3"
tqdm = ">=4.42.1"

[tool.poetry.group.dev]
optional = true

Expand Down
34 changes: 34 additions & 0 deletions src/backend/alembic/versions/2024_09_18_803535b4e118_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
Revision ID: 803535b4e118
Revises: ac3933258035
Create Date: 2024-09-18 17:04:40.969832
"""
from typing import Sequence, Union

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision: str = '803535b4e118'
down_revision: Union[str, None] = 'ac3933258035'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('agent_tool_metadata', 'artifacts',
existing_type=postgresql.JSON(astext_type=sa.Text()),
nullable=False)
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('agent_tool_metadata', 'artifacts',
existing_type=postgresql.JSON(astext_type=sa.Text()),
nullable=True)
# ### end Alembic commands ###
Loading

0 comments on commit 6acf4da

Please sign in to comment.