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

Use 'count' as the default metric when available #4606

Merged
merged 2 commits into from
Mar 20, 2018

Conversation

mistercrunch
Copy link
Member

Count is a much better default than the current behavior which is to use whatever the first metric in the list happens to be.

Count is a much better default than the current behavior which is to use
whatever the first metric in the list happens to be.
@codecov-io
Copy link

codecov-io commented Mar 13, 2018

Codecov Report

Merging #4606 into master will increase coverage by 0.05%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4606      +/-   ##
==========================================
+ Coverage   71.18%   71.24%   +0.05%     
==========================================
  Files         189      190       +1     
  Lines       14847    14895      +48     
  Branches     1086     1101      +15     
==========================================
+ Hits        10569    10612      +43     
- Misses       4275     4280       +5     
  Partials        3        3
Impacted Files Coverage Δ
superset/assets/javascripts/modules/utils.js 48.2% <100%> (+3.58%) ⬆️
...set/assets/javascripts/explore/stores/controls.jsx 37.77% <50%> (-0.4%) ⬇️
...cripts/explore/components/controls/TextControl.jsx 45.45% <0%> (-1.43%) ⬇️
...ipts/explore/components/ControlPanelsContainer.jsx 86.95% <0%> (-0.93%) ⬇️
superset/assets/javascripts/chart/Chart.jsx 64.95% <0%> (-0.56%) ⬇️
superset/db_engine_specs.py 51.89% <0%> (-0.44%) ⬇️
superset/models/core.py 86.52% <0%> (-0.19%) ⬇️
...rset/assets/javascripts/explore/stores/visTypes.js 70.58% <0%> (ø) ⬆️
...set/assets/javascripts/components/MetricOption.jsx 100% <0%> (ø) ⬆️
... and 9 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 de44098...7bf5cef. 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 few nits.

expect(mainMetric([])).to.equal(undefined);
expect(mainMetric(null)).to.equal(undefined);
});
it('is prefers the "count" metric when first', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: remove "is" before "prefers".

];
expect(mainMetric(metrics)).to.equal('count');
});
it('is prefers the "count" metric when not first', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: remove "is" before "prefers".

];
expect(mainMetric(metrics)).to.equal('count');
});
it('it selects the first metric when "count" is not an option', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: remove "it" before "selects".

@mistercrunch mistercrunch merged commit ed9867c into apache:master Mar 20, 2018
@mistercrunch mistercrunch deleted the main_metric branch March 20, 2018 04:51
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Mar 30, 2018
* Use 'count' as the default metric when available

Count is a much better default than the current behavior which is to use
whatever the first metric in the list happens to be.

* Addressing nits
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Mar 30, 2018
* Use 'count' as the default metric when available

Count is a much better default than the current behavior which is to use
whatever the first metric in the list happens to be.

* Addressing nits
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Mar 30, 2018
* Use 'count' as the default metric when available

Count is a much better default than the current behavior which is to use
whatever the first metric in the list happens to be.

* Addressing nits
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* Use 'count' as the default metric when available

Count is a much better default than the current behavior which is to use
whatever the first metric in the list happens to be.

* Addressing nits
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* Use 'count' as the default metric when available

Count is a much better default than the current behavior which is to use
whatever the first metric in the list happens to be.

* Addressing nits
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.25.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 🚢 0.25.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants