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

fix(explore): refine previous calendar range #12308

Merged
merged 1 commit into from
Jan 6, 2021

Conversation

zhaoyongjie
Copy link
Member

@zhaoyongjie zhaoyongjie commented Jan 6, 2021

SUMMARY

fix #12283
refine previous calendar range in new timepicker

for example:
current date is: 2021-01-06

previous calendar week == 2020-12-28 ≤ col < 2021-01-04
previous calendar month == 2020-12-01 ≤ col < 2021-01-01
previous calendar year == 2020-01-01 ≤ col < 2021-01-01

TEST PLAN

changed UT

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-io
Copy link

codecov-io commented Jan 6, 2021

Codecov Report

Merging #12308 (cbf241c) into master (1f83472) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12308      +/-   ##
==========================================
- Coverage   67.15%   67.09%   -0.06%     
==========================================
  Files        1002     1002              
  Lines       49300    49300              
  Branches     5010     5010              
==========================================
- Hits        33106    33080      -26     
- Misses      16069    16095      +26     
  Partials      125      125              
Flag Coverage Δ
cypress 51.43% <ø> (ø)
javascript 61.20% <ø> (ø)
python 64.08% <100.00%> (-0.10%) ⬇️

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

Impacted Files Coverage Δ
superset/utils/core.py 89.87% <100.00%> (-0.35%) ⬇️
superset/db_engine_specs/mysql.py 79.59% <0.00%> (-12.25%) ⬇️
superset/db_engine_specs/sqlite.py 65.62% <0.00%> (-9.38%) ⬇️
superset/utils/celery.py 96.42% <0.00%> (-3.58%) ⬇️
superset/result_set.py 96.69% <0.00%> (-1.66%) ⬇️
superset/models/core.py 88.04% <0.00%> (-0.82%) ⬇️
superset/views/core.py 74.92% <0.00%> (-0.46%) ⬇️
superset/connectors/sqla/models.py 91.24% <0.00%> (-0.27%) ⬇️
superset/db_engine_specs/base.py 85.82% <0.00%> (-0.26%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f83472...cbf241c. Read the comment docs.

Copy link

@graceguo-supercat graceguo-supercat left a comment

Choose a reason for hiding this comment

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

LGTM!
unit test is great. Thanks so much!

Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

LGTM. The code is much cleaner this way!

@ktmud ktmud merged commit 9eb911d into apache:master Jan 6, 2021
@junlincc junlincc added the explore:time Related to the time filters in Explore label Jan 8, 2021
@zhaoyongjie zhaoyongjie deleted the fix_timepicker_interval branch January 16, 2021 04:17
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 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 explore:time Related to the time filters in Explore size/S 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Explore] Timepicker time range interval design
6 participants