From 1f52da23ea624a1e5ec081960a08120eb59d1833 Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Wed, 8 Jan 2025 15:42:39 +0100 Subject: [PATCH] fix python versions in nox sessions --- .gitlab-ci.yml | 2 +- noxfile.py | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7f14fed..5dc8fb4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,7 +36,7 @@ testsuite: - docker before_script: - pip install "git+https://i10git.cs.fau.de/pycodegen/pystencils.git@v2.0-dev" - - pip install -e .[tests] + - pip install -e .[testsuite] script: - pytest -v --cov=src/pystencilssfg --cov-report=term --cov-config=pyproject.toml - coverage html diff --git a/noxfile.py b/noxfile.py index a88045a..90ffeff 100644 --- a/noxfile.py +++ b/noxfile.py @@ -18,7 +18,7 @@ def add_pystencils_git(session: nox.Session): "--branch", "v2.0-dev", "--single-branch", - "git@i10git.cs.fau.de:pycodegen/pystencils.git", + "https://i10git.cs.fau.de/pycodegen/pystencils.git", pystencils_dir, external=True, ) @@ -29,10 +29,12 @@ def editable_install(session: nox.Session, opts: Sequence[str] = ()): add_pystencils_git(session) if opts: opts_str = "[" + ",".join(opts) + "]" + else: + opts_str = "" session.install("-e", f".{opts_str}") -@nox.session(tags=["qa", "code-quality"]) +@nox.session(python="3.10", tags=["qa", "code-quality"]) def lint(session: nox.Session): """Lint code using flake8""" @@ -40,7 +42,7 @@ def lint(session: nox.Session): session.run("flake8", "src/pystencilssfg") -@nox.session(tags=["qa", "code-quality"]) +@nox.session(python="3.10", tags=["qa", "code-quality"]) def typecheck(session: nox.Session): """Run MyPy for static type checking""" editable_install(session) @@ -48,7 +50,7 @@ def typecheck(session: nox.Session): session.run("mypy", "src/pystencilssfg") -@nox.session(tags=["tests"]) +@nox.session(python=["3.10"], tags=["tests"]) def testsuite(session: nox.Session): """Run the testsuite and measure coverage.""" editable_install(session, ["testsuite"]) @@ -69,7 +71,7 @@ def report_coverage(session: nox.Session): session.run("coverage", "xml") -@nox.session(tags=["docs"]) +@nox.session(python=["3.10"], tags=["docs"]) def docs(session: nox.Session): """Build the documentation pages""" editable_install(session, ["docs"]) -- GitLab