Skip to content

Add myHerb sustainability advisor prototype (CLI + web) with tests and README docs#21

Open
myHerbDev wants to merge 1 commit intomainfrom
codex/develop-sustainability-guidance-application-vqz6mq
Open

Add myHerb sustainability advisor prototype (CLI + web) with tests and README docs#21
myHerbDev wants to merge 1 commit intomainfrom
codex/develop-sustainability-guidance-application-vqz6mq

Conversation

@myHerbDev
Copy link
Copy Markdown
Owner

Motivation

  • Provide a lightweight prototype to help founders translate sustainability ambition into measurable, prioritized actions across six core pillars.
  • Offer both a CLI-based assessor and a modern minimal web front-end to showcase the scoring, tiering, and sprint-priority recommendations.
  • Document usage and testing so the prototype is easy to run and evaluate locally.

Description

  • Add apps/myherb_shift_advisor.py implementing PillarAssessment and ShiftReport, weighted scoring via generate_shift_report, demo/watch/interactive modes, and console rendering.
  • Add unit tests in apps/test_myherb_shift_advisor.py that validate score aggregation, weight-sum validation, report rendering, watch snapshots, and interval handling.
  • Add a simple static web prototype under apps/web/ (index.html, script.js, styles.css) that provides an interactive assessment form, animated score display, and priority recommendations.
  • Update README.md with usage instructions for the CLI, web preview, and test commands.

Testing

  • Ran the unit tests with cd apps && python -m unittest test_myherb_shift_advisor.py.
  • All unit tests passed (6 tests executed successfully).

Codex Task

@codesandbox
Copy link
Copy Markdown

codesandbox Bot commented Apr 3, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5ee97c5ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if seen != set(PILLARS):
raise ValueError("Assessments must include each pillar exactly once")

resolved_weights = weights or _default_weights()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor explicit empty weights instead of defaulting

Using weights or _default_weights() causes generate_shift_report(..., weights={}) to silently fall back to defaults rather than failing validation, even though the function later checks that provided weights include every pillar. This can mask invalid caller configuration and return a misleading score instead of raising a ValueError, which is a correctness issue for any external configuration flow.

Useful? React with 👍 / 👎.

@@ -0,0 +1,91 @@
import unittest

from myherb_shift_advisor import (
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make test imports runnable from repository root

The bare import from myherb_shift_advisor import ... only resolves when tests are executed from inside apps/; running tests from the repository root (for example, via standard unittest module invocation/discovery) raises ModuleNotFoundError. This makes test execution path-dependent and can break CI or developer workflows that run tests from the project root.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant