Skip to content

Run nox sessions and ci in 3.11 #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1"
with:
python-version: "3.10"
python-version: "3.11"

- name: "Install nox"
run: |
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1"
with:
python-version: "3.10"
python-version: "3.11"

- name: "Install nox"
run: |
Expand Down
15 changes: 7 additions & 8 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
MODULE_NAME = "module_name"
TESTS_PATH = "tests"
COVERAGE_FAIL_UNDER = 50
DEFAULT_PYTHON_VERSION = "3.11"
VENV_PATH = "venv"
WINDOWS_PYTHON = "py"
LINUX_PYTHON = "python3"
REQUIREMENT_IN_FILES = [
pathlib.Path("requirements/requirements.in"),
pathlib.Path("requirements/requirements-dev.in"),
Expand Down Expand Up @@ -55,7 +54,7 @@ def tests_with_coverage(session: nox.Session) -> None:
session.run("coverage", "run", "-p", "-m", "pytest", TESTS_PATH)


@nox.session()
@nox.session(python=DEFAULT_PYTHON_VERSION)
def coverage_combine_and_report(session: nox.Session) -> None:
"""Combine all coverage partial files and generate JSON report."""
print_standard_logs(session)
Expand All @@ -68,7 +67,7 @@ def coverage_combine_and_report(session: nox.Session) -> None:
session.run("python", "-m", "coverage", "json")


@nox.session()
@nox.session(python=DEFAULT_PYTHON_VERSION)
def mypy_check(session: nox.Session) -> None:
"""Run mypy against package and all required dependencies."""
print_standard_logs(session)
Expand All @@ -93,7 +92,7 @@ def docker(session: nox.Session) -> None:
session.run("docker", "run", "-it", "--rm", "pydocker-test")


@nox.session()
@nox.session(python=DEFAULT_PYTHON_VERSION)
def build(session: nox.Session) -> None:
"""Build distrobution files."""
print_standard_logs(session)
Expand All @@ -113,7 +112,7 @@ def install(session: nox.Session) -> None:
venv_path = f"{venv_path}/Scripts"
activate_command = f"{venv_path}/activate"
else:
py_command = "python3"
py_command = f"python{DEFAULT_PYTHON_VERSION}"
venv_path = f"{venv_path}/bin"
activate_command = f"source {venv_path}/activate"

Expand All @@ -128,7 +127,7 @@ def install(session: nox.Session) -> None:
session.log(f"\n\nRun '{activate_command}' to enter the virtual environment.\n")


@nox.session()
@nox.session(python=DEFAULT_PYTHON_VERSION)
def update(session: nox.Session) -> None:
"""Process requirement*.in files, updating only additions/removals."""
print_standard_logs(session)
Expand All @@ -138,7 +137,7 @@ def update(session: nox.Session) -> None:
session.run("pip-compile", "--no-emit-index-url", str(filename))


@nox.session()
@nox.session(python=DEFAULT_PYTHON_VERSION)
def upgrade(session: nox.Session) -> None:
"""Process requirement*.in files and upgrade all libraries as possible."""
print_standard_logs(session)
Expand Down
28 changes: 14 additions & 14 deletions requirements/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,55 @@
#
# pip-compile --no-emit-index-url requirements/requirements-dev.in
#
black==23.10.1
black==24.2.0
# via -r requirements/requirements-dev.in
cfgv==3.4.0
# via pre-commit
click==8.1.7
# via black
distlib==0.3.7
distlib==0.3.8
# via virtualenv
filelock==3.13.0
filelock==3.13.1
# via virtualenv
flake8==6.1.0
flake8==7.0.0
# via
# -r requirements/requirements-dev.in
# flake8-builtins
flake8-builtins==2.1.0
flake8-builtins==2.2.0
# via -r requirements/requirements-dev.in
flake8-pep585==0.1.7
# via -r requirements/requirements-dev.in
identify==2.5.31
identify==2.5.35
# via pre-commit
mccabe==0.7.0
# via flake8
mypy==1.6.1
mypy==1.9.0
# via -r requirements/requirements-dev.in
mypy-extensions==1.0.0
# via
# black
# mypy
nodeenv==1.8.0
# via pre-commit
packaging==23.2
packaging==24.0
# via black
pathspec==0.11.2
pathspec==0.12.1
# via black
platformdirs==3.11.0
platformdirs==4.2.0
# via
# black
# virtualenv
pre-commit==3.5.0
pre-commit==3.6.2
# via -r requirements/requirements-dev.in
pycodestyle==2.11.1
# via flake8
pyflakes==3.1.0
pyflakes==3.2.0
# via flake8
pyyaml==6.0.1
# via pre-commit
typing-extensions==4.8.0
typing-extensions==4.10.0
# via mypy
virtualenv==20.24.6
virtualenv==20.25.1
# via pre-commit

# The following packages are considered to be unsafe in a requirements file:
Expand Down
22 changes: 11 additions & 11 deletions requirements/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@
#
# pip-compile --no-emit-index-url requirements/requirements-test.in
#
argcomplete==3.1.2
argcomplete==3.2.3
# via nox
colorlog==6.7.0
colorlog==6.8.2
# via nox
coverage==7.3.2
coverage==7.4.3
# via -r requirements/requirements-test.in
distlib==0.3.7
distlib==0.3.8
# via virtualenv
filelock==3.13.0
filelock==3.13.1
# via virtualenv
iniconfig==2.0.0
# via pytest
nox==2023.4.22
nox==2024.3.2
# via -r requirements/requirements-test.in
packaging==23.2
packaging==24.0
# via
# nox
# pytest
platformdirs==3.11.0
platformdirs==4.2.0
# via virtualenv
pluggy==1.3.0
pluggy==1.4.0
# via pytest
pytest==7.4.3
pytest==8.1.1
# via
# -r requirements/requirements-test.in
# pytest-randomly
pytest-randomly==3.15.0
# via -r requirements/requirements-test.in
virtualenv==20.24.6
virtualenv==20.25.1
# via nox