-
Notifications
You must be signed in to change notification settings - Fork 35
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
Exclude explores #172
Exclude explores #172
Conversation
Codecov Report
@@ Coverage Diff @@
## master #172 +/- ##
==========================================
+ Coverage 69.81% 70.26% +0.44%
==========================================
Files 10 10
Lines 795 807 +12
==========================================
+ Hits 555 567 +12
Misses 240 240
Continue to review full report at Codecov.
|
@joshtemple I think I made a bit of a meal of rebasing that, somehow, but this should now be good. |
excluded_explores = {} | ||
for model in excluded_models: | ||
# Expand wildcard operator to include all specified or discovered explores | ||
excluded_explore_names = exclusion[model.name] | ||
if "*" in excluded_explore_names: | ||
excluded_explore_names.remove("*") | ||
excluded_explore_names.update( | ||
set(explore.name for explore in model.explores) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's a situation with model_A.explore_A
and model_B.explore_A
, and the --exclude
argument is model_A.explore_A
, would this still preserve explore_A
in model_B
? Any way we can add this case to the unit tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will still preserve it. The explores to exclude are stored in lists against a key of the model name. We then only check against the explores within a given model: https://github.com/spectacles-ci/spectacles/pull/172/files#diff-cbee2ab0268f8f001868af4ca066ba04R228-R232
I'll definitely add some tests to confirm that though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshtemple I've confirmed this is the case and have added an additional test test_build_project_one_ambiguous_explore_excluded
to verify so.
I also actually re-factored some of the other tests to make the selection easier.
Co-Authored-By: Josh Temple <[email protected]>
No description provided.