Commit 734e150
Fix conditional enum filtering and sync workflow
This commit fixes the conditional enum filtering system to work with Synapse's
limitations and consolidates the sync scripts.
## Problem
1. Conditional filtering used $defs/$refs which Synapse doesn't support
2. Two sync scripts (sync_model_systems.py and sync_model_systems_enhanced.py) were confusing
3. Weekly workflow didn't regenerate JSON schemas after syncing data
4. modules/Sample/generated/ folder had no documentation
## Solution
### 1. Replace sync_model_systems.py with enhanced version
- Merged sync_model_systems_enhanced.py functionality into sync_model_systems.py
- Added antibody and genetic reagent syncing to the enhanced script
- Deleted the "enhanced" version to avoid confusion
- Updated weekly workflow to use standard name
### 2. Fix add_conditional_enum_filtering.py to inline enums
- Changed from using $refs pointing to $defs
- Now directly inlines enum values in if/then conditionals
- Reads from modules/Sample/generated/*.yaml files
- Creates conditionals like:
```
if: {modelSystemType: "cell line", modelSpecies: "Homo sapiens", ...}
then: {modelSystemName: {items: {enum: ["90-8", "ST88-14", ...]}}}
```
- No $defs section in output (Synapse-compatible)
### 3. Update weekly-model-system-sync.yml workflow
- Added step to regenerate JSON schemas after syncing data
- Now runs add_conditional_enum_filtering.py + gen-json-schema-class.py
- Ensures schemas stay in sync with latest cell lines/models
- Updated PR description to mention schema regeneration
### 4. Document modules/Sample/generated/ folder
- Added README.md explaining purpose and build process
- Clarifies these are source files, not runtime files
- Documents the cascading filter approach for staying under 100-value limit
## Result
- ✅ Conditional filtering works without $defs (Synapse-compatible)
- ✅ Single sync script handles all resource types
- ✅ Weekly workflow keeps schemas synchronized
- ✅ Clear documentation for generated enum files
## Files Changed
- utils/sync_model_systems.py - Now the main sync script (was "enhanced")
- utils/sync_model_systems_enhanced.py - Deleted (merged into main)
- utils/add_conditional_enum_filtering.py - Inline enums instead of $defs
- .github/workflows/weekly-model-system-sync.yml - Add schema regeneration
- modules/Sample/generated/README.md - New documentation
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 62a946f commit 734e150
File tree
5 files changed
+500
-967
lines changed- .github/workflows
- modules/Sample/generated
- utils
5 files changed
+500
-967
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| |||
89 | 99 | | |
90 | 100 | | |
91 | 101 | | |
| 102 | + | |
92 | 103 | | |
93 | 104 | | |
94 | | - | |
95 | | - | |
| 105 | + | |
| 106 | + | |
96 | 107 | | |
97 | 108 | | |
98 | 109 | | |
99 | 110 | | |
100 | 111 | | |
| 112 | + | |
101 | 113 | | |
102 | 114 | | |
103 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| |||
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | | - | |
| 256 | + | |
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
259 | | - | |
| 260 | + | |
| 261 | + | |
260 | 262 | | |
261 | 263 | | |
262 | 264 | | |
| |||
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
283 | | - | |
| 285 | + | |
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
287 | 289 | | |
288 | 290 | | |
289 | 291 | | |
290 | 292 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 293 | + | |
307 | 294 | | |
| 295 | + | |
| 296 | + | |
308 | 297 | | |
309 | 298 | | |
310 | 299 | | |
| |||
318 | 307 | | |
319 | 308 | | |
320 | 309 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| |||
0 commit comments