Skip to content

Commit

Permalink
Apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
druzhinin-kirill committed Feb 27, 2024
1 parent 04f7ced commit 9731789
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 45 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

push:
branches:
- main
- master
paths-ignore:
- 'docs/**'

Expand All @@ -18,14 +18,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [ "3.8", "3.9", "3.10", "3.11" ]
python: [ "3.10", "3.11" ]

steps:
- uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: '3.8'
python-version: '3.10'

- name: Install dependencies
run: |
Expand Down
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,65 @@
# dbt-score

Linter for dbt model metadata.

## Development

### Prerequisites

You'll need the following prerequisites:

* Any Python version starting from 3.10
* [pre-commit](https://pre-commit.com/)
* [PDM](https://pdm-project.org/2.12/)

Configure development environment running these commands from the project's root:

```shell
pre-commit install
pdm install --group :all
```

### Lint

`dbt_score` uses:
* [ruff](https://docs.astral.sh/ruff/) for fast linting and formatting.
* [mypy](https://mypy.readthedocs.io/en/stable/) for type checking.
* [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks).

Cheatsheet:

```shell
pdm run ruff check .
pdm run ruff check --fix
pdm run mypy .
pre-commit run --all-files
pdm run tox -e lint
```

### Test

`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.

Cheatsheet:

```shell
pdm run tox -e py
pdm run pytest
pdm run coverage run -m pytest
```

### Docs

`dbt_score` uses:
* [mkdocs](https://www.mkdocs.org/) for docs generation.
* [mkdocstrings](https://mkdocstrings.github.io/) for automatic docs from sources.

Cheatsheet:

```shell
pdm run mkdocs build
pdm run mkdocs serve
```
40 changes: 1 addition & 39 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ authors = [
{name = "Picnic Analyst Development Platform", email = "[email protected]"}
]
dependencies = [
"dbt-core~=1.7",
"dbt-core>=1.5",
]
requires-python = ">=3.8"
requires-python = ">=3.10"
readme = "README.md"
license = {text = "MIT"}

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
env_list = py{38,39,310,311},lint,docs
env_list = py{310,311},lint,docs

skip_missing_interpreters = true

Expand Down

0 comments on commit 9731789

Please sign in to comment.