SEPURI-SAI-KRISHNA commented on PR #43710:
URL: https://github.com/apache/superset/pull/43710#issuecomment-5553041116
Rebased on master, thanks @rusackas. The conflict was where you said, the
tail of `test_schemas.py`: master had grown
`test_post_processing_operation_schema_rejects_string_helpers` in the same slot
as the prophet tests. Both sides were pure additions, so both are kept.
`schemas.py` and the import blocks auto-merged.
One extra file beyond the rebase. `check-openapi-spec-drift` merged in
#43841 a few hours after your comment, and it regenerates the spec on every PR,
so this change now has to carry the regenerated
`docs/static/resources/openapi.json`. The delta is exactly the two grains this
PR adds:
```diff
"PT30M",
+ "PT0.5H",
"PT1H",
...
"P3M",
+ "P0.25Y",
"P1Y",
```
Nothing else in the spec moves, and the change is scoped to
`ChartDataProphetOptionsSchema.time_grain`. `time_grain_sqla` still publishes
the built-ins plus `TIME_GRAIN_ADDONS`, unchanged. The published enum is now
key-for-key identical to `PROPHET_TIME_GRAIN_MAP`, in map order, which is the
self-maintaining property the fix is aiming for: adding a grain to the map
advertises it, with no second list to keep in sync.
Verified locally: the 46 tests in `test_schemas.py` pass, and pre-commit is
clean (ruff, ruff-format, pylint, mypy). I also sanity-checked that the guard
actually holds by pointing the field back at `get_time_grain_choices()`, which
fails
`test_prophet_schema_advertises_only_resolvable_grains` and both new-grain
cases, so a future revert to the shared helper won't pass silently.
CI is green on the rebase, `check-openapi-spec-drift` included, so the
committed spec is what the workflow itself regenerates on the pinned `apispec`
version and not an artifact of my local environment.
--
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]