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

[viz flow] detect TIMESTAMP, transition to line chart #5634

Merged
merged 2 commits into from Aug 22, 2018

Conversation

mistercrunch
Copy link
Member

No description provided.

@mistercrunch mistercrunch changed the title [WiP][viz flow] detect TIMESTAMP, transition to line chart [viz flow] detect TIMESTAMP, transition to line chart Aug 16, 2018
@mistercrunch mistercrunch added the lyft Related to Lyft label Aug 16, 2018
@codecov-io
Copy link

codecov-io commented Aug 16, 2018

Codecov Report

Merging #5634 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5634      +/-   ##
==========================================
+ Coverage   63.44%   63.45%   +0.01%     
==========================================
  Files         360      360              
  Lines       22953    22958       +5     
  Branches     2558     2557       -1     
==========================================
+ Hits        14562    14568       +6     
+ Misses       8376     8375       -1     
  Partials       15       15
Impacted Files Coverage Δ
superset/assets/src/explore/controls.jsx 46.26% <ø> (+0.34%) ⬆️
superset/assets/src/explore/visTypes.jsx 57.14% <ø> (ø) ⬆️
superset/dataframe.py 94.91% <100%> (+0.27%) ⬆️

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 bcc0954...e014717. Read the comment docs.

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

LGTM, just a comment on determining date... I feel there's a lot of logic there to detect a date, and it's split in two places. Might be good moving it to a single method.

is_date = False
if col_db_type:
is_date = self.is_date(self.df.dtypes[col]) or any([
col_db_type.lower().startswith(s) for s in ('time', 'data')
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 extra logic to the is_date method? Eg:

def is_date(self, dtypes, col_db_type=None):
     if col_db_type and any(col_db_type.lower().startswith(s) for s in ('time', 'data')):
         return True
     ...

is_date = self.is_date(self.df.dtypes[col], col_db_type.lower())

@mistercrunch
Copy link
Member Author

Good call, refactored all this.

@mistercrunch mistercrunch merged commit 6e8c7f7 into apache:master Aug 22, 2018
@mistercrunch mistercrunch deleted the fix_timestamp branch August 22, 2018 04:33
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* [viz flow] detect TIMESTAMP, transition to line chart

* Refactor is_date
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0 labels Feb 27, 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 lyft Related to Lyft 🚢 0.28.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants