Commit abd2400
Link growth media to CultureMech and MediaIngredientMech
Implement complete integration with CultureMech recipe database and
MediaIngredientMech ingredient catalog to enrich growth_media data across
21 communities with external identifiers and composition details.
Changes:
- Add media_linker.py: Fetch/cache/match CultureMech and MediaIngredientMech data
- Add link_growth_media.py: CLI for automated media/ingredient linking
- Update schema: Add 'from' field to GrowthMediaComponent
- Update 21 community YAMLs with growth_media linkage
Results:
- Media: 18/26 matched to CultureMech (69% success rate)
- Ingredients: 57/98 linked to MediaIngredientMech (58% success rate)
- 28 new ingredients imported from CultureMech recipes
- All changes validated against LinkML schema
Technical details:
- Token-based fuzzy matching (threshold: 0.85)
- Independent matching for media (CultureMech) and ingredients (MediaIngredientMech)
- Preserves existing curated data with source tagging
- Local index loading for performance (10,657 recipes, 1,108 ingredients)
Commands added to justfile:
- link-media-dry: Preview changes
- link-media: Apply linking
- link-media-report: Generate CSV/text reports
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c6f988c commit abd2400
26 files changed
Lines changed: 1573 additions & 162 deletions
File tree
- kb/communities
- scripts
- src/communitymech
- datamodel
- schema
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
156 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| 165 | + | |
| 166 | + | |
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
289 | | - | |
| 287 | + | |
| 288 | + | |
290 | 289 | | |
291 | 290 | | |
292 | 291 | | |
| |||
296 | 295 | | |
297 | 296 | | |
298 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
299 | 353 | | |
300 | 354 | | |
301 | 355 | | |
| |||
305 | 359 | | |
306 | 360 | | |
307 | 361 | | |
308 | | - | |
309 | | - | |
| 362 | + | |
| 363 | + | |
310 | 364 | | |
311 | 365 | | |
312 | 366 | | |
| |||
321 | 375 | | |
322 | 376 | | |
323 | 377 | | |
| 378 | + | |
| 379 | + | |
324 | 380 | | |
325 | 381 | | |
326 | 382 | | |
| 383 | + | |
| 384 | + | |
327 | 385 | | |
328 | 386 | | |
329 | 387 | | |
| |||
Lines changed: 36 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
247 | 252 | | |
248 | 253 | | |
249 | 254 | | |
| |||
255 | 260 | | |
256 | 261 | | |
257 | 262 | | |
| 263 | + | |
258 | 264 | | |
259 | 265 | | |
260 | 266 | | |
| |||
263 | 269 | | |
264 | 270 | | |
265 | 271 | | |
| 272 | + | |
266 | 273 | | |
267 | 274 | | |
268 | 275 | | |
| |||
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
274 | 284 | | |
275 | 285 | | |
276 | 286 | | |
| |||
279 | 289 | | |
280 | 290 | | |
281 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
282 | 295 | | |
283 | 296 | | |
284 | 297 | | |
| |||
287 | 300 | | |
288 | 301 | | |
289 | 302 | | |
| 303 | + | |
290 | 304 | | |
291 | 305 | | |
292 | 306 | | |
| |||
295 | 309 | | |
296 | 310 | | |
297 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
298 | 315 | | |
299 | 316 | | |
300 | 317 | | |
| |||
303 | 320 | | |
304 | 321 | | |
305 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
306 | 326 | | |
307 | 327 | | |
308 | 328 | | |
| |||
311 | 331 | | |
312 | 332 | | |
313 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
314 | 343 | | |
315 | 344 | | |
316 | 345 | | |
317 | 346 | | |
318 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
319 | 351 | | |
| 352 | + | |
| 353 | + | |
320 | 354 | | |
321 | 355 | | |
322 | 356 | | |
| |||
Lines changed: 29 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
245 | 249 | | |
246 | 250 | | |
247 | 251 | | |
| |||
253 | 257 | | |
254 | 258 | | |
255 | 259 | | |
| 260 | + | |
256 | 261 | | |
257 | 262 | | |
258 | 263 | | |
| |||
261 | 266 | | |
262 | 267 | | |
263 | 268 | | |
| 269 | + | |
264 | 270 | | |
265 | 271 | | |
266 | 272 | | |
| |||
269 | 275 | | |
270 | 276 | | |
271 | 277 | | |
| 278 | + | |
272 | 279 | | |
273 | 280 | | |
274 | 281 | | |
| |||
277 | 284 | | |
278 | 285 | | |
279 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
280 | 290 | | |
281 | 291 | | |
282 | 292 | | |
| |||
285 | 295 | | |
286 | 296 | | |
287 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
288 | 301 | | |
289 | 302 | | |
290 | 303 | | |
| |||
293 | 306 | | |
294 | 307 | | |
295 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
296 | 318 | | |
297 | 319 | | |
298 | 320 | | |
299 | 321 | | |
300 | | - | |
301 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
302 | 328 | | |
303 | 329 | | |
304 | 330 | | |
| |||
0 commit comments