Skip to content

Commit

Permalink
Merge pull request #20 from conformist-mw/extend_tox_improve_readme
Browse files Browse the repository at this point in the history
Extend tox, improve readme
  • Loading branch information
conformist-mw authored Jan 16, 2024
2 parents ebcc9a1 + c5b9676 commit eb31a02
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ It is enough to install the package and apply the decorator to the desired
pip install django-query-counter
```

Please take note that the colored and reformatted SQL output depicted in
the readme screenshots may not be achieved unless the specified additional
packages are installed (which maybe already installed):

- colorize requires [pygments](https://pypi.org/project/Pygments/)

```shell
pip install Pygments
```

- reformat requires [sqlparse](https://pypi.org/project/sqlparse/)

```shell
pip install sqlparse
```

## Usage

The project can be used in two ways:
Expand Down
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ legacy_tox_ini = """
tox>=4.5
env_list =
lint
py311-django{42, 41}
py310-django{42, 41, 40, 32}
py312-django{50, 42}
py311-django{50, 42, 41}
py310-django{50, 42, 41, 40, 32}
py39-django{42, 41, 40, 32}
py38-django{42, 41, 40, 32}
Expand All @@ -18,6 +19,7 @@ legacy_tox_ini = """
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2
django42: Django>=4.2,<5.0
django50: Django>=5.0,<5.1
set_env =
PYTHONDEVMODE = 1
commands = pytest -Wa -r {posargs:.}
Expand All @@ -28,19 +30,21 @@ legacy_tox_ini = """
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[gh-actions:env]
DJANGO =
3.2: dj32
4.0: dj40
4.1: dj41
4.2: dj42
5.0: dj50
[testenv:lint]
description = run linters
skip_install = true
deps =
ruff==0.1.5
ruff==0.1.13
commands = ruff {posargs:query_counter}
"""

Expand Down

0 comments on commit eb31a02

Please sign in to comment.