Skip to content

Commit

Permalink
Update receptorctl noxfile to lint all python files (#1046)
Browse files Browse the repository at this point in the history
  • Loading branch information
thom-at-redhat authored May 20, 2024
1 parent b2f85b4 commit 445c311
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
15 changes: 10 additions & 5 deletions receptorctl/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@

python_versions = ["3.8", "3.9", "3.10", "3.11"]

LINT_FILES: tuple[str, ...] = (
*iglob("receptorctl/*.py"),
"setup.py",
)
LINT_FILES: tuple[str, ...] = (*iglob("**/*.py"),)
PINNED = os.environ.get("PINNED", "true").lower() in {"1", "true"}

requirements_directory = Path("requirements").resolve()
Expand Down Expand Up @@ -64,7 +61,15 @@ def coverage(session: nox.Session):
version(session)
session.install("-e", ".")
session.run(
"pytest", "--cov", "--cov-report", "term-missing:skip-covered", "--cov-report", "xml:receptorctl_coverage.xml", "--verbose", "tests", *session.posargs
"pytest",
"--cov",
"--cov-report",
"term-missing:skip-covered",
"--cov-report",
"xml:receptorctl_coverage.xml",
"--verbose",
"tests",
*session.posargs,
)


Expand Down
2 changes: 1 addition & 1 deletion receptorctl/requirements/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ packaging==24.0
# via black
pathspec==0.12.1
# via black
platformdirs==4.2.0
platformdirs==4.2.2
# via black
pycodestyle==2.11.1
# via flake8
Expand Down
14 changes: 7 additions & 7 deletions receptorctl/requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ build==1.2.1
click==8.1.7
# via pip-tools
packaging==24.0
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
# via build
pip-tools==7.4.1
# via -r requirements/pip-tools.in
pyproject-hooks==1.0.0
pyproject-hooks==1.1.0
# via pip-tools
setuptools==69.5.1
# via
# build
# pip-tools
wheel==0.43.0
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
# via pip-tools
setuptools==69.5.1
# via pip-tools
8 changes: 8 additions & 0 deletions receptorctl/requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@
#
# pip-compile --allow-unsafe --output-file=requirements/tests.txt --strip-extras requirements/tests.in
#
coverage==7.5.1
# via
# -r requirements/tests.in
# pytest-cov
iniconfig==2.0.0
# via pytest
packaging==24.0
# via pytest
pluggy==1.5.0
# via pytest
pytest==8.2.0
# via
# -r requirements/tests.in
# pytest-cov
pytest-cov==5.0.0
# via -r requirements/tests.in
2 changes: 1 addition & 1 deletion receptorctl/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import os

test_dir = os.path.dirname(os.path.realpath(__file__))
test_dir = os.path.dirname(os.path.realpath(__file__))

0 comments on commit 445c311

Please sign in to comment.