bioepic-data/ecosim-agent / .agents/skills/ecosim-plant-trait-sanity-check
ecosim-plant-trait-sanity-check
VerifiedRead-only validation of EcoSIM plant_trait.*.desc values for the first grid, including all plant-class identities and their evidence coverage, C3/C4 physiology, active protein allocation and root hydraulics. Use for trait evaluation and run-readiness checks. Never edit or replace the `.desc` file.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 18.7 KB |
| agents/openai.yaml | config | 314 B |
| references/class_information_validation.md | markdown | 7.3 KB |
| references/evidence_coverage.md | markdown | 4.5 KB |
| references/pft_case_notes.md | markdown | 5.6 KB |
| references/sanity_rules.md | markdown | 23.6 KB |
| references/web_evidence.md | markdown | 11.0 KB |
| scripts/check_plant_trait_desc.py | script | 72.5 KB |
| scripts/plant_class_validation.py | script | 13.5 KB |
| scripts/site_vegetation.py | script | 18.2 KB |
| scripts/trait_corrections.py | script | 10.5 KB |
| tests/test_annual_phenology.py | script | 2.2 KB |
| tests/test_class_information.py | script | 9.5 KB |
| tests/test_physiological_parameterization.py | script | 12.9 KB |
| tests/test_root_conduit_hydraulics.py | script | 8.7 KB |
| tests/test_site_vegetation.py | script | 5.4 KB |
| tests/test_soybean_angle_default.py | script | 1.8 KB |
| tests/test_trait_corrections.py | script | 7.0 KB |
tests/test_annual_phenology.py
View on GitHub"""Annual life cycle alone does not imply human-seeded crop phenology."""
import unittest
from test_physiological_parameterization import CHECKER, parameter
class AnnualPhenologyTests(unittest.TestCase):
def block(self, code='gr3a34', phenology='Drought deciduous 2'):
b = CHECKER.PlantBlock(nz=1, ny=1, nx=1, code=code, start_line=1)
b.parameters = [parameter('ISTYP', 0, 1, 'Annual 0')]
if phenology is not None:
b.parameters.append(parameter('IWTYP', int(phenology.split()[-1]), 2, phenology))
return b
def findings(self, block, rule=None):
found = []
def add(*args, **kwargs): found.append(args)
if rule is None:
CHECKER.check_class_information_conventions(block, CHECKER.by_var(block), add)
else:
CHECKER.check_web_categorical(block, CHECKER.by_var(block), rule, add)
return found
def test_natural_annual_grass_and_clover_allow_drought_deciduous(self):
for code in ('gr3a34', 'clva34'):
with self.subTest(code=code):
self.assertEqual(self.findings(self.block(code)), [])
def test_unknown_management_context_is_not_assumed_from_crop_code(self):
self.assertEqual(self.findings(self.block('maiz41')), [])
def test_explicit_annual_crop_evergreen_expectation_is_checked(self):
rule = dict(variable='IWTYP', contains='Evergreen', source='Human-seeded annual crop configuration')
self.assertEqual(len(self.findings(self.block('maiz41'), rule)), 1)
self.assertEqual(self.findings(self.block('maiz41', 'Evergreen 0'), rule), [])
def test_natural_annual_web_evidence_is_not_silently_filtered(self):
rule = dict(variable='IWTYP', contains='Drought deciduous', source='Self-seeding Mediterranean annual vegetation')
self.assertEqual(self.findings(self.block(), rule), [])
self.assertEqual(len(self.findings(self.block(phenology='Evergreen 0'), rule)), 1)
def test_missing_phenology_requests_context_without_universal_rule(self):
f = self.findings(self.block(phenology=None))
self.assertEqual(len(f), 1)
self.assertNotIn('treats annuals as evergreen', f[0][4])
if __name__ == '__main__':
unittest.main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |