Commit dc1efab
Clarify LCFS credit integration with biomass tracking (#263)
* DOCUMENTATION: Clarify LCFS credit integration with biomass tracking
Enhanced regulatory compliance documentation to demonstrate how BOOST
biomass tracking provides essential data for LCFS credit calculations.
Key improvements:
- Added comprehensive tracking integration narrative to regulatory-compliance.md
- Included Pacific Renewable Fuels real-world example (4.2M records → 54.58M credits)
- Enhanced use-cases.inc.md with concrete workflow demonstration
- Updated documentation with prose style over bullet points
- Fixed version placeholders across specification files
This directly addresses @colinmccormick concern that "tracking biomass
supply doesn't seem to enter into this at all" by showing concrete data
flow from BOOST tracking systems into LCFS credit generation.
Closes #246
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* SCHEMA: Comprehensive integrity improvements and Python model synchronization
Enhanced BOOST schema integrity with normalization fixes, Python model
synchronization, and comprehensive validation coverage analysis.
Schema Improvements:
- Updated TraceableUnit Python model with 4 missing fields:
* productClassification (enum with 7 values for market classification)
* physicalArrangement (object for spatial organization and LCA analysis)
* alternativeFateMetrics (object for BECCS analysis and carbon impact)
* identificationMethodId (FK to IdentificationMethod entity)
Normalization Fixes:
- Removed redundant arrays from Organization schema (equipmentIds, operatorIds, harvestSites, traceableUnitIds)
- Removed redundant arrays from SupplyBase schema (skidRoads, forestRoads, equipmentDeployment, traceableUnitIds)
- Added normalization documentation explaining FK-based relationship management
- Follows 3NF principles for improved data integrity and maintainability
Validation Coverage Analysis:
- Added comprehensive FK analysis tool (fk_analysis.py)
- Generated integrity analysis reports identifying 111 FK relationships
- Created normalization issues analysis and recommendations
- Generated missing Python models for all 36 entities
Documentation Updates:
- Regenerated all entity tables with schema improvements
- Updated HTML and PDF documentation (96 pages, 1.1MB HTML)
- Synchronized documentation across all formats
- Maintained single source of truth from JSON schemas
Technical Benefits:
- Eliminates data redundancy and maintenance overhead
- Ensures referential integrity through proper FK relationships
- Improves query performance and reduces storage requirements
- Provides comprehensive validation framework for 36 entities
All changes validated through automated build system and integrity analysis tools.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* CLEANUP: Remove temporary analysis markdown files
The NORMALIZATION_ISSUES_ANALYSIS.md and SCHEMA_INTEGRITY_ANALYSIS_REPORT.md
files were temporary analysis artifacts that served their purpose. The actual
improvements have been implemented in the schemas and Python models.
Keeping the useful tools:
- fk_analysis.py (foreign key analysis tool)
- generated_models.py (Python models for all entities)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* CLEANUP: Remove static generated_models.py file
The BOOST Python implementation uses dynamic schema-driven model generation,
not static model files. Pydantic models should be generated at runtime from
JSON schemas to maintain the dynamic, schema-driven architecture.
This aligns with the design principles documented in README.md:
- Dynamic Schema-Driven Architecture
- Pydantic models generated directly from JSON schemas
- Automatically adapts to schema changes without code modifications
The generate_missing_models.py script was helpful for analysis but the static
output file contradicts the dynamic design approach.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* REFACTOR: Complete migration to dynamic schema-driven architecture
Eliminated static Pydantic models in favor of true dynamic model generation
from JSON schemas, delivering on the README's promise of "Dynamic Schema-Driven
Architecture" where models are generated directly from JSON schemas at runtime.
Major Changes:
- **Removed static model files**:
* models.py (853 lines) - static models for 8 entities
* models_backup.py, models_fixed.py - outdated artifacts
* generate_missing_models.py - static generation tool
- **Added dynamic_models.py**: Clean facade for dynamic model access
* Runtime generation of all 36 BOOST entity models from schemas
* Backward compatibility for existing enum imports
* Dynamic validation against current schema definitions
* Complete entity coverage (was 8, now all 36 entities)
- **Updated all dependencies**:
* test_bioram_validation.py - uses dynamic models
* bioram_validation.py - removed static model imports
* examples/*.py - use dynamic enums with backward compatibility
Technical Benefits:
- **Always current**: Models automatically reflect schema changes
- **No synchronization issues**: Single source of truth from JSON schemas
- **Complete coverage**: All 36 entities available, not just 8 hand-coded ones
- **Reduced codebase**: Eliminated 850+ lines of redundant static code
- **True dynamic architecture**: Runtime model generation as promised
Documentation:
- **MIGRATION_GUIDE.md**: Comprehensive migration instructions
- **README.md**: Updated to highlight full dynamic architecture delivery
- **Backward compatibility**: Existing code continues to work
Testing confirmed all dynamic models work correctly with full enum support
and validation against current schema definitions.
This delivers the true "Dynamic Schema-Driven Architecture" promised in
the README where Pydantic models are generated directly from JSON schemas.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* FIX: Update GitHub Actions to use dynamic models instead of static models.py
Fixed Python validation workflow that was failing because it still expected
the old static models.py file that was removed in the dynamic architecture
migration.
Changes:
- **Validate Python model syntax**: Now compiles dynamic_models.py, schema_loader.py, and boost_client.py instead of models.py
- **Test Pydantic model imports**: Replaced with dynamic model loading test using get_models()
- **Test model validation**: Updated to use dynamic model classes with proper required fields
The workflow now correctly validates:
✅ Dynamic model loading from JSON schemas
✅ All 36 entities accessible dynamically (not just 8 static ones)
✅ Enum value loading from schemas
✅ Model validation with complete required field sets
This ensures CI/CD validates the actual dynamic architecture rather than
the old static models approach that was removed.
Testing confirmed all workflow steps pass locally with the new dynamic models.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Claude <[email protected]>1 parent a91c790 commit dc1efab
File tree
63 files changed
+2109
-2771
lines changed- .github/workflows
- drafts/current
- reference-implementations/python
- examples
- schema
- organization
- supply_base
- specifications
- includes
- tex
- entities
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
63 files changed
+2109
-2771
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
408 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
409 | 411 | | |
410 | 412 | | |
411 | | - | |
| 413 | + | |
412 | 414 | | |
413 | 415 | | |
414 | | - | |
| 416 | + | |
415 | 417 | | |
416 | 418 | | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
426 | 431 | | |
427 | 432 | | |
428 | | - | |
429 | | - | |
430 | | - | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
431 | 439 | | |
432 | | - | |
433 | | - | |
434 | 440 | | |
435 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
436 | 450 | | |
437 | 451 | | |
438 | 452 | | |
439 | 453 | | |
440 | 454 | | |
441 | | - | |
| 455 | + | |
442 | 456 | | |
443 | 457 | | |
444 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
445 | 461 | | |
446 | | - | |
| 462 | + | |
447 | 463 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
456 | 474 | | |
457 | 475 | | |
458 | 476 | | |
459 | 477 | | |
460 | 478 | | |
461 | | - | |
| 479 | + | |
462 | 480 | | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
471 | 499 | | |
472 | 500 | | |
473 | 501 | | |
474 | 502 | | |
475 | 503 | | |
476 | | - | |
| 504 | + | |
477 | 505 | | |
478 | 506 | | |
479 | 507 | | |
| |||
Lines changed: 226 additions & 0 deletions
| 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 | + | |
| 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 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
19 | 30 | | |
20 | 31 | | |
21 | 32 | | |
| |||
0 commit comments