Skip to content

Commit bcfc7ad

Browse files
committed
fix(sdk): rename Client._configuration; skip WS for non-PVE
0 parents  commit bcfc7ad

655 files changed

Lines changed: 158638 additions & 0 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: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.9', '3.10', '3.11', '3.12']
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
cache: pip
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r requirements.txt
27+
if [ -f test-requirements.txt ]; then
28+
pip install -r test-requirements.txt
29+
fi
30+
31+
- name: Syntax check (every module parses)
32+
run: |
33+
python - <<'PY'
34+
import ast, glob, sys
35+
bad = []
36+
for f in glob.glob('clientapi_pdm/**/*.py', recursive=True):
37+
try: ast.parse(open(f).read())
38+
except SyntaxError as e: bad.append((f, str(e)))
39+
if bad:
40+
for f, e in bad: print(f, e)
41+
sys.exit(1)
42+
PY
43+
44+
- name: Import check
45+
run: python -c "import clientapi_pdm; print(clientapi_pdm.__version__)"

.github/workflows/publish.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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+
# The release tag is the authoritative version source — overwrite
30+
# pyproject.toml and setup.py with the tag name (minus the leading
31+
# `v`) so PyPI sees the value the release was cut at, regardless
32+
# of what the SDK was synced with. Enables intra-day releases via
33+
# PEP 440 post-release tags: `v2026.5.23-1` → `2026.5.23.post1`,
34+
# `v2026.5.23-2` → `2026.5.23.post2`, etc. (PyPI's PEP 440
35+
# normalizer rewrites the dash form on upload.) Skipped for
36+
# workflow_dispatch runs — the manual trigger uses whatever's
37+
# already in the working tree.
38+
- name: Set version from release tag
39+
if: github.event_name == 'release'
40+
run: |
41+
set -eu
42+
TAG="${GITHUB_REF_NAME#v}"
43+
echo "Using version: $TAG (from tag $GITHUB_REF_NAME)"
44+
sed -i -E "s/^version = \".*\"/version = \"${TAG}\"/" pyproject.toml
45+
sed -i -E "s/^VERSION = \".*\"/VERSION = \"${TAG}\"/" setup.py
46+
grep -E '^version|^VERSION' pyproject.toml setup.py
47+
48+
- name: Install build backend
49+
run: |
50+
python -m pip install --upgrade pip
51+
pip install build
52+
53+
- name: Build sdist + wheel
54+
run: python -m build
55+
56+
- name: Publish to PyPI
57+
uses: pypa/gh-action-pypi-publish@release/v1
58+
with:
59+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
venv/
48+
.venv/
49+
.python-version
50+
.pytest_cache
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
59+
# Sphinx documentation
60+
docs/_build/
61+
62+
# PyBuilder
63+
target/
64+
65+
# Ipython Notebook
66+
.ipynb_checkpoints

.gitlab-ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# NOTE: This file is auto generated by OpenAPI Generator.
2+
# URL: https://openapi-generator.tech
3+
#
4+
# ref: https://docs.gitlab.com/ee/ci/README.html
5+
# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
6+
7+
stages:
8+
- test
9+
10+
.pytest:
11+
stage: test
12+
script:
13+
- pip install -r requirements.txt
14+
- pip install -r test-requirements.txt
15+
- pytest --cov=clientapi_pdm
16+
17+
pytest-3.10:
18+
extends: .pytest
19+
image: python:3.10-alpine
20+
pytest-3.11:
21+
extends: .pytest
22+
image: python:3.11-alpine
23+
pytest-3.12:
24+
extends: .pytest
25+
image: python:3.12-alpine
26+
pytest-3.13:
27+
extends: .pytest
28+
image: python:3.13-alpine
29+
pytest-3.14:
30+
extends: .pytest
31+
image: python:3.14-alpine

.openapi-generator-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

0 commit comments

Comments
 (0)