Skip to content

Commit

Permalink
Fixes tox.ini targets
Browse files Browse the repository at this point in the history
The format and lint tox targets are incomplete. This will make it in
line with the other rocks.
  • Loading branch information
claudiubelu committed Jul 22, 2024
1 parent e8da538 commit 70cccf6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
1 change: 0 additions & 1 deletion tests/.copyright.tmpl
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Copyright ${years} ${owner}.
See LICENSE file for licensing details
1 change: 0 additions & 1 deletion tests/integration/test_contour.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#
# Copyright 2024 Canonical, Ltd.
# See LICENSE file for licensing details
#
import json
import logging
Expand Down
1 change: 0 additions & 1 deletion tests/sanity/test_rock.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#
# Copyright 2024 Canonical, Ltd.
# See LICENSE file for licensing details
#
import os
import subprocess
Expand Down
25 changes: 14 additions & 11 deletions tests/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@ pass_env =
description = Apply coding style standards to code
deps = -r {tox_root}/requirements-dev.txt
commands =
licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root}
isort {tox_root} --profile=black
black {tox_root}
licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root}/sanity
licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root}/integration
isort {tox_root}/sanity {tox_root}/integration --profile=black
black {tox_root}/sanity {tox_root}/integration

[testenv:lint]
description = Check code against coding style standards
deps = -r {tox_root}/requirements-dev.txt
commands =
codespell {tox_root} --skip=".tox"
flake8 {tox_root}
licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root} --dry
isort {tox_root} --profile=black --check
black {tox_root} --check --diff
codespell {tox_root}/sanity {tox_root}/integration
flake8 {tox_root}/sanity {tox_root}/integration
licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root}/sanity --dry
licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root}/integration --dry
isort {tox_root}/sanity {tox_root}/integration --profile=black --check
black {tox_root}/sanity {tox_root}/integration --check --diff

[testenv:sanity]
description = Run integration tests
description = Run sanity tests
deps =
-r {tox_root}/requirements-test.txt
commands =
Expand Down Expand Up @@ -61,10 +63,11 @@ pass_env =
TEST_*
ROCK_*


[flake8]
max-line-length = 120
select = E,W,F,C,N
ignore = W503
# E231: missing whitespace after ':'
# E231 excluded for false positives in strings and fstrings.
ignore = W503,E231
exclude = venv,.git,.tox,.tox_env,.venv,build,dist,*.egg_info
show-source = true

0 comments on commit 70cccf6

Please sign in to comment.