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

Break up db_engine_specs #7676

Merged
merged 14 commits into from
Jun 8, 2019
Merged

Break up db_engine_specs #7676

merged 14 commits into from
Jun 8, 2019

Conversation

villebro
Copy link
Member

@villebro villebro commented Jun 8, 2019

CATEGORY

Choose one

  • Refactor

SUMMARY

This PR changes db_engine_specs.py into a package with one module per engine, e.g. db_engine_specs/bigquery.py. All engines are automatically populated into db_engine_specs.engines like before (now in db_engine_specs/__init__.py), so only importing of specific engine specs will need to be changed:

Before: from superset.db_engine_specs import BaseEngineSpec
After: from superset.db_engine_specs.base import BaseEngineSpec

TEST PLAN

Local testing + CI

ADDITIONAL INFORMATION

REVIEWERS

@khtruong @john-bodley @betodealmeida @mistercrunch

Copy link
Member

@john-bodley john-bodley left a comment

Choose a reason for hiding this comment

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

Nice. I was thinking about making this same change. There's one small comment but overall LGTM.

superset/db_engine_specs/base.py Outdated Show resolved Hide resolved
@codecov-io
Copy link

Codecov Report

Merging #7676 into master will increase coverage by 0.12%.
The diff coverage is 69.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7676      +/-   ##
==========================================
+ Coverage   65.58%   65.71%   +0.12%     
==========================================
  Files         437      459      +22     
  Lines       21797    21873      +76     
  Branches     2403     2403              
==========================================
+ Hits        14295    14373      +78     
+ Misses       7381     7379       -2     
  Partials      121      121
Impacted Files Coverage Δ
superset/connectors/sqla/models.py 81.98% <100%> (ø) ⬆️
superset/db_engine_specs/druid.py 100% <100%> (ø)
superset/db_engine_specs/__init__.py 100% <100%> (ø)
superset/db_engine_specs/gsheets.py 100% <100%> (ø)
superset/db_engine_specs/vertica.py 100% <100%> (ø)
superset/db_engine_specs/hive.py 43.75% <43.75%> (ø)
superset/db_engine_specs/drill.py 45% <45%> (ø)
superset/db_engine_specs/kylin.py 45.45% <45.45%> (ø)
superset/db_engine_specs/athena.py 46.66% <46.66%> (ø)
superset/db_engine_specs/impala.py 50% <50%> (ø)
... and 37 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 38abf4e...ed8b47b. Read the comment docs.

@villebro
Copy link
Member Author

villebro commented Jun 8, 2019

Thanks for the quick comments @john-bodley, this should now be ready.

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

LGTM - merge quick or conflict soon!

@villebro
Copy link
Member Author

villebro commented Jun 8, 2019

Pushing merge button in a few hours if no objections to avoid painful rebasing (already had 3 conflicts since initial commit).

@khtruong
Copy link
Contributor

khtruong commented Jun 8, 2019

This is awesome. Thanks so much for this!

@villebro villebro merged commit 95291fa into apache:master Jun 8, 2019
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.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 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Break up db_engine_specs and add type hints
5 participants