Match media suggester on modeled_environment (un-skip lab-env communities)#218
Merged
Merged
Conversation
realmarcin
force-pushed
the
feat/suggester-modeled-environment
branch
from
July 20, 2026 02:24
b426010 to
dc7ddab
Compare
…munities) Closes the loop from the "why are these skipped?" thread. The media suggester now uses a community's environment_term AND every modeled_environment entry as match keys, so an engineered community whose environment_term is the generic "laboratory environment" still matches media via the real habitat it models. - _community_env -> _community_envs: returns [environment_term, *modeled_environment] ENVO (id,label) keys, deduped. - main loop matches media across all non-generic keys (dedup by culturemech_id), labels each suggestion group with which key it matched (environment_term vs modeled_environment); communities with no ENVO env are silently skipped (as before), only all-generic communities count as skipped. Effect: the 23 modeled_environment records drop out of the skipped bucket (110 -> 87). They yield 0 media today (CultureMech source_environment has no groundwater/regolith/dairy/... entries yet) — data-limited, not logic-limited; they'll match automatically as sibling coverage grows. tests: _community_envs (environment_term + modeled_environment, dedup, non-ENVO ignored). 247 tests pass; lint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
realmarcin
force-pushed
the
feat/suggester-modeled-environment
branch
from
July 20, 2026 02:27
dc7ddab to
ba60357
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Closes the loop from the "why are these skipped?" thread. The media suggester
skipped 110 communities grounded to the generic
environment_term: laboratory environment. Now that 23 of them carry a realmodeled_environment(#217), thesuggester matches on it too.
What
_community_env→_community_envs: a community's match keys are itsenvironment_termand everymodeled_environmententry (ENVO id/label,deduped, order preserved).
by
culturemech_id, and labels each suggestion group with which key it matched(
environment_termvsmodeled_environment). Communities with no ENVO envare silently skipped (as before); only all-generic communities count as skipped.
Effect
The 23
modeled_environmentrecords leave the skipped bucket: skip count110 → 87. They yield 0 media suggestions today — CultureMech
source_environmenthas no groundwater/regolith/dairy/… entries yet — so this isdata-limited, not logic-limited: they'll match automatically as sibling
coverage grows. (Verified:
_community_envsreturns e.g.[laboratory environment, groundwater]for the Rifle aquifer record.)Verification
just test— 247 passed (new_community_envscases: environment_term +modeled_environment, dedup, non-ENVO ignored)
just lint— black + ruff + mypy cleanRemaining follow-ups
docs/pages for the 23 records.modeled_environmentmatching to the draft ingredientsuggester (DRAFT: CHEBI-route related_ingredients suggester (issue #30, pending MIM#119) #215).
🤖 Generated with Claude Code