-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into pricing-v2-improvem…
…ents # Conflicts: # app_users/migrations/0017_alter_appuser_subscription.py # celeryapp/tasks.py # daras_ai_v2/base.py # poetry.lock # routers/api.py
- Loading branch information
Showing
111 changed files
with
3,494 additions
and
1,783 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Python tests | ||
|
||
on: [ push, workflow_dispatch ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
python-version: [ "3.10.12" ] | ||
poetry-version: [ "1.8.3" ] | ||
|
||
# Service containers to run with `test` | ||
services: | ||
# https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers | ||
postgres: | ||
# Docker Hub image | ||
image: postgres:15.2 | ||
# Provide the password for postgres | ||
env: | ||
POSTGRES_DB: gooey | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
# Set health checks to wait until postgres has started | ||
options: >- | ||
--name postgres | ||
ports: | ||
# Maps tcp port 5432 on service container to the host | ||
- 5432:5432 | ||
# https://docs.github.com/en/actions/using-containerized-services/creating-redis-service-containers | ||
redis: | ||
# Docker Hub image | ||
image: redis | ||
# Set health checks to wait until redis has started | ||
options: >- | ||
--health-cmd "redis-cli ping" | ||
--health-interval 5s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
# Maps tcp port 6379 on service container to the host | ||
- 6379:6379 | ||
steps: | ||
# https://remarkablemark.org/blog/2022/05/12/github-actions-postgresql-increase-max-connections-and-shared-buffers/ | ||
- name: Increase max_connections | ||
run: >- | ||
docker exec -i postgres bash << EOF | ||
sed -i -e 's/max_connections = 100/max_connections = 10000/' /var/lib/postgresql/data/postgresql.conf | ||
EOF | ||
- name: Restart postgres | ||
run: >- | ||
docker restart postgres | ||
&& while ! docker exec postgres pg_isready; do sleep 5; done | ||
- name: Install system dependencies | ||
run: >- | ||
sudo apt-get update && sudo apt-get install -y --no-install-recommends | ||
libpoppler-cpp-dev | ||
python3-opencv | ||
postgresql-client | ||
libzbar0 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python, Poetry and Dependencies | ||
uses: packetcoders/action-setup-cache-python-poetry@main | ||
with: | ||
python-version: ${{matrix.python-version}} | ||
poetry-version: ${{matrix.poetry-version}} | ||
install-args: --only main | ||
|
||
- name: Run tests | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5432 | ||
PGDATABASE: gooey | ||
PGUSER: postgres | ||
PGPASSWORD: password | ||
REDIS_URL: redis://localhost:6379/0 | ||
REDIS_CACHE_URL: redis://localhost:6379/1 | ||
APP_BASE_URL: http://localhost:3000 | ||
API_BASE_URL: http://localhost:8080 | ||
ADMIN_BASE_URL: http://localhost:8000 | ||
GCP_PROJECT: ${{ vars.GCP_PROJECT }} | ||
GCP_REGION: ${{ vars.GCP_REGION }} | ||
GOOGLE_APPLICATION_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }} | ||
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }} | ||
ELEVEN_LABS_API_KEY: ${{ secrets.ELEVEN_LABS_API_KEY }} | ||
AZURE_SPEECH_REGION: ${{ secrets.AZURE_SPEECH_REGION }} | ||
AZURE_SPEECH_KEY: ${{ secrets.AZURE_SPEECH_KEY }} | ||
AZURE_FORM_RECOGNIZER_ENDPOINT: ${{ secrets.AZURE_FORM_RECOGNIZER_ENDPOINT }} | ||
AZURE_FORM_RECOGNIZER_KEY: ${{ secrets.AZURE_FORM_RECOGNIZER_KEY }} | ||
TEST_SLACK_TEAM_ID: ${{ secrets.TEST_SLACK_TEAM_ID }} | ||
TEST_SLACK_USER_ID: ${{ secrets.TEST_SLACK_USER_ID }} | ||
TEST_SLACK_AUTH_TOKEN: ${{ secrets.TEST_SLACK_AUTH_TOKEN }} | ||
run: | | ||
poetry run ./scripts/run-tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ def force_authentication(): | |
AppUser.objects.get_or_create( | ||
email="[email protected]", | ||
defaults=dict( | ||
is_anonymous=True, | ||
is_anonymous=False, | ||
uid=get_random_doc_id(), | ||
balance=10**9, | ||
disable_rate_limits=True, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
bots/migrations/0074_alter_publishedrun_workflow_alter_savedrun_workflow_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 4.2.7 on 2024-06-18 20:34 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('bots', '0073_savedrun_retention_policy'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='publishedrun', | ||
name='workflow', | ||
field=models.IntegerField(choices=[(1, 'Doc Search'), (2, 'Doc Summary'), (3, 'Google GPT'), (4, 'Copilot'), (5, 'Lipysnc + TTS'), (6, 'Text to Speech'), (7, 'Speech Recognition'), (8, 'Lipsync'), (9, 'Deforum Animation'), (10, 'Compare Text2Img'), (11, 'Text2Audio'), (12, 'Img2Img'), (13, 'Face Inpainting'), (14, 'Google Image Gen'), (15, 'Compare AI Upscalers'), (16, 'SEO Summary'), (17, 'Email Face Inpainting'), (18, 'Social Lookup Email'), (19, 'Object Inpainting'), (20, 'Image Segmentation'), (21, 'Compare LLM'), (22, 'Chyron Plant'), (23, 'Letter Writer'), (24, 'Smart GPT'), (25, 'AI QR Code'), (26, 'Doc Extract'), (27, 'Related QnA Maker'), (28, 'Related QnA Maker Doc'), (29, 'Embeddings'), (30, 'Bulk Runner'), (31, 'Bulk Evaluator'), (32, 'Functions')]), | ||
), | ||
migrations.AlterField( | ||
model_name='savedrun', | ||
name='workflow', | ||
field=models.IntegerField(choices=[(1, 'Doc Search'), (2, 'Doc Summary'), (3, 'Google GPT'), (4, 'Copilot'), (5, 'Lipysnc + TTS'), (6, 'Text to Speech'), (7, 'Speech Recognition'), (8, 'Lipsync'), (9, 'Deforum Animation'), (10, 'Compare Text2Img'), (11, 'Text2Audio'), (12, 'Img2Img'), (13, 'Face Inpainting'), (14, 'Google Image Gen'), (15, 'Compare AI Upscalers'), (16, 'SEO Summary'), (17, 'Email Face Inpainting'), (18, 'Social Lookup Email'), (19, 'Object Inpainting'), (20, 'Image Segmentation'), (21, 'Compare LLM'), (22, 'Chyron Plant'), (23, 'Letter Writer'), (24, 'Smart GPT'), (25, 'AI QR Code'), (26, 'Doc Extract'), (27, 'Related QnA Maker'), (28, 'Related QnA Maker Doc'), (29, 'Embeddings'), (30, 'Bulk Runner'), (31, 'Bulk Evaluator'), (32, 'Functions')], default=4), | ||
), | ||
migrations.AlterField( | ||
model_name='workflowmetadata', | ||
name='workflow', | ||
field=models.IntegerField(choices=[(1, 'Doc Search'), (2, 'Doc Summary'), (3, 'Google GPT'), (4, 'Copilot'), (5, 'Lipysnc + TTS'), (6, 'Text to Speech'), (7, 'Speech Recognition'), (8, 'Lipsync'), (9, 'Deforum Animation'), (10, 'Compare Text2Img'), (11, 'Text2Audio'), (12, 'Img2Img'), (13, 'Face Inpainting'), (14, 'Google Image Gen'), (15, 'Compare AI Upscalers'), (16, 'SEO Summary'), (17, 'Email Face Inpainting'), (18, 'Social Lookup Email'), (19, 'Object Inpainting'), (20, 'Image Segmentation'), (21, 'Compare LLM'), (22, 'Chyron Plant'), (23, 'Letter Writer'), (24, 'Smart GPT'), (25, 'AI QR Code'), (26, 'Doc Extract'), (27, 'Related QnA Maker'), (28, 'Related QnA Maker Doc'), (29, 'Embeddings'), (30, 'Bulk Runner'), (31, 'Bulk Evaluator'), (32, 'Functions')], unique=True), | ||
), | ||
] |
Oops, something went wrong.