Skip to content

chore: add __init__.py to feature flag test module #6209

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

Merged
merged 8 commits into from
Nov 15, 2023

Conversation

danieljhegeman
Copy link
Contributor

@danieljhegeman danieljhegeman commented Nov 10, 2023

Reason for Change

  • Optimize recently-introduced 'feature flag' service
    • Reduce code complexity
    • Add __init__.py to make sure the patch() call works on the given CorporaConfig path so that the related unit tests can be run individually using python -m pytest .... In its current state this does not work.

Changes

  • remove the FeatureFlag: Literal[]
  • modify the FeatureFlagValues to inherit from enum.Enum so as to still enforce approved feature flag values without having to use an extra FeatureFlag entity.
  • rename FeatureFlagValues -> FeatureFlag

Testing steps

  • Tests updated

Checklist 🛎️

  • Add product, design, and eng as reviewers for rdev review

  • For UI changes, add screenshots/videos, so the reviewers know what you expect them to see

  • For UI changes, add e2e tests to prevent regressions

Notes for Reviewer

Copy link
Contributor

Deployment Summary

Copy link

codecov bot commented Nov 11, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (1e902ab) 91.60% compared to head (efe81b4) 91.79%.
Report is 5 commits behind head on main.

Files Patch % Lines
backend/layers/processing/schema_migration.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6209      +/-   ##
==========================================
+ Coverage   91.60%   91.79%   +0.19%     
==========================================
  Files         175      175              
  Lines       14232    14206      -26     
==========================================
+ Hits        13037    13041       +4     
+ Misses       1195     1165      -30     
Flag Coverage Δ
unittests 91.79% <98.00%> (+0.19%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Daniel Hegeman added 3 commits November 13, 2023 10:55
This reverts commit 251e432.
fixes the current patching approach when running this module's tests
individually via python -m pytest
@danieljhegeman danieljhegeman marked this pull request as ready for review November 13, 2023 20:47
@danieljhegeman danieljhegeman changed the title feat: flag tweak chore: add __init__.py to feature flag test module Nov 13, 2023
@danieljhegeman danieljhegeman merged commit f685b23 into main Nov 15, 2023
@danieljhegeman danieljhegeman deleted the dan/feature-tweaker branch November 15, 2023 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants