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(ImportModelsCommand): clean code, extract logic into methods #18866

Merged

Conversation

michael-hoffman-26
Copy link
Contributor

@michael-hoffman-26 michael-hoffman-26 commented Feb 23, 2022

SUMMARY

refactor the validate function of ImportModelsCommand.
extracting logic into functions with meaningful names, thats make the code cleaner.
no logic change.

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

@michael-hoffman-26 michael-hoffman-26 force-pushed the refactor-importer-validation-v1 branch from 72ba30e to d2cd27f Compare February 23, 2022 13:54
@codecov
Copy link

codecov bot commented Feb 23, 2022

Codecov Report

Merging #18866 (d2cd27f) into master (0edb979) will increase coverage by 0.00%.
The diff coverage is 100.00%.

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #18866   +/-   ##
=======================================
  Coverage   66.36%   66.37%           
=======================================
  Files        1621     1620    -1     
  Lines       63058    63047   -11     
  Branches     6382     6375    -7     
=======================================
- Hits        41851    41846    -5     
+ Misses      19547    19542    -5     
+ Partials     1660     1659    -1     
Flag Coverage Δ
hive 52.28% <27.27%> (-0.01%) ⬇️
mysql 81.55% <100.00%> (+<0.01%) ⬆️
postgres 81.60% <100.00%> (+<0.01%) ⬆️
presto 52.12% <27.27%> (-0.01%) ⬇️
python 82.04% <100.00%> (+<0.01%) ⬆️
sqlite 81.29% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
superset/commands/importers/v1/__init__.py 95.12% <100.00%> (+0.38%) ⬆️
...omponents/nativeFilters/FilterBar/Header/index.tsx 95.23% <0.00%> (-4.77%) ⬇️
...nents/nativeFilters/FilterBar/FilterSets/index.tsx 36.84% <0.00%> (-0.83%) ⬇️
...ilters/FilterBar/FilterControls/FilterControls.tsx 77.14% <0.00%> (-0.64%) ⬇️
superset-frontend/src/utils/common.js 89.28% <0.00%> (-0.19%) ⬇️
superset-frontend/src/dashboard/constants.ts 100.00% <0.00%> (ø)
superset-frontend/src/components/Button/index.tsx 100.00% <0.00%> (ø)
...frontend/plugins/plugin-chart-table/src/Styles.tsx 100.00% <0.00%> (ø)
...tend/plugins/plugin-chart-table/src/TableChart.tsx 38.57% <0.00%> (ø)
...mponents/controls/AnnotationLayerControl/index.jsx 10.16% <0.00%> (ø)
... and 4 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 0edb979...a135b59. Read the comment docs.

@michael-hoffman-26 michael-hoffman-26 changed the title [WIP]refactor(ImportModelsCommand): clean code, extract logic into methods refactor(ImportModelsCommand): clean code, extract logic into methods Feb 23, 2022
Copy link
Member

@amitmiran137 amitmiran137 left a comment

Choose a reason for hiding this comment

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

LGTM,
need to fix lint

@michael-hoffman-26 michael-hoffman-26 force-pushed the refactor-importer-validation-v1 branch 2 times, most recently from a135b59 to ec76904 Compare February 24, 2022 06:08
@michael-hoffman-26 michael-hoffman-26 force-pushed the refactor-importer-validation-v1 branch from ec76904 to 358465f Compare February 24, 2022 08:15
@amitmiran137 amitmiran137 merged commit 9fd18e9 into apache:master Feb 24, 2022
@amitmiran137 amitmiran137 deleted the refactor-importer-validation-v1 branch February 24, 2022 18:51
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 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 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants