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: examples remove app context at the module level #15546

Merged

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Jul 5, 2021

SUMMARY

Remove bad patterns from the load examples, application context operations at the module level.
Configuration, database operations or other app context operations should execute/evaluate when necessary, while executing a cli operation, a web request a celery task etc, not at module load.

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@codecov
Copy link

codecov bot commented Jul 5, 2021

Codecov Report

Merging #15546 (1dc6be5) into master (15796ea) will decrease coverage by 0.09%.
The diff coverage is 35.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15546      +/-   ##
==========================================
- Coverage   76.96%   76.86%   -0.10%     
==========================================
  Files         976      976              
  Lines       51305    51319      +14     
  Branches     6912     6912              
==========================================
- Hits        39485    39445      -40     
- Misses      11601    11655      +54     
  Partials      219      219              
Flag Coverage Δ
hive 81.28% <35.00%> (-0.04%) ⬇️
mysql 81.55% <35.00%> (-0.04%) ⬇️
postgres 81.57% <35.00%> (-0.04%) ⬇️
presto ?
python 81.95% <35.00%> (-0.20%) ⬇️
sqlite 81.18% <35.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
superset/examples/country_map.py 25.64% <0.00%> (-0.68%) ⬇️
superset/examples/long_lat.py 24.39% <0.00%> (-0.61%) ⬇️
superset/examples/world_bank.py 30.55% <20.00%> (-0.44%) ⬇️
superset/examples/bart_lines.py 28.57% <25.00%> (-1.06%) ⬇️
superset/examples/energy.py 26.82% <25.00%> (-0.68%) ⬇️
superset/examples/flights.py 18.18% <25.00%> (-0.57%) ⬇️
superset/examples/multiformat_time_series.py 17.02% <25.00%> (-0.38%) ⬇️
superset/examples/paris.py 28.00% <25.00%> (-1.17%) ⬇️
superset/examples/sf_population_polygons.py 28.00% <25.00%> (-1.17%) ⬇️
superset/examples/deck.py 12.50% <33.33%> (-1.35%) ⬇️
... and 6 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 15796ea...1dc6be5. Read the comment docs.

@dpgaspar dpgaspar changed the title fix: examples avoid bad patterns fix: examples remove app context at the module level Jul 5, 2021
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Much better, thanks for cleaning this up!

@dpgaspar dpgaspar merged commit 0af5a3d into apache:master Jul 6, 2021
@dpgaspar dpgaspar deleted the danielgaspar/ch18741/fix-examples branch July 6, 2021 12:56
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.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 preset-io size/L 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants