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

refactor: rename filter_rel_fields to base_related_field_filters #22508

Merged
merged 4 commits into from
Dec 24, 2022

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Dec 22, 2022

SUMMARY

Small refactor to improve the current confusing names for declaring related filters on ModelRestApi

Renames: filter_rel_fields to base_related_field_filters

currently we have:
filter_rel_fields: That declared a base filter that is always applied on the declared related fields
related_field_filters: That applies a filter on related fields

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Dec 22, 2022

Codecov Report

Merging #22508 (dd67fc5) into master (7d8fff8) will decrease coverage by 11.10%.
The diff coverage is 90.00%.

❗ Current head dd67fc5 differs from pull request most recent head 0557ba4. Consider uploading reports for the commit 0557ba4 to get more accurate results

@@             Coverage Diff             @@
##           master   #22508       +/-   ##
===========================================
- Coverage   66.90%   55.79%   -11.11%     
===========================================
  Files        1851     1851               
  Lines       70696    70696               
  Branches     7764     7764               
===========================================
- Hits        47299    39447     -7852     
- Misses      21375    29227     +7852     
  Partials     2022     2022               
Flag Coverage Δ
hive 52.46% <90.00%> (ø)
mysql ?
postgres ?
presto 52.36% <90.00%> (ø)
python 57.92% <90.00%> (-23.33%) ⬇️
sqlite ?
unit 51.14% <90.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/views/filters.py 70.83% <ø> (-29.17%) ⬇️
superset/views/base_api.py 61.47% <66.66%> (-36.97%) ⬇️
superset/charts/api.py 50.37% <100.00%> (-35.83%) ⬇️
superset/dashboards/api.py 51.14% <100.00%> (-41.43%) ⬇️
superset/datasets/api.py 49.18% <100.00%> (-38.22%) ⬇️
superset/queries/api.py 100.00% <100.00%> (ø)
superset/queries/saved_queries/api.py 61.11% <100.00%> (-33.34%) ⬇️
superset/reports/api.py 58.95% <100.00%> (-31.35%) ⬇️
superset/utils/dashboard_import_export.py 0.00% <0.00%> (-100.00%) ⬇️
superset/tags/core.py 4.54% <0.00%> (-95.46%) ⬇️
... and 289 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM with an optional comment on moving part of the docstring.

Comment on lines +202 to +203
When combined with the `related_field_filters` attribute,
this filter will be applied in addition to the latest::
Copy link
Member

Choose a reason for hiding this comment

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

Should we move this comment to related_field_filters and say there that the filter is applied in addition (or on top, whichever sounds better) to base_related_field_filters?

@dpgaspar dpgaspar merged commit 7926a43 into apache:master Dec 24, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 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/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants