#!/usr/bin/env python3
"""Seed viability reference data for wiki entity enrichment.
Based on standard heirloom seed viability from Burpee, Baker Creek, and Seed Savers Exchange.
"""
from pathlib import Path
# Seed viability data: slug -> {years, temp, notes}
SEED_VIABILITY = {
# Fruiting vegetables
"dark-green-zucchini-squash": {"years": "4-5", "temp": "Cool, dry", "notes": "Cucurbit seeds maintain viability well"},
"jack-o-lantern-pumpkin": {"years": "4-6", "temp": "Cool, dry", "notes": "Pumpkin seeds store exceptionally well"},
"pickling-cucumber": {"years": "4-5", "temp": "Cool, dry", "notes": "Cucumber seeds maintain viability 4-5 years"},
"crimson-sweet-watermelon": {"years": "4-5", "temp": "Cool, dry", "notes": "Watermelon seeds are hardy and long-lasting"},
"luffa-sponge-gourd": {"years": "4-5", "temp": "Cool, dry", "notes": "Luffa seeds similar to other cucurbits"},
"roma-tomatoes": {"years": "3-4", "temp": "Cool, dry", "notes": "Tomato seeds dry well and store for years"},
"california-wonder-sweet-pepper": {"years": "2-3", "temp": "Cool, dry", "notes": "Pepper seeds decline after 3 years"},
"jalapeno-peppers": {"years": "2-3", "temp": "Cool, dry", "notes": "Hot pepper seeds same viability as sweet peppers"},
# Legumes
"provider-green-bush-beans": {"years": "3-4", "temp": "Cool, dry", "notes": "Beans maintain viability 3-4 years"},
"sugar-lace-snap-peas": {"years": "3-4", "temp": "Cool, dry", "notes": "Pea seeds hardy and long-lasting"},
# Brassicas
"long-island-brussels-sprouts": {"years": "2-3", "temp": "Cool, dry", "notes": "Brassica seeds moderate viability"},
"snowball-turnips": {"years": "3-4", "temp": "Cool, dry", "notes": "Turnip seeds store well, 3-4 years"},
# Root vegetables
"sugar-beets": {"years": "3-5", "temp": "Cool, dry", "notes": "Beet seeds are hardy, viable 3-5 years"},
"bulls-blood-beets": {"years": "3-5", "temp": "Cool, dry", "notes": "Same as sugar beets"},
"scarlett-nantes-carrot": {"years": "2-3", "temp": "Cool, dry", "notes": "Carrot seeds lose viability faster"},
# Leafy greens
"butter-crunch-butterhead-lettuce": {"years": "2-3", "temp": "Cool, dry", "notes": "Lettuce seeds moderate viability"},
"red-russian-kale": {"years": "2-3", "temp": "Cool, dry", "notes": "Kale seeds moderate, like other brassicas"},
"utah-celery": {"years": "1-2", "temp": "Cool, dry", "notes": "Celery seeds lose viability quickly"},
"white-bunching-onion": {"years": "1-2", "temp": "Cool, dry", "notes": "Onion seeds short viability, use within 2 years"},
# Herbs
"large-leaf-basil": {"years": "1-2", "temp": "Cool, dry", "notes": "Basil seeds short viability, use within year"},
"parsley": {"years": "2-3", "temp": "Cool, dry", "notes": "Parsley seeds moderate, benefit from cold storage"},
"coriander-cilantro": {"years": "2-3", "temp": "Cool, dry", "notes": "Cilantro seeds moderate viability"},
"catnip-herb": {"years": "2-3", "temp": "Cool, dry", "notes": "Catnip seeds moderate viability"},
# Tree seeds (different rules)
"japanese-maple": {"years": "1-2", "temp": "Refrigerated", "notes": "Tree seeds need cold storage, use fresh"},
"red-cedar": {"years": "1-2", "temp": "Refrigerated", "notes": "Cedar seeds need stratification, use within year"},
"southern-yew": {"years": "1", "temp": "Refrigerated", "notes": "Yew seeds require long stratification, sow fresh"},
"chinese-elm": {"years": "1", "temp": "Refrigerated", "notes": "Elm seeds lose viability quickly, sow immediately"},
# Zea mays
"yellow-dent-corn": {"years": "3-4", "temp": "Cool, dry", "notes": "Corn seeds maintain viability 3-4 years"},
}
def build_viability_section(data):
"""Build Seed Viability section text."""
lines = [
"## Seed Viability",
f"- **Shelf Life:** {data['years']} years",
f"- **Storage:** {data['temp']} conditions",
]
if data.get('notes'):
lines.append(f"- **Note:** {data['notes']}")
return "\n".join(lines) + "\n"
def main():
"""Print viability data for reference."""
print("Seed viability reference data:")
for slug, data in sorted(SEED_VIABILITY.items()):
print(f" {slug}: {data['years']} years ({data['temp']})")
print(f"\nTotal: {len(SEED_VIABILITY)} varieties")
if __name__ == "__main__":
main()