pyproject-api 1.7.1__tar.gz → 1.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyproject_api-1.7.2/.github/workflows/check.yaml +65 -0
- pyproject_api-1.7.2/.github/workflows/release.yaml +48 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/.pre-commit-config.yaml +4 -5
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/PKG-INFO +6 -8
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/README.md +1 -3
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/pyproject.toml +9 -8
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/src/pyproject_api/_frontend.py +1 -1
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/src/pyproject_api/_version.py +2 -2
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/src/pyproject_api/_via_fresh_subprocess.py +1 -1
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/tests/test_frontend.py +1 -1
- pyproject_api-1.7.2/tox.ini +88 -0
- pyproject_api-1.7.1/.github/workflows/check.yml +0 -93
- pyproject_api-1.7.1/.github/workflows/release.yml +0 -27
- pyproject_api-1.7.1/tox.ini +0 -87
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/.github/dependabot.yml +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/.github/release.yml +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/.gitignore +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/.readthedocs.yml +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/CODE_OF_CONDUCT.md +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/LICENSE +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/docs/api.rst +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/docs/conf.py +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/docs/index.rst +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/src/pyproject_api/__init__.py +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/src/pyproject_api/__main__.py +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/src/pyproject_api/_backend.py +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/src/pyproject_api/_backend.pyi +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/src/pyproject_api/_util.py +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/src/pyproject_api/py.typed +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/tests/_build_sdist.py +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/tests/demo_pkg_inline/build.py +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/tests/demo_pkg_inline/pyproject.toml +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/tests/test_backend.py +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/tests/test_frontend_setuptools.py +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/tests/test_main.py +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/tests/test_util.py +0 -0
- {pyproject_api-1.7.1 → pyproject_api-1.7.2}/tests/test_version.py +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: check
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
tags-ignore: ["**"]
|
|
7
|
+
pull_request:
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "0 8 * * *"
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: check-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
name: test ${{ matrix.env }} - ${{ matrix.os }}
|
|
18
|
+
runs-on: ${{ matrix.os }}
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
env:
|
|
23
|
+
- "3.13"
|
|
24
|
+
- "3.12"
|
|
25
|
+
- "3.11"
|
|
26
|
+
- "3.10"
|
|
27
|
+
- "3.9"
|
|
28
|
+
- "3.8"
|
|
29
|
+
- type
|
|
30
|
+
- dev
|
|
31
|
+
- pkg_meta
|
|
32
|
+
os:
|
|
33
|
+
- ubuntu-latest
|
|
34
|
+
- windows-latest
|
|
35
|
+
- macos-latest
|
|
36
|
+
exclude:
|
|
37
|
+
- { os: macos-latest, env: "type" }
|
|
38
|
+
- { os: macos-latest, env: "dev" }
|
|
39
|
+
- { os: macos-latest, env: "pkg_meta" }
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
with:
|
|
43
|
+
fetch-depth: 0
|
|
44
|
+
- name: Install the latest version of uv
|
|
45
|
+
uses: astral-sh/setup-uv@v3
|
|
46
|
+
with:
|
|
47
|
+
enable-cache: true
|
|
48
|
+
cache-dependency-glob: "pyproject.toml"
|
|
49
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
50
|
+
- name: Add .local/bin to Windows PATH
|
|
51
|
+
if: runner.os == 'Windows'
|
|
52
|
+
shell: bash
|
|
53
|
+
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
|
|
54
|
+
- name: Install tox
|
|
55
|
+
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
|
|
56
|
+
- name: Install Python
|
|
57
|
+
if: startsWith(matrix.env, '3.') && matrix.env != '3.13'
|
|
58
|
+
run: uv python install --python-preference only-managed ${{ matrix.env }}
|
|
59
|
+
- name: Setup test suite
|
|
60
|
+
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.env }}
|
|
61
|
+
- name: Run test suite
|
|
62
|
+
run: tox run --skip-pkg-install -e ${{ matrix.env }}
|
|
63
|
+
env:
|
|
64
|
+
PYTEST_ADDOPTS: "-vv --durations=20"
|
|
65
|
+
DIFF_AGAINST: HEAD
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Release to PyPI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags: ["*"]
|
|
5
|
+
|
|
6
|
+
env:
|
|
7
|
+
dists-artifact-name: python-package-distributions
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
16
|
+
- name: Install the latest version of uv
|
|
17
|
+
uses: astral-sh/setup-uv@v3
|
|
18
|
+
with:
|
|
19
|
+
enable-cache: true
|
|
20
|
+
cache-dependency-glob: "pyproject.toml"
|
|
21
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
- name: Build package
|
|
23
|
+
run: uv build --python 3.13 --python-preference only-managed --sdist --wheel . --out-dir dist
|
|
24
|
+
- name: Store the distribution packages
|
|
25
|
+
uses: actions/upload-artifact@v4
|
|
26
|
+
with:
|
|
27
|
+
name: ${{ env.dists-artifact-name }}
|
|
28
|
+
path: dist/*
|
|
29
|
+
|
|
30
|
+
release:
|
|
31
|
+
needs:
|
|
32
|
+
- build
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
environment:
|
|
35
|
+
name: release
|
|
36
|
+
url: https://pypi.org/project/pyproject-api/${{ github.ref_name }}
|
|
37
|
+
permissions:
|
|
38
|
+
id-token: write
|
|
39
|
+
steps:
|
|
40
|
+
- name: Download all the dists
|
|
41
|
+
uses: actions/download-artifact@v4
|
|
42
|
+
with:
|
|
43
|
+
name: ${{ env.dists-artifact-name }}
|
|
44
|
+
path: dist/
|
|
45
|
+
- name: Publish to PyPI
|
|
46
|
+
uses: pypa/gh-action-pypi-publish@v1.10.1
|
|
47
|
+
with:
|
|
48
|
+
attestations: true
|
|
@@ -5,7 +5,7 @@ repos:
|
|
|
5
5
|
- id: end-of-file-fixer
|
|
6
6
|
- id: trailing-whitespace
|
|
7
7
|
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
8
|
-
rev: 0.
|
|
8
|
+
rev: 0.29.2
|
|
9
9
|
hooks:
|
|
10
10
|
- id: check-github-workflows
|
|
11
11
|
args: [ "--verbose" ]
|
|
@@ -15,17 +15,16 @@ repos:
|
|
|
15
15
|
- id: codespell
|
|
16
16
|
additional_dependencies: ["tomli>=2.0.1"]
|
|
17
17
|
- repo: https://github.com/tox-dev/tox-ini-fmt
|
|
18
|
-
rev: "1.
|
|
18
|
+
rev: "1.4.0"
|
|
19
19
|
hooks:
|
|
20
20
|
- id: tox-ini-fmt
|
|
21
21
|
args: ["-p", "fix"]
|
|
22
22
|
- repo: https://github.com/tox-dev/pyproject-fmt
|
|
23
|
-
rev: "2.
|
|
23
|
+
rev: "2.2.3"
|
|
24
24
|
hooks:
|
|
25
25
|
- id: pyproject-fmt
|
|
26
|
-
additional_dependencies: ["tox>=4.15.1"]
|
|
27
26
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
28
|
-
rev: "v0.
|
|
27
|
+
rev: "v0.6.5"
|
|
29
28
|
hooks:
|
|
30
29
|
- id: ruff-format
|
|
31
30
|
- id: ruff
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pyproject-api
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.2
|
|
4
4
|
Summary: API to interact with the python pyproject.toml based projects
|
|
5
5
|
Project-URL: Changelog, https://github.com/tox-dev/pyproject-api/releases
|
|
6
6
|
Project-URL: Homepage, https://pyproject-api.readthedocs.io
|
|
@@ -32,14 +32,14 @@ Requires-Python: >=3.8
|
|
|
32
32
|
Requires-Dist: packaging>=24.1
|
|
33
33
|
Requires-Dist: tomli>=2.0.1; python_version < '3.11'
|
|
34
34
|
Provides-Extra: docs
|
|
35
|
-
Requires-Dist: furo>=2024.
|
|
36
|
-
Requires-Dist: sphinx-autodoc-typehints>=2.
|
|
35
|
+
Requires-Dist: furo>=2024.8.6; extra == 'docs'
|
|
36
|
+
Requires-Dist: sphinx-autodoc-typehints>=2.4.1; extra == 'docs'
|
|
37
37
|
Provides-Extra: testing
|
|
38
38
|
Requires-Dist: covdefaults>=2.3; extra == 'testing'
|
|
39
39
|
Requires-Dist: pytest-cov>=5; extra == 'testing'
|
|
40
40
|
Requires-Dist: pytest-mock>=3.14; extra == 'testing'
|
|
41
|
-
Requires-Dist: pytest>=8.
|
|
42
|
-
Requires-Dist: setuptools>=
|
|
41
|
+
Requires-Dist: pytest>=8.3.3; extra == 'testing'
|
|
42
|
+
Requires-Dist: setuptools>=75.1; extra == 'testing'
|
|
43
43
|
Description-Content-Type: text/markdown
|
|
44
44
|
|
|
45
45
|
# [`pyproject-api`](https://pyproject-api.readthedocs.io/en/latest/)
|
|
@@ -48,7 +48,5 @@ Description-Content-Type: text/markdown
|
|
|
48
48
|
[](https://pypi.org/project/pyproject-api/)
|
|
50
50
|
[](https://pepy.tech/project/pyproject-api)
|
|
51
|
-
[](https://github.com/psf/black)
|
|
51
|
+
[](https://github.com/tox-dev/pyproject-api/actions/workflows/check.yaml)
|
|
54
52
|
[](https://pyproject-api.readthedocs.io/en/latest/?badge=latest)
|
|
@@ -4,7 +4,5 @@
|
|
|
4
4
|
[](https://pypi.org/project/pyproject-api/)
|
|
6
6
|
[](https://pepy.tech/project/pyproject-api)
|
|
7
|
-
[](https://github.com/psf/black)
|
|
7
|
+
[](https://github.com/tox-dev/pyproject-api/actions/workflows/check.yaml)
|
|
10
8
|
[](https://pyproject-api.readthedocs.io/en/latest/?badge=latest)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
build-backend = "hatchling.build"
|
|
3
3
|
requires = [
|
|
4
4
|
"hatch-vcs>=0.4",
|
|
5
|
-
"hatchling>=1.
|
|
5
|
+
"hatchling>=1.25",
|
|
6
6
|
]
|
|
7
7
|
|
|
8
8
|
[project]
|
|
@@ -51,15 +51,15 @@ dependencies = [
|
|
|
51
51
|
"tomli>=2.0.1; python_version<'3.11'",
|
|
52
52
|
]
|
|
53
53
|
optional-dependencies.docs = [
|
|
54
|
-
"furo>=2024.
|
|
55
|
-
"sphinx-autodoc-typehints>=2.
|
|
54
|
+
"furo>=2024.8.6",
|
|
55
|
+
"sphinx-autodoc-typehints>=2.4.1",
|
|
56
56
|
]
|
|
57
57
|
optional-dependencies.testing = [
|
|
58
58
|
"covdefaults>=2.3",
|
|
59
|
-
"pytest>=8.
|
|
59
|
+
"pytest>=8.3.3",
|
|
60
60
|
"pytest-cov>=5",
|
|
61
61
|
"pytest-mock>=3.14",
|
|
62
|
-
"setuptools>=
|
|
62
|
+
"setuptools>=75.1",
|
|
63
63
|
]
|
|
64
64
|
urls.Changelog = "https://github.com/tox-dev/pyproject-api/releases"
|
|
65
65
|
urls.Homepage = "https://pyproject-api.readthedocs.io"
|
|
@@ -87,6 +87,7 @@ lint.ignore = [
|
|
|
87
87
|
"CPY", # No copyright statements
|
|
88
88
|
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
|
|
89
89
|
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
|
|
90
|
+
"DOC", # no restructuredtext support
|
|
90
91
|
"INP001", # no implicit namespaces here
|
|
91
92
|
"ISC001", # Conflict with formatter
|
|
92
93
|
"S104", # Possible binding to all interface
|
|
@@ -103,13 +104,13 @@ lint.per-file-ignores."src/pyproject_api/_backend.pyi" = [
|
|
|
103
104
|
] # https://github.com/astral-sh/ruff/issues/10077
|
|
104
105
|
lint.per-file-ignores."tests/**/*.py" = [
|
|
105
106
|
"D", # don't care about documentation in tests
|
|
106
|
-
"FBT", # don
|
|
107
|
+
"FBT", # don't care about booleans as positional arguments in tests
|
|
107
108
|
"INP001", # no implicit namespace
|
|
108
109
|
"PLC2701", # private imports
|
|
109
110
|
"PLR0913", # too many positional arguments
|
|
110
111
|
"PLR0917", # too many positional arguments
|
|
111
112
|
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
|
|
112
|
-
"S101", # asserts allowed in tests
|
|
113
|
+
"S101", # asserts allowed in tests
|
|
113
114
|
"S603", # `subprocess` call: check for execution of untrusted input
|
|
114
115
|
]
|
|
115
116
|
lint.isort = { known-first-party = [
|
|
@@ -146,7 +147,7 @@ run.plugins = [
|
|
|
146
147
|
]
|
|
147
148
|
|
|
148
149
|
[tool.mypy]
|
|
149
|
-
python_version = "3.
|
|
150
|
+
python_version = "3.12"
|
|
150
151
|
show_error_codes = true
|
|
151
152
|
strict = true
|
|
152
153
|
overrides = [
|
|
@@ -440,7 +440,7 @@ class Frontend(ABC):
|
|
|
440
440
|
self._unexpected_response("build_editable", basename, str, out, err)
|
|
441
441
|
return EditableResult(wheel_directory / basename, out, err)
|
|
442
442
|
|
|
443
|
-
def _unexpected_response(
|
|
443
|
+
def _unexpected_response(
|
|
444
444
|
self,
|
|
445
445
|
cmd: str,
|
|
446
446
|
got: Any,
|
|
@@ -36,7 +36,7 @@ class SubprocessCmdStatus(CmdStatus, Thread):
|
|
|
36
36
|
class SubprocessFrontend(Frontend):
|
|
37
37
|
"""A frontend that creates fresh subprocess at every call to communicate with the backend."""
|
|
38
38
|
|
|
39
|
-
def __init__(
|
|
39
|
+
def __init__(
|
|
40
40
|
self,
|
|
41
41
|
root: Path,
|
|
42
42
|
backend_paths: tuple[Path, ...],
|
|
@@ -11,7 +11,7 @@ from pyproject_api._frontend import BackendFailed
|
|
|
11
11
|
from pyproject_api._via_fresh_subprocess import SubprocessFrontend
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
@pytest.fixture
|
|
14
|
+
@pytest.fixture
|
|
15
15
|
def local_builder(tmp_path: Path) -> Callable[[str], Path]:
|
|
16
16
|
def _f(content: str) -> Path:
|
|
17
17
|
toml = '[build-system]\nrequires=[]\nbuild-backend = "build_tester"\nbackend-path=["."]'
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
[tox]
|
|
2
|
+
requires =
|
|
3
|
+
tox>=4.2
|
|
4
|
+
tox-uv>=1.11
|
|
5
|
+
env_list =
|
|
6
|
+
fix
|
|
7
|
+
3.13
|
|
8
|
+
3.12
|
|
9
|
+
3.11
|
|
10
|
+
3.10
|
|
11
|
+
3.9
|
|
12
|
+
3.8
|
|
13
|
+
docs
|
|
14
|
+
type
|
|
15
|
+
pkg_meta
|
|
16
|
+
skip_missing_interpreters = true
|
|
17
|
+
|
|
18
|
+
[testenv]
|
|
19
|
+
description = run the unit tests with pytest under {base_python}
|
|
20
|
+
package = wheel
|
|
21
|
+
wheel_build_env = .pkg
|
|
22
|
+
extras =
|
|
23
|
+
testing
|
|
24
|
+
pass_env =
|
|
25
|
+
DIFF_AGAINST
|
|
26
|
+
PYTES_*
|
|
27
|
+
set_env =
|
|
28
|
+
COVERAGE_FILE = {work_dir}/.coverage.{env_name}
|
|
29
|
+
COVERAGE_PROCESS_START = {tox_root}/pyproject.toml
|
|
30
|
+
_COVERAGE_SRC = {env_site_packages_dir}/sphinx_argparse_cli
|
|
31
|
+
commands =
|
|
32
|
+
pytest {tty:--color=yes} {posargs: \
|
|
33
|
+
--junitxml {work_dir}{/}junit.{env_name}.xml --cov {env_site_packages_dir}{/}pyproject_api \
|
|
34
|
+
--cov {tox_root}{/}tests --cov-fail-under=100 \
|
|
35
|
+
--cov-config=pyproject.toml --no-cov-on-fail --cov-report term-missing:skip-covered --cov-context=test \
|
|
36
|
+
--cov-report html:{env_tmp_dir}{/}htmlcov --cov-report xml:{work_dir}{/}coverage.{env_name}.xml \
|
|
37
|
+
tests}
|
|
38
|
+
|
|
39
|
+
[testenv:fix]
|
|
40
|
+
description = run static analysis and style check using flake8
|
|
41
|
+
package = skip
|
|
42
|
+
deps =
|
|
43
|
+
pre-commit-uv>=4.1.1
|
|
44
|
+
pass_env =
|
|
45
|
+
HOMEPATH
|
|
46
|
+
PROGRAMDATA
|
|
47
|
+
commands =
|
|
48
|
+
pre-commit run --all-files --show-diff-on-failure
|
|
49
|
+
python -c 'print("hint: run {envdir}/bin/pre-commit install to add checks as pre-commit hook")'
|
|
50
|
+
|
|
51
|
+
[testenv:docs]
|
|
52
|
+
description = build documentation
|
|
53
|
+
extras =
|
|
54
|
+
docs
|
|
55
|
+
commands =
|
|
56
|
+
sphinx-build -d "{env_tmp_dir}{/}doc_tree" docs "{work_dir}{/}docs_out" --color -b html {posargs} -W
|
|
57
|
+
python -c 'print(r"documentation available under file://{work_dir}{/}docs_out{/}index.html")'
|
|
58
|
+
|
|
59
|
+
[testenv:type]
|
|
60
|
+
description = run type check on code base
|
|
61
|
+
deps =
|
|
62
|
+
mypy==1.11.2
|
|
63
|
+
set_env =
|
|
64
|
+
{tty:MYPY_FORCE_COLOR = 1}
|
|
65
|
+
commands =
|
|
66
|
+
mypy src
|
|
67
|
+
mypy tests
|
|
68
|
+
|
|
69
|
+
[testenv:pkg_meta]
|
|
70
|
+
description = check that the long description is valid
|
|
71
|
+
skip_install = true
|
|
72
|
+
deps =
|
|
73
|
+
check-wheel-contents>=0.6
|
|
74
|
+
twine>=5.1.1
|
|
75
|
+
uv>=0.4.10
|
|
76
|
+
commands =
|
|
77
|
+
uv build --sdist --wheel --out-dir {env_tmp_dir} .
|
|
78
|
+
twine check {env_tmp_dir}{/}*
|
|
79
|
+
check-wheel-contents --no-config {env_tmp_dir}
|
|
80
|
+
|
|
81
|
+
[testenv:dev]
|
|
82
|
+
description = generate a DEV environment
|
|
83
|
+
package = editable
|
|
84
|
+
extras =
|
|
85
|
+
testing
|
|
86
|
+
commands =
|
|
87
|
+
uv pip tree
|
|
88
|
+
python -c 'import sys; print(sys.executable)'
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
name: check
|
|
2
|
-
on:
|
|
3
|
-
workflow_dispatch:
|
|
4
|
-
push:
|
|
5
|
-
branches: ["main"]
|
|
6
|
-
tags-ignore: ["**"]
|
|
7
|
-
pull_request:
|
|
8
|
-
schedule:
|
|
9
|
-
- cron: "0 8 * * *"
|
|
10
|
-
|
|
11
|
-
concurrency:
|
|
12
|
-
group: check-${{ github.ref }}
|
|
13
|
-
cancel-in-progress: true
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
test:
|
|
17
|
-
name: test ${{ matrix.py }} on ${{ matrix.os }}
|
|
18
|
-
runs-on: ${{ matrix.os }}
|
|
19
|
-
strategy:
|
|
20
|
-
fail-fast: false
|
|
21
|
-
matrix:
|
|
22
|
-
py:
|
|
23
|
-
- "3.13.0-beta.2"
|
|
24
|
-
- "3.12"
|
|
25
|
-
- "3.11"
|
|
26
|
-
- "3.10"
|
|
27
|
-
- "3.9"
|
|
28
|
-
- "3.8"
|
|
29
|
-
os:
|
|
30
|
-
- ubuntu-latest
|
|
31
|
-
- windows-latest
|
|
32
|
-
- macos-latest
|
|
33
|
-
steps:
|
|
34
|
-
- name: Setup python for tox
|
|
35
|
-
uses: actions/setup-python@v5
|
|
36
|
-
with:
|
|
37
|
-
python-version: "3.12"
|
|
38
|
-
- uses: actions/checkout@v4
|
|
39
|
-
with:
|
|
40
|
-
fetch-depth: 0
|
|
41
|
-
- name: Install tox-uv
|
|
42
|
-
run: python -m pip install tox-uv
|
|
43
|
-
- name: Setup python for test ${{ matrix.py }}
|
|
44
|
-
uses: actions/setup-python@v5
|
|
45
|
-
with:
|
|
46
|
-
python-version: ${{ matrix.py }}
|
|
47
|
-
- name: Pick environment to run
|
|
48
|
-
run: |
|
|
49
|
-
import os; import platform; import sys; from pathlib import Path
|
|
50
|
-
env = f'TOXENV=py{"" if platform.python_implementation() == "CPython" else "py"}3{sys.version_info.minor}'
|
|
51
|
-
print(f"Picked: {env} for {sys.version} based of {sys.executable}")
|
|
52
|
-
with Path(os.environ["GITHUB_ENV"]).open("ta") as file_handler:
|
|
53
|
-
file_handler.write(env)
|
|
54
|
-
shell: python
|
|
55
|
-
- name: Setup test suite
|
|
56
|
-
run: tox -vv --notest
|
|
57
|
-
- name: Run test suite
|
|
58
|
-
run: tox --skip-pkg-install
|
|
59
|
-
env:
|
|
60
|
-
PYTEST_ADDOPTS: "-vv --durations=20"
|
|
61
|
-
CI_RUN: "yes"
|
|
62
|
-
DIFF_AGAINST: HEAD
|
|
63
|
-
|
|
64
|
-
check:
|
|
65
|
-
name: tox env ${{ matrix.tox_env }} on ${{ matrix.os }}
|
|
66
|
-
runs-on: ${{ matrix.os }}
|
|
67
|
-
strategy:
|
|
68
|
-
fail-fast: false
|
|
69
|
-
matrix:
|
|
70
|
-
tox_env:
|
|
71
|
-
- type
|
|
72
|
-
- dev
|
|
73
|
-
- docs
|
|
74
|
-
- pkg_meta
|
|
75
|
-
os:
|
|
76
|
-
- ubuntu-latest
|
|
77
|
-
- windows-latest
|
|
78
|
-
exclude:
|
|
79
|
-
- { os: windows-latest, tox_env: pkg_meta }
|
|
80
|
-
steps:
|
|
81
|
-
- uses: actions/checkout@v4
|
|
82
|
-
with:
|
|
83
|
-
fetch-depth: 0
|
|
84
|
-
- name: Setup Python 3.12
|
|
85
|
-
uses: actions/setup-python@v5
|
|
86
|
-
with:
|
|
87
|
-
python-version: "3.12"
|
|
88
|
-
- name: Install tox-uv
|
|
89
|
-
run: python -m pip install tox-uv
|
|
90
|
-
- name: Run check for ${{ matrix.tox_env }}
|
|
91
|
-
run: tox -e ${{ matrix.tox_env }}
|
|
92
|
-
env:
|
|
93
|
-
UPGRADE_ADVISORY: "yes"
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: Release to PyPI
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
tags: ["*"]
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
release:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
environment:
|
|
10
|
-
name: release
|
|
11
|
-
url: https://pypi.org/p/pyproject-api
|
|
12
|
-
permissions:
|
|
13
|
-
id-token: write
|
|
14
|
-
steps:
|
|
15
|
-
- name: Setup python to build package
|
|
16
|
-
uses: actions/setup-python@v5
|
|
17
|
-
with:
|
|
18
|
-
python-version: "3.12"
|
|
19
|
-
- name: Install build
|
|
20
|
-
run: python -m pip install build
|
|
21
|
-
- uses: actions/checkout@v4
|
|
22
|
-
with:
|
|
23
|
-
fetch-depth: 0
|
|
24
|
-
- name: Build package
|
|
25
|
-
run: pyproject-build -s -w . -o dist
|
|
26
|
-
- name: Publish to PyPI
|
|
27
|
-
uses: pypa/gh-action-pypi-publish@v1.9.0
|
pyproject_api-1.7.1/tox.ini
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
[tox]
|
|
2
|
-
requires =
|
|
3
|
-
tox>=4.2
|
|
4
|
-
env_list =
|
|
5
|
-
fix
|
|
6
|
-
py313
|
|
7
|
-
py312
|
|
8
|
-
py311
|
|
9
|
-
py310
|
|
10
|
-
py39
|
|
11
|
-
py38
|
|
12
|
-
py37
|
|
13
|
-
type
|
|
14
|
-
docs
|
|
15
|
-
pkg_meta
|
|
16
|
-
skip_missing_interpreters = true
|
|
17
|
-
|
|
18
|
-
[testenv]
|
|
19
|
-
description = run the tests with pytest under {envname}
|
|
20
|
-
package = wheel
|
|
21
|
-
wheel_build_env = .pkg
|
|
22
|
-
extras =
|
|
23
|
-
testing
|
|
24
|
-
pass_env =
|
|
25
|
-
PYTEST_*
|
|
26
|
-
SSL_CERT_FILE
|
|
27
|
-
set_env =
|
|
28
|
-
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}{/}.coverage.{envname}}
|
|
29
|
-
commands =
|
|
30
|
-
pytest {tty:--color=yes} {posargs: --no-cov-on-fail --cov-context=test \
|
|
31
|
-
--cov={envsitepackagesdir}{/}pyproject_api --cov={toxinidir}{/}tests --cov-config={toxinidir}{/}pyproject.toml \
|
|
32
|
-
--cov-report=term-missing:skip-covered --cov-report=html:{envtmpdir}{/}htmlcov \
|
|
33
|
-
--cov-report=xml:{toxworkdir}{/}coverage.{envname}.xml --junitxml={toxworkdir}{/}junit.{envname}.xml \
|
|
34
|
-
tests}
|
|
35
|
-
labels = test
|
|
36
|
-
|
|
37
|
-
[testenv:fix]
|
|
38
|
-
description = run formatter and linters
|
|
39
|
-
skip_install = true
|
|
40
|
-
deps =
|
|
41
|
-
pre-commit>=3.7.1
|
|
42
|
-
pass_env =
|
|
43
|
-
{[testenv]passenv}
|
|
44
|
-
PROGRAMDATA
|
|
45
|
-
commands =
|
|
46
|
-
pre-commit run --all-files --show-diff-on-failure {tty:--color=always} {posargs}
|
|
47
|
-
|
|
48
|
-
[testenv:type]
|
|
49
|
-
description = run type check on code base
|
|
50
|
-
deps =
|
|
51
|
-
mypy==1.10
|
|
52
|
-
set_env =
|
|
53
|
-
{tty:MYPY_FORCE_COLOR = 1}
|
|
54
|
-
commands =
|
|
55
|
-
mypy src/pyproject_api --strict
|
|
56
|
-
mypy tests --strict
|
|
57
|
-
|
|
58
|
-
[testenv:docs]
|
|
59
|
-
description = build documentation
|
|
60
|
-
extras =
|
|
61
|
-
docs
|
|
62
|
-
commands =
|
|
63
|
-
sphinx-build -d "{envtmpdir}{/}doctree" docs "{toxworkdir}{/}docs_out" --color -b html {posargs} -W
|
|
64
|
-
python -c 'print(r"documentation available under file://{toxworkdir}{/}docs_out{/}index.html")'
|
|
65
|
-
|
|
66
|
-
[testenv:pkg_meta]
|
|
67
|
-
description = check that the long description is valid
|
|
68
|
-
skip_install = true
|
|
69
|
-
deps =
|
|
70
|
-
build[virtualenv]>=1.2.1
|
|
71
|
-
check-wheel-contents>=0.6
|
|
72
|
-
twine>=5.1
|
|
73
|
-
commands =
|
|
74
|
-
python -m build -o {envtmpdir} -s -w .
|
|
75
|
-
twine check --strict {envtmpdir}{/}*
|
|
76
|
-
check-wheel-contents --no-config {envtmpdir}
|
|
77
|
-
|
|
78
|
-
[testenv:dev]
|
|
79
|
-
description = dev environment with all deps at {envdir}
|
|
80
|
-
package = editable
|
|
81
|
-
extras =
|
|
82
|
-
docs
|
|
83
|
-
testing
|
|
84
|
-
commands =
|
|
85
|
-
python -m pip list --format=columns
|
|
86
|
-
python -c "print(r'{envpython}')"
|
|
87
|
-
uv_seed = true
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|