Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Python Binary Wheel Package
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON Templates
Python Binary Wheel Package
Commits
9716b9ea
Commit
9716b9ea
authored
3 months ago
by
Hannes Feldt
Browse files
Options
Downloads
Patches
Plain Diff
fixes
parent
2fc2125e
No related branches found
No related tags found
Loading
Pipeline
#109993
failed
3 months ago
Stage: prepare
Stage: lint
Stage: test
Stage: package
Stage: integration
Pipeline: Python Binary Wheel Package
#109994
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
{{cookiecutter.project_slug}}/pyproject.toml
+65
-0
65 additions, 0 deletions
{{cookiecutter.project_slug}}/pyproject.toml
{{cookiecutter.project_slug}}/tox.ini
+0
-65
0 additions, 65 deletions
{{cookiecutter.project_slug}}/tox.ini
with
65 additions
and
65 deletions
{{cookiecutter.project_slug}}/pyproject.toml
+
65
−
0
View file @
9716b9ea
...
...
@@ -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"
]]
This diff is collapsed.
Click to expand it.
{{cookiecutter.project_slug}}/tox.ini
deleted
100644 → 0
+
0
−
65
View file @
2fc2125e
[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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment