Skip to content

Commit ae14ca3

Browse files
committed
chore: sync from pve-openapi@0a0cd63
feat(sdk): PyPI publish workflow + clientapi_<service> Python naming
1 parent b47634e commit ae14ca3

1,554 files changed

Lines changed: 8662 additions & 8622 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
python - <<'PY'
3434
import ast, glob, sys
3535
bad = []
36-
for f in glob.glob('pve_client/**/*.py', recursive=True):
36+
for f in glob.glob('clientapi_pve/**/*.py', recursive=True):
3737
try: ast.parse(open(f).read())
3838
except SyntaxError as e: bad.append((f, str(e)))
3939
if bad:
@@ -42,4 +42,4 @@ jobs:
4242
PY
4343
4444
- name: Import check
45-
run: python -c "import pve_client; print(pve_client.__version__)"
45+
run: python -c "import clientapi_pve; print(clientapi_pve.__version__)"

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: publish
2+
3+
# Builds the package and uploads it to PyPI when a GitHub release is
4+
# published. Requires `PYPI_API_TOKEN` to be set as a repo secret
5+
# (Settings → Secrets and variables → Actions). Use a project-scoped
6+
# PyPI API token, never a user-scoped one.
7+
8+
on:
9+
release:
10+
types: [published]
11+
workflow_dispatch:
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
# `pypa/gh-action-pypi-publish` supports OIDC trusted publishing
18+
# in addition to API tokens — `id-token: write` enables that
19+
# without changing the action invocation below. Falls back to
20+
# PYPI_API_TOKEN when trusted publishing isn't configured.
21+
id-token: write
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.12'
28+
29+
- name: Install build backend
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install build
33+
34+
- name: Build sdist + wheel
35+
run: python -m build
36+
37+
- name: Publish to PyPI
38+
uses: pypa/gh-action-pypi-publish@release/v1
39+
with:
40+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ stages:
1212
script:
1313
- pip install -r requirements.txt
1414
- pip install -r test-requirements.txt
15-
- pytest --cov=pve_client
15+
- pytest --cov=clientapi_pve
1616

1717
pytest-3.10:
1818
extends: .pytest

.openapi-generator/FILES

Lines changed: 1538 additions & 1538 deletions
Large diffs are not rendered by default.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ install:
1414
- "pip install -r requirements.txt"
1515
- "pip install -r test-requirements.txt"
1616
# command to run tests
17-
script: pytest --cov=pve_client
17+
script: pytest --cov=clientapi_pve

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pve_client
1+
# clientapi_pve
22

33
Python SDK for the Proxmox Virtual Environment (PVE) API. Generated
44
from the upstream `apidoc.js` via [openapi-generator-cli][gen] with
@@ -13,7 +13,7 @@ Requires Python ≥ 3.9.
1313
## Install
1414

1515
```bash
16-
pip install pve_client
16+
pip install clientapi_pve
1717
```
1818

1919
Or for development:
@@ -25,7 +25,7 @@ pip install -r requirements.txt
2525
## Usage
2626

2727
```python
28-
from pve_client import Configuration, Pve
28+
from clientapi_pve import Configuration, Pve
2929

3030
cfg = Configuration(
3131
host='https://pve1.example.com:8006/api2/json',
@@ -49,7 +49,7 @@ PVE encodes many fields as CLI-style shorthand strings
4949
emitted for every compound config schema:
5050

5151
```python
52-
from pve_client.models import PveQemuNetConfig
52+
from clientapi_pve.models import PveQemuNetConfig
5353

5454
cfg = PveQemuNetConfig(model='virtio', bridge='vmbr0', firewall=1)
5555
shorthand = cfg.to_shorthand() # → 'virtio,bridge=vmbr0,firewall=1'

0 commit comments

Comments
 (0)