-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsert_sample_requests.py
More file actions
183 lines (180 loc) · 7.05 KB
/
insert_sample_requests.py
File metadata and controls
183 lines (180 loc) · 7.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
"""
Insert sample adoption requests into Supabase
"""
from furever_match.db_ingestion import ingest_adoption_request
# Sample adoption requests data
requests_data = [
{
'why_adopt': 'מחפשת כלב רגוע לדירה שייתן חברה בבית. חשוב שיהיה מסתדר עם אנשים וקל יחסית לטיפול.',
'has_kids': False,
'kids_age': None,
'has_other_pets': False,
'which_pets': None,
'has_yard': False,
'has_house': False,
'requested_level_of_train': 'בינוני',
'requested_gender': 'לא משנה',
'requested_size': 'קטן-בינוני',
'requested_age': 'בוגר',
'requested_level_energy': 'בינונית',
'dog_living_location': 'דירה',
'primary_care_giver': 'אני'
},
{
'why_adopt': 'אנחנו משפחה עם ילדים שמחפשת כלב חברותי ומאוזן שיתאים לבית ולחצר.',
'has_kids': True,
'kids_age': '5,8',
'has_other_pets': False,
'which_pets': None,
'has_yard': True,
'has_house': True,
'requested_level_of_train': 'בסיסי',
'requested_gender': 'לא משנה',
'requested_size': 'בינוני',
'requested_age': 'צעיר',
'requested_level_energy': 'גבוהה',
'dog_living_location': 'בית עם חצר',
'primary_care_giver': 'שני ההורים'
},
{
'why_adopt': 'זו פעם ראשונה שאני מאמצת כלב ורוצה כלב קטן ושקט יחסית. מוכנה להשקיע באילוף.',
'has_kids': False,
'kids_age': None,
'has_other_pets': False,
'which_pets': None,
'has_yard': False,
'has_house': False,
'requested_level_of_train': 'בסיסי',
'requested_gender': 'נקבה',
'requested_size': 'קטן',
'requested_age': 'צעיר',
'requested_level_energy': 'נמוכה',
'dog_living_location': 'דירה',
'primary_care_giver': 'אני'
},
{
'why_adopt': 'אנחנו מחפשים כלב שמירה עדין אך עירני, שיתאים לבית פרטי. חשוב שיהיה ממושמע.',
'has_kids': True,
'kids_age': '12,15,17',
'has_other_pets': True,
'which_pets': 'חתול',
'has_yard': True,
'has_house': True,
'requested_level_of_train': 'מתקדם',
'requested_gender': 'זכר',
'requested_size': 'גדול',
'requested_age': 'בוגר',
'requested_level_energy': 'בינונית',
'dog_living_location': 'בית עם חצר',
'primary_care_giver': 'אני'
},
{
'why_adopt': 'אני אוהב ספורט וטיולים ומחפש כלב שיהיה שותף לפעילות יומיומית.',
'has_kids': False,
'kids_age': None,
'has_other_pets': False,
'which_pets': None,
'has_yard': False,
'has_house': False,
'requested_level_of_train': 'בינוני',
'requested_gender': 'לא משנה',
'requested_size': 'בינוני',
'requested_age': 'צעיר',
'requested_level_energy': 'גבוהה',
'dog_living_location': 'דירה',
'primary_care_giver': 'אני'
},
{
'why_adopt': 'מחפשים כלב עדין ורגוע שמתאים לילד קטן בבית. חשוב שלא יהיה תוקפני.',
'has_kids': True,
'kids_age': '2',
'has_other_pets': False,
'which_pets': None,
'has_yard': False,
'has_house': False,
'requested_level_of_train': 'בינוני',
'requested_gender': 'לא משנה',
'requested_size': 'קטן-בינוני',
'requested_age': 'בוגר',
'requested_level_energy': 'נמוכה',
'dog_living_location': 'דירה',
'primary_care_giver': 'אמא'
},
{
'why_adopt': 'מחפשת כלב קטן שיהיה לי חברה בבית. אני בבית רוב היום ויכולה לטפל בו.',
'has_kids': False,
'kids_age': None,
'has_other_pets': False,
'which_pets': None,
'has_yard': True,
'has_house': True,
'requested_level_of_train': 'בסיסי',
'requested_gender': 'לא משנה',
'requested_size': 'קטן',
'requested_age': 'מבוגר',
'requested_level_energy': 'נמוכה',
'dog_living_location': 'בית עם חצר',
'primary_care_giver': 'אני'
},
{
'why_adopt': 'יש לנו כלב נוסף בבית ואנחנו רוצים לאמץ עוד כלב שיסתדר עם כלבים אחרים.',
'has_kids': False,
'kids_age': None,
'has_other_pets': True,
'which_pets': 'כלב',
'has_yard': True,
'has_house': True,
'requested_level_of_train': 'בינוני',
'requested_gender': 'לא משנה',
'requested_size': 'בינוני',
'requested_age': 'בוגר',
'requested_level_energy': 'בינונית',
'dog_living_location': 'בית עם חצר',
'primary_care_giver': 'אני והבת זוג'
},
{
'why_adopt': 'אני גרה עם שותפים ומחפשת כלב קטן וחברותי שלא ינבח הרבה ויתאים לדירה.',
'has_kids': False,
'kids_age': None,
'has_other_pets': False,
'which_pets': None,
'has_yard': False,
'has_house': False,
'requested_level_of_train': 'בסיסי',
'requested_gender': 'לא משנה',
'requested_size': 'קטן',
'requested_age': 'צעיר',
'requested_level_energy': 'בינונית',
'dog_living_location': 'דירה',
'primary_care_giver': 'אני'
},
{
'why_adopt': 'אנחנו מחפשים כלב משפחתי שמסתדר עם ילדים ועם חתולים. חשוב שיהיה רגוע בבית.',
'has_kids': True,
'kids_age': '6,9',
'has_other_pets': True,
'which_pets': 'חתול',
'has_yard': True,
'has_house': True,
'requested_level_of_train': 'בינוני',
'requested_gender': 'לא משנה',
'requested_size': 'בינוני',
'requested_age': 'בוגר',
'requested_level_energy': 'בינונית',
'dog_living_location': 'בית עם חצר',
'primary_care_giver': 'שני ההורים'
}
]
# Insert each adoption request
inserted_count = 0
for req in requests_data:
try:
request_id = ingest_adoption_request(req)
if request_id:
inserted_count += 1
print(f'✓ Inserted adoption request {inserted_count}: {req["primary_care_giver"]} (ID: {request_id})')
else:
print(f'✗ Failed to insert: {req["primary_care_giver"]}')
except Exception as e:
print(f'✗ Error inserting {req["primary_care_giver"]}: {str(e)}')
print(f'\n✅ Successfully inserted {inserted_count} adoption requests!')