-
Notifications
You must be signed in to change notification settings - Fork 13
feat: lint sources #78
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
jochemvandooren
merged 41 commits into
PicnicSupermarket:master
from
otosky:lint-sources
Nov 12, 2024
Merged
Changes from 36 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
769dc07
add sources to manifest.json fixture
otosky 40d3e2e
add minimal test assertion for parsing sources
otosky 1ee0efc
fmt json
otosky e33d8b8
add Source model and parse into ManifestLoader
otosky 480b41e
add fixtures for sources
otosky 2fa3d18
infer resource_type from Rule.evaluate type annotation
otosky 141aa3c
evaluate rules for both sources and models
otosky 17ef4be
allow sources to be filtered
otosky a85ad3a
coverage
otosky 1a50d6b
no cover overload
otosky 4666419
replace occurrences of "model" with "evaluable"
otosky 213f065
refactor model_filter as rule_filter
otosky 713bdee
fmt
otosky aa9371d
update dbt_ls cmd to include sources
otosky bb2ff9b
add newline to pyproject.toml
otosky 68453dc
fix docstring
otosky feedc76
update some docstrings for naming changes
otosky 91fe1ec
update pyproject description
otosky 0fff2fc
update manifest filter
otosky 69c3df9
update _reindex_tests for sources
otosky fe1dd7f
update more model_filter renames in comments
otosky e35176b
rename config to fail_any_item_under
otosky beac2e4
update human_readable_formatter
otosky 95da946
fmt
otosky e095ffc
move check for resource_type match to `should_evaluate` method
otosky 836bb68
update docs
otosky fea456b
rename test_model_filter -> test_rule_filter
otosky ea7691f
add newline to pyproject.toml
otosky 1122273
validate that filters match the resource type of the rules they attac…
otosky eca0b1e
Final renaming of models to include sources
jochemvandooren cc40c46
fix line lengths
otosky a5b2ac1
update changelog
otosky 8ca822f
remove hard dep on more-itertools by vendoring first_true
otosky 30900c4
actually commit more_itertools replacement
otosky 6204bc4
add newline
otosky 7ecc1b2
remove breaking notice
otosky cc6b707
fix manifest_formatter for source scores
otosky ba16e64
run prettier on changelog
otosky 5ef7cae
fix import
otosky e19badc
address mypy errors
otosky 0732e15
mypy ignore Liskov violations on class-based rule/filter
otosky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ build-backend = "pdm.backend" | |
name = "dbt-score" | ||
dynamic = ["version"] | ||
|
||
description = "Linter for dbt model metadata." | ||
description = "Linter for dbt metadata." | ||
authors = [ | ||
{name = "Picnic Analyst Development Platform", email = "[email protected]"} | ||
] | ||
|
@@ -114,3 +114,7 @@ source = [ | |
[tool.coverage.report] | ||
show_missing = true | ||
fail_under = 80 | ||
exclude_also = [ | ||
"@overload" | ||
] | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
"""Init dbt_score package.""" | ||
|
||
from dbt_score.model_filter import ModelFilter, model_filter | ||
from dbt_score.models import Model | ||
from dbt_score.models import Model, Source | ||
from dbt_score.rule import Rule, RuleViolation, Severity, rule | ||
from dbt_score.rule_filter import RuleFilter, rule_filter | ||
|
||
__all__ = [ | ||
"Model", | ||
"ModelFilter", | ||
"Source", | ||
"RuleFilter", | ||
"Rule", | ||
"RuleViolation", | ||
"Severity", | ||
"model_filter", | ||
"rule_filter", | ||
"rule", | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.