Repository navigation
refactor(explain): move HTML renderer into the soil_id package - #396
Merged
Merged
Conversation
This was referenced Sep 18, 2026
garobrik
approved these changes
Sep 25, 2026
johannesparty
force-pushed
the
feat/shallow-demote-horizon
branch
from
September 25, 2026 18:19
0d44759 to
df79e37
Compare
johannesparty
force-pushed
the
feat/explain-html-renderer
branch
from
September 25, 2026 18:19
5004f55 to
21dcf66
Compare
johannesparty
force-pushed
the
feat/shallow-demote-horizon
branch
from
September 25, 2026 18:55
df79e37 to
a746a2d
Compare
render_html lived in scripts/render_soil_explain.py, which isn't shipped in the wheel — so downstream services (e.g. the terraso-backend explain endpoint) couldn't import it. Move the renderer to an importable soil_id/render_explain.py (auto-included via packages=["soil_id"]); the script becomes a thin CLI wrapper that imports render_html from there. The rendering code is moved verbatim (byte-identical), so the US explain-HTML snapshot is unaffected. Tests repointed to soil_id.render_explain. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
johannesparty
force-pushed
the
feat/explain-html-renderer
branch
from
September 25, 2026 18:59
21dcf66 to
1d7cb78
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.
Moves
render_htmlfromscripts/render_soil_explain.py(not shipped in the wheel) into an importablesoil_id/render_explain.py, so downstream services canfrom soil_id.render_explain import render_html. The script becomes a thin CLI wrapper.scripts/render_soil_explain.pykeeps CLI concerns (file/URL loading,extract_trace, browser preview) and importsrender_htmlfrom the package.soil_id.render_explain.Enables the terraso-backend
/explain/…htmlendpoint to render server-side.Stacked on
feat/shallow-demote-horizon.🤖 Generated with Claude Code