Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Improve chart data API + schemas + tests #9599

Merged
merged 8 commits into from Apr 23, 2020

Conversation

villebro
Copy link
Member

@villebro villebro commented Apr 20, 2020

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Several small changes to chart data API/schema, QueryContext/QueryObject:

  • Add query context related fixtures. Might seem overkill for now, but I intend to add more fixtures as we roll out the API to chart plugins.
  • Move query context tests from core_tests.py to new query_context_tests.py (more to come)
  • Change enums in chart api Marshmallow specs from enum to validate=validate.OneOf() to add validation (enum wasn't validating values) while still retaining enum in OpenAPI spec.

Related ticket: #9187

TEST PLAN

CI + local testing

REVIEWERS

@dpgaspar

@villebro villebro force-pushed the villebro/query-context-fixes branch from cf7f7ce to 4c24d72 Compare April 21, 2020 07:45
@villebro villebro force-pushed the villebro/query-context-fixes branch from a4b1baa to ee48efd Compare April 22, 2020 09:01
@villebro villebro changed the title Make all fields optional in QueryObject and fix having_druid schema chore: Improve chart data API + schemas + tests Apr 22, 2020
@villebro villebro requested a review from dpgaspar April 22, 2020 10:31
@villebro villebro force-pushed the villebro/query-context-fixes branch from ee48efd to 4bba0cb Compare April 22, 2020 16:38
Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

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

Looks good, just some comments

tests/base_tests.py Outdated Show resolved Hide resolved
tests/query_context_tests.py Show resolved Hide resolved
@villebro villebro force-pushed the villebro/query-context-fixes branch from 4bba0cb to 0377c33 Compare April 23, 2020 09:43
@villebro villebro merged commit a6cedaa into apache:master Apr 23, 2020
@villebro villebro deleted the villebro/query-context-fixes branch April 27, 2020 13:20
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XL 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants