Skip to content
Snippets Groups Projects
Commit 9716b9ea authored by Hannes Feldt's avatar Hannes Feldt
Browse files

fixes

parent 2fc2125e
No related branches found
No related tags found
Loading
Pipeline #109993 failed
Pipeline: Python Binary Wheel Package

#109994

    ......@@ -62,3 +62,68 @@ exclude = [
    [tool.ruff.lint]
    ignore = ["E203"]
    [tool.tox]
    # Generative environment list to test all supported Python versions
    requires = ["tox>=4.21"]
    env_list = ["fix", "coverage", "lint", "format", "py{13, 12, 11, 10}"]
    requires = ["tox-ignore-env-name-mismatch >= 0.2.0"]
    [tool.tox.env_run_base]
    package = "editable"
    deps = [
    "-r{toxinidir}/requirements.txt",
    "-r{toxinidir}/tests/requirements.txt"]
    set_env = { LANGUAGE = "en_US", LC_ALL = "en_US.UTF-8", PYTHONWARNINGS = "default::DeprecationWarning", DYNAMIC_VERSION_SOURCE= "{toxinidir}" }
    commands = [["python", "--version"], ["python", "-m", "pytest", "tests/{posargs}"]]
    [tool.tox.env.fix]
    description = "format the code base to adhere to our styles, and complain about what we cannot do automatically"
    skip_install = true
    deps = ["pre-commit-uv>=4.1.1"]
    commands = [["pre-commit", "run", "--all-files", "--show-diff-on-failure"]]
    [tool.tox.env.coverage]
    commands = [
    ["python", "--version"],
    ["python", "-m", "pytest", "--cov-report", "term", "--cov-report", "xml", "--cov-report", "html", "--cov={{cookiecutter.project_slug}}", "tests/{posargs}"]]
    # Command prefixes to reuse the same virtualenv for all linting jobs.
    [tool.tox.env.lint]
    deps = [
    "ruff",
    "-r{toxinidir}/tests/requirements.txt"]
    commands = [
    ["python", "-m", "ruff", "--version"],
    ["python", "-m", "ruff", "check", { replace = "posargs", default = ["{{cookiecutter.project_slug}}", "tests"], extend = true }]
    ]
    [tool.tox.env.format]
    deps = [
    "ruff",
    "-r{toxinidir}/tests/requirements.txt"]
    commands = [
    ["python", "-m", "ruff", "format", "-v", { replace = "posargs", default = ["{{cookiecutter.project_slug}}", "tests"], extend = true }]
    ]
    [tool.tox.env.docs]
    deps = [
    "-r{toxinidir}/requirements.txt",
    "-r{toxinidir}/docs/requirements.txt"]
    # unset LC_ALL / LANGUAGE from testenv, would fail sphinx otherwise
    set_env = ""
    changedir = "{tox_root}"
    commands = [
    ["python", "docs/cleanup.py"],
    ["sphinx-build", "-b", "html", "docs/source", "docs/build/html"]
    ]
    [tool.tox.env.build-local]
    package = "wheel"
    deps = ["-r{toxinidir}/build-requirements.txt"]
    commands = [["python", "-m", "build"]]
    [tool.tox.env.build-ci-linux]
    package = "wheel"
    deps = ["-r{toxinidir}/build-requirements.txt"]
    commands = [["python", "-m", "cibuildwheel", "--platform", "linux", "--output-dir", "dist"]]
    [tox]
    # Generative environment list to test all supported Python versions
    envlist = py3{9,10,11,12,13},black,pep8,pylint
    min_version = 4.3.3
    requires =
    tox-ignore-env-name-mismatch >= 0.2.0
    [testenv]
    package = sdist # 'Source' package required for binary extension
    use_develop = False # use_develop implies 'editable' package, not possible
    setenv =
    PYTHONWARNINGS=default::DeprecationWarning
    DYNAMIC_VERSION_SOURCE={toxinidir}
    deps =
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/tests/requirements.txt
    commands =
    {envpython} --version
    {envpython} -m pytest tests/{posargs}
    [testenv:coverage]
    commands =
    {envpython} --version
    {envpython} -m pytest --cov-report term --cov-report xml --cov-report html --cov={{cookiecutter.project_slug}} tests/{posargs}
    # Use generative name and command prefixes to reuse the same virtualenv
    # for all linting jobs.
    [testenv:{pep8,black,pylint,format}]
    usedevelop = False
    envdir = {toxworkdir}/linting
    commands =
    pep8: {envpython} -m flake8 --version
    pep8: {envpython} -m flake8 --exclude=_version.py --max-line-length 88 --extend-ignore=E203 src tests
    black: {envpython} -m black --version
    black: {envpython} -m black --check --diff src tests
    pylint: {envpython} -m pylint --version
    pylint: {envpython} -m pylint src tests
    format: {envpython} -m autopep8 -v --max-line-length 88 -aa --in-place --recursive src
    format: {envpython} -m autopep8 -v --max-line-length 88 -aa --in-place --recursive tests
    format: {envpython} -m black -v src tests
    [testenv:docs]
    allowlist_externals =
    sh
    ; unset LC_ALL / LANGUAGE from testenv, would fail sphinx otherwise
    setenv =
    PYTHONWARNINGS=default::DeprecationWarning
    DYNAMIC_VERSION_SOURCE={toxinidir}
    deps =
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/docs/requirements.txt
    changedir = {toxinidir}
    commands =
    sh docs/cleanup.sh
    sphinx-build -b html docs/source docs/build/html
    [testenv:{build-local,build-ci-linux}]
    deps =
    -r{toxinidir}/tests/requirements.txt
    -r{toxinidir}/build-requirements.txt
    skip_install = True
    commands =
    build-local: {envpython} -m build
    build-ci-linux: {envpython} -m cibuildwheel --platform linux --output-dir dist
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment