From 0d3c4be9dc395c18224c6cdc1d736b5f84fa6149 Mon Sep 17 00:00:00 2001 From: Matthieu Caneill Date: Tue, 21 May 2024 14:38:59 +0200 Subject: [PATCH 1/5] Write documentation for the landing page --- docs/index.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/docs/index.md b/docs/index.md index 2443d4f..790f45a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1 +1,55 @@ # Welcome to dbt-score + +`dbt-score` is a linter for [dbt](https://www.getdbt.com/) metadata. + +dbt allows data practitioners to organize their data in to _models_. Those +models have metadata associated with them: documentation, tests, types, etc. + +`dbt-score` allows to lint and score this metadata, in order to enforce (or +encourage) good practices. + +## Example + +```shell +$ dbt-score lint +Model customers + OK dbt_score.rules.generic.has_description + WARN (medium) dbt_score.rules.generic.has_owner: Model lacks an owner. + OK dbt_score.rules.generic.sql_has_reasonable_size +Score: 6.7 +``` + +In this example, `dbt-score` reports a warning: the model `customers` does not +declare an owner. Hence, it doesn't score the maximum value of `10`. + +## Philosophy + +dbt models are often used as metadata containers: either in YAML files or +through the use of `{{ config() }}` blocks, they are associated with a lot of +information. At scale, it becomes tedious to enforce good practices in large +data teams dealing with many models. + +To that end, `dbt-score` has 2 main features: + +- It runs rules on models, and displays rule violations. Those can be used in + interactive environments or in CI. +- Using those run results, it scores models, as to give them a measure of their + maturity. This score can help gamify model metadata improvements, and be + reflected in data catalogs. + +`dbt-score` aims to: + +- Provide a predefined set of good practices (the core rules). +- Allow teams to easily add their own rules. +- Allow rule sets to be packaged and distributed. +- Be configurable to adapt to different data stacks and practices. + +## About + +`dbt-score` is free software, released under the MIT license. It originated at +Picnic Technologies in Amsterdam, Netherlands. Source code is +[available on Github](https://github.com/PicnicSupermarket/dbt-score). + +All contributions, in the form of bug reports, pull requests, feedback or +discussion are welcome. See the **contribution guide** for more information.# +Welcome to dbt-score From ffc816a1b981a28fd1dac091d9735f3fdf8a42a7 Mon Sep 17 00:00:00 2001 From: Matthieu Caneill Date: Tue, 21 May 2024 14:42:18 +0200 Subject: [PATCH 2/5] Add prettier prose wrap option --- .prettierrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..1deb191 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +proseWrap: always From d3e81909b94b4f1e3e6092de3db92e3b2cbe9e9b Mon Sep 17 00:00:00 2001 From: Matthieu Caneill Date: Tue, 21 May 2024 14:43:04 +0200 Subject: [PATCH 3/5] Remove duplicated title --- docs/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 790f45a..8b1245e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -52,4 +52,3 @@ Picnic Technologies in Amsterdam, Netherlands. Source code is All contributions, in the form of bug reports, pull requests, feedback or discussion are welcome. See the **contribution guide** for more information.# -Welcome to dbt-score From b07e422766413d9ae39f4a14a50d4feafff2e226 Mon Sep 17 00:00:00 2001 From: Matthieu Caneill Date: Tue, 21 May 2024 14:43:40 +0200 Subject: [PATCH 4/5] Remove char --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 8b1245e..611b688 100644 --- a/docs/index.md +++ b/docs/index.md @@ -51,4 +51,4 @@ Picnic Technologies in Amsterdam, Netherlands. Source code is [available on Github](https://github.com/PicnicSupermarket/dbt-score). All contributions, in the form of bug reports, pull requests, feedback or -discussion are welcome. See the **contribution guide** for more information.# +discussion are welcome. See the **contribution guide** for more information. From e4fe957eff9640b3d5bea8e3b4e138afeb59904e Mon Sep 17 00:00:00 2001 From: Matthieu Caneill Date: Tue, 21 May 2024 14:54:11 +0200 Subject: [PATCH 5/5] Prettify readme --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e7ecde0..e870828 100644 --- a/README.md +++ b/README.md @@ -12,15 +12,16 @@ You'll need the following prerequisites: - [pre-commit](https://pre-commit.com/) - [PDM](https://pdm-project.org/2.12/) -Configure development environment running these commands from the project's root: +Configure development environment running these commands from the project's +root: ```shell pre-commit install pdm install --group :all ``` -The pdm command will install all project's dependency groups, including all the dependencies needed for development -purposes. +The pdm command will install all project's dependency groups, including all the +dependencies needed for development purposes. ### Lint @@ -45,8 +46,10 @@ pdm run tox -e lint `dbt_score` uses: - [pytest](https://docs.pytest.org/) as a main test framework. -- [coverage](https://coverage.readthedocs.io/en/latest/index.html) for test coverage. -- [tox](https://tox.wiki/en/latest/) for testing against multiple Python versions. +- [coverage](https://coverage.readthedocs.io/en/latest/index.html) for test + coverage. +- [tox](https://tox.wiki/en/latest/) for testing against multiple Python + versions. Cheatsheet: @@ -61,7 +64,8 @@ pdm run coverage run -m pytest `dbt_score` uses: - [mkdocs](https://www.mkdocs.org/) for docs generation. -- [mkdocstrings](https://mkdocstrings.github.io/) for automatic docs from sources. +- [mkdocstrings](https://mkdocstrings.github.io/) for automatic docs from + sources. Cheatsheet: