Skip to content

Commit

Permalink
Include prettier linter
Browse files Browse the repository at this point in the history
  • Loading branch information
druzhinin-kirill committed Feb 27, 2024
1 parent 16e848a commit 67decf6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 25 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ on:
branches:
- master
paths-ignore:
- 'docs/**'
- "docs/**"

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

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: [ "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.10'
python-version: "3.10"

- name: Install dependencies
run: |
Expand Down
26 changes: 16 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
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
- 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 ]
args: [--fix]
description: Run linter with fixes enabled
- id: ruff-format
description: Run formatter
- repo: local
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
description: Run prettier
types_or: [yaml, toml, json, markdown]
- repo: local
hooks:
- id: tox_lint
name: lint
Expand Down
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Linter for dbt model metadata.

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/)
- 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:

Expand All @@ -25,9 +25,11 @@ purposes.
### 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).

- [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).
- [prettier-hooks](https://github.com/pre-commit/mirrors-prettier).

Cheatsheet:

Expand All @@ -41,9 +43,10 @@ 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.

- [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:

Expand All @@ -56,8 +59,9 @@ 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.

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

Cheatsheet:

Expand Down

0 comments on commit 67decf6

Please sign in to comment.