rusackas opened a new pull request, #40141: URL: https://github.com/apache/superset/pull/40141
### SUMMARY This is a **test-only PR** opened as a TDD-style validation of issue #21734. #21734 (filed 2022-10) reports that Prophet forecast uncertainty intervals are clipped at zero, hiding the natural shape of the lower bound for series like temperatures or signed deltas. The Superset wrapper (\`superset/utils/pandas_postprocessing/prophet.py\`) does not contain any clamp — it passes Prophet's output through unchanged. This PR pins that contract end-to-end: 1. **\`test_prophet_uncertainty_lower_bound_can_be_negative_for_negative_series\`** — runs Prophet against a 24-month signed-temperature series and asserts at least one forecast point's \`__yhat_lower\` is negative. 2. **\`test_prophet_does_not_clamp_yhat_below_zero_for_negative_actuals\`** — companion that pins the central forecast (\`__yhat\`); a clamp at zero on the central value would force the lower bound non-negative as a side effect, masking the wider issue. Both tests skip when \`prophet\` is not installed, matching the existing pattern in this file. ### How to interpret CI - **CI green** → Superset doesn't clamp — the bug as described isn't in our code. Merging closes #21734 and locks in the regression guard so a future refactor can't reintroduce a clamp. - **CI red** → either (a) a clamp was added somewhere (real Superset bug to fix), or (b) Prophet's behavior on signed series doesn't naturally produce negative bounds, in which case the issue should be redirected to upstream. ### TESTING INSTRUCTIONS \`\`\`bash pytest tests/unit_tests/pandas_postprocessing/test_prophet.py::test_prophet_uncertainty_lower_bound_can_be_negative_for_negative_series -v pytest tests/unit_tests/pandas_postprocessing/test_prophet.py::test_prophet_does_not_clamp_yhat_below_zero_for_negative_actuals -v \`\`\` ### ADDITIONAL INFORMATION - [ ] Has associated issue: closes #21734 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
