-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fbe21e1
commit 3713325
Showing
9 changed files
with
1,318 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# PyCharm | ||
.idea | ||
|
||
# VisualStudioCode | ||
.vscode | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm-project.org/#use-with-ide | ||
.pdm.toml | ||
.pdm-python | ||
.pdm-build/ | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# ruff | ||
.ruff_cache/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ |
This file contains 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.2.2 | ||
hooks: | ||
- id: ruff | ||
args: [ --fix ] | ||
description: Run linter with fixes enabled | ||
- id: ruff-format | ||
description: Run formatter | ||
- repo: local | ||
hooks: | ||
- id: tox | ||
name: tox | ||
description: Run tox | ||
entry: pdm run tox | ||
language: system | ||
pass_filenames: false |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
# Welcome to dbt-score |
This file contains 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
site_name: dbt-score | ||
theme: | ||
name: material | ||
plugins: | ||
- search | ||
- mkdocstrings | ||
nav: | ||
- Home: index.md |
This file contains 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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
[build-system] | ||
requires = ["pdm-backend"] | ||
build-backend = "pdm.backend" | ||
|
||
[project] | ||
name = "dbt-score" | ||
dynamic = ["version"] | ||
|
||
description = "Linter for dbt model metadata." | ||
authors = [ | ||
{name = "Kirill Druzhinin", email = "[email protected]"}, | ||
{name = "Jochem van Dooren", email = "[email protected]"}, | ||
{name = "Matthieu Caneill ", email = "[email protected]"}, | ||
] | ||
dependencies = [ | ||
"dbt>=1.0.0.36.4", | ||
] | ||
requires-python = ">=3.8" | ||
readme = "README.md" | ||
license = {text = "MIT"} | ||
|
||
[tool.pdm] | ||
[tool.pdm.dev-dependencies] | ||
dev = [ | ||
"tox-pdm~=0.7.2", | ||
"tox~=4.13", | ||
] | ||
lint = [ | ||
"ruff~=0.2.2", | ||
"mypy~=1.8", | ||
] | ||
test = [ | ||
"pytest~=8.0", | ||
"coverage[toml]~=7.4" | ||
] | ||
docs = [ | ||
"mkdocs-material~=9.5", | ||
"mkdocstrings[python]~=0.24.0" | ||
] | ||
|
||
[tool.pdm.version] | ||
source = "scm" | ||
|
||
### Mypy ### | ||
|
||
[tool.mypy] | ||
strict = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = "tests.*" | ||
disallow_untyped_defs = false | ||
|
||
### Ruff ### | ||
|
||
[tool.ruff] | ||
line-length = 88 | ||
|
||
[tool.ruff.lint.mccabe] | ||
max-complexity = 10 | ||
|
||
[tool.ruff.lint.pydocstyle] | ||
convention = "google" | ||
|
||
### Coverage ### | ||
|
||
[tool.coverage.run] | ||
source = [ | ||
"tests", | ||
"src" | ||
] | ||
|
||
[tool.coverage.report] | ||
show_missing = true | ||
fail_under = 80 |
Empty file.
Empty file.
This file contains 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[tox] | ||
env_list = py38,py39,py310,py311,lint,docs | ||
|
||
skip_missing_interpreters = true | ||
|
||
[testenv] | ||
description = Run tests | ||
groups = test | ||
commands = | ||
pytest | ||
coverage run -m pytest | ||
|
||
[testenv:lint] | ||
description = Run lint | ||
groups = lint | ||
commands = | ||
ruff check . | ||
mypy . | ||
|
||
[testenv:docs] | ||
description = Build docs | ||
groups = docs | ||
commands = | ||
mkdocs build --clean |