Skip to content

Commit ea8c004

Browse files
committed
Merge branch 'main' into longer-cutoff
2 parents dd7a07b + 9e4b3db commit ea8c004

29 files changed

+1159
-743
lines changed

.github/copilot-instructions.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,25 @@ This is a full-stack web application consisting of a Django REST API backend and
1111
- Backend setup:
1212
```bash
1313
cd backend
14-
pip install -r requirements.txt # Takes ~22 seconds. NEVER CANCEL.
15-
export USE_SQLITE=1
16-
python manage.py migrate # Takes <1 second
17-
python manage.py runserver 8000 # Starts immediately
14+
source .venv/bin/activate
15+
pip install -r requirements.txt
16+
python manage.py migrate
17+
python manage.py runserver 8000
1818
```
1919
- Frontend setup:
2020
```bash
2121
cd frontend
22-
npm install # Takes ~12 seconds. NEVER CANCEL.
23-
npm run build # Takes ~9 seconds. NEVER CANCEL. Set timeout to 30+ seconds.
24-
npm run dev # Starts immediately on port 5173
22+
npm install
23+
npm run build
24+
npm run dev
2525
```
2626

27+
- Testing the ai_client with mock caption and mock image url:
28+
```bash
29+
cd backend
30+
python test_ai_client.py
31+
```
32+
2733
### Development Database Configuration
2834
- **CRITICAL**: Always set `export USE_SQLITE=1` before running Django commands for local development
2935
- Without this environment variable, Django will try to connect to PostgreSQL and fail

.github/workflows/instagram_feed.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Scrape Instagram and Store Events
22

33
on:
44
schedule:
5-
- cron: '0 7 * * *' # Once per day at 07:00 UTC
5+
- cron: '0 12 * * *' # Once per day at 12:00 UTC (7:00am EST)
66
workflow_dispatch: # Optional manual trigger
77

88
jobs:
@@ -24,6 +24,11 @@ jobs:
2424
DOC_ID: ${{ secrets.DOC_ID }}
2525
USER_AGENT: ${{ secrets.USER_AGENT }}
2626
X_IG_APP_ID: ${{ secrets.X_IG_APP_ID }}
27+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
28+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
29+
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
30+
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
31+
2732
steps:
2833
- uses: actions/checkout@v4
2934

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ __pycache__/
77
*.csv
88
backend/scraping/*.csv
99
backend/scraping/test*.py
10+
backend/testing
1011

1112
*.log
1213

13-
node_modules/
14+
node_modules/
15+
16+
.vscode

backend/.vercelignore

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ __pycache__/
66
.Python
77
env/
88
venv/
9+
.venv/
910
ENV/
1011
env.bak/
1112
venv.bak/
13+
*.egg-info/
14+
dist/
15+
build/
1216

1317
# Django
1418
*.log
@@ -39,5 +43,21 @@ Thumbs.db
3943
Dockerfile
4044
docker-compose.yml
4145

42-
# Wheels directory (will be installed during build)
43-
<!-- wheels/ -->
46+
# Development and testing
47+
*.pytest_cache/
48+
.coverage
49+
.tox/
50+
.cache/
51+
nosetests.xml
52+
coverage.xml
53+
*.cover
54+
.hypothesis/
55+
56+
# Large binary dependencies (will be installed during build)
57+
# wheels/ - Comment out to include during build
58+
59+
# Jupyter notebooks
60+
.ipynb_checkpoints/
61+
62+
# macOS
63+
*.DS_Store

backend/db.sqlite3

0 Bytes
Binary file not shown.

backend/example/migrations/0001_initial.py

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Generated by Django 4.2.7 on 2025-09-07 20:53
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
replaces = [('example', '0001_initial'), ('example', '0002_clubs_club_type'), ('example', '0003_alter_clubs_club_type'), ('example', '0004_alter_clubs_club_type')]
9+
10+
initial = True
11+
12+
dependencies = [
13+
]
14+
15+
operations = [
16+
migrations.CreateModel(
17+
name='Events',
18+
fields=[
19+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
20+
('club_handle', models.CharField(blank=True, max_length=100, null=True)),
21+
('url', models.URLField(blank=True, null=True)),
22+
('name', models.CharField(max_length=100)),
23+
('date', models.DateField()),
24+
('start_time', models.TimeField()),
25+
('end_time', models.TimeField()),
26+
('location', models.CharField(max_length=255)),
27+
],
28+
options={
29+
'db_table': 'events',
30+
},
31+
),
32+
migrations.CreateModel(
33+
name='Clubs',
34+
fields=[
35+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
36+
('club_name', models.CharField(max_length=100, unique=True)),
37+
('categories', models.CharField(max_length=255)),
38+
('club_page', models.URLField(blank=True, null=True)),
39+
('ig', models.URLField(blank=True, null=True)),
40+
('discord', models.URLField(blank=True, null=True)),
41+
('club_type', models.CharField(blank=True, choices=[('WUSA', 'WUSA'), ('Athletics', 'Athletics'), ('Student Society', 'Student Society')], max_length=50, null=True)),
42+
],
43+
options={
44+
'db_table': 'clubs',
45+
},
46+
),
47+
]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Generated by Django 4.2.7 on 2025-09-12 15:06
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("example", "0001_squashed_0004_alter_clubs_club_type"),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name="events",
15+
name="drinks",
16+
field=models.CharField(blank=True, max_length=255, null=True),
17+
),
18+
migrations.AddField(
19+
model_name="events",
20+
name="food",
21+
field=models.CharField(blank=True, max_length=255, null=True),
22+
),
23+
migrations.AddField(
24+
model_name="events",
25+
name="price",
26+
field=models.FloatField(blank=True, null=True),
27+
),
28+
migrations.AddField(
29+
model_name="events",
30+
name="registration",
31+
field=models.BooleanField(default=False),
32+
),
33+
migrations.AddField(
34+
model_name="events",
35+
name="snacks",
36+
field=models.CharField(blank=True, max_length=255, null=True),
37+
),
38+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 4.2.7 on 2025-09-12 16:51
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('example', '0001_squashed_0004_alter_clubs_club_type'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='events',
15+
name='image_url',
16+
field=models.URLField(blank=True, null=True),
17+
),
18+
]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Generated by Django 4.2.7 on 2025-09-12 21:26
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('example', '0005_events_drinks_events_food_events_price_and_more'),
10+
]
11+
12+
operations = [
13+
migrations.RemoveField(
14+
model_name='events',
15+
name='drinks',
16+
),
17+
migrations.RemoveField(
18+
model_name='events',
19+
name='snacks',
20+
),
21+
]

0 commit comments

Comments
 (0)