Skip to content

Commit e419376

Browse files
authored
Codegen cleanup, Dependabot migration, OpenAPI spec refresh (#28)
* Remove no-op class_overrides from codegen config The keys Gate_QisGate / Gate_NativeGate never matched anything: openapi-python-client looks up class_overrides by the post-pascal_case ClassName (GateQisGate / GateNativeGate), so the underscore-form keys were silently ignored. Generated output is unchanged. * Migrate dependency updates from Renovate to Dependabot Renovate isn't installed on the org and going public doesn't change that - the renovate.json was inert. Dependabot is GitHub-native (no third-party app/ToS), free for public repos, and fully covers this repo's surface (uv lockfile + pinned GitHub Actions). Behavior preserved: - Weekly Monday schedule - "dependencies" label on every PR - Grouped Action updates (single PR per week) Behavior added (industry standard per GitHub 2026 docs / Astral docs): - 7-day cooldown to skip day-zero releases - Grouped Python updates Behavior dropped (intentional): - Auto-merge of Action updates. Dependabot lacks native automerge; adding it requires a separate workflow + a SHA-pinned auxiliary action. Reviewing one grouped weekly Action-bump PR is acceptable overhead. Easy to add later if it isn't. Pre-commit hook revs (.pre-commit-config.yaml) are not covered by Dependabot. Update via `pre-commit autoupdate` periodically; this matches what was effectively happening with Renovate too, since Renovate config didn't enable the pre-commit manager. * Add pre-commit ecosystem to Dependabot config GitHub announced native pre-commit support on 2026-03-10. Dependabot now parses .pre-commit-config.yaml and bumps the rev field across all hooks. Same weekly schedule + cooldown + grouping as the other ecosystems, so all weekly updates land on Mondays. Source: https://github.blog/changelog/2026-03-10-dependabot-now-supports-pre-commit-hooks/ * Add tiered cooldown and reorder Dependabot ecosystems Per-semver cooldown (3/7/30 days for patch/minor/major) extends the supply-chain wait window for major bumps while keeping patches snappy. Ecosystem order now follows the prevailing convention used by pypa/pip, psf/requests, cpython, and fastapi: github-actions before uv before pre-commit. * Limit semver cooldown tiers to the uv ecosystem Dependabot rejected per-semver cooldown keys on github-actions and pre-commit ecosystems - those tiers are only valid on semver-versioned package managers. Keep the 3/7/30 tiers on uv; both other ecosystems fall back to default-days only. * Refresh vendored OpenAPI spec from upstream Closes #26 * Normalize line endings to LF via .gitattributes Adds `* text=auto eol=lf` so Windows checkouts match the LF used by CI, Docker, and our linters/formatters. * Drop EOL normalization rule from .gitattributes No-op for the current contributor base (macOS dev, Linux CI). Trim back to just the Linguist classifications.
1 parent d157c32 commit e419376

5 files changed

Lines changed: 47 additions & 28 deletions

File tree

.gitattributes

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Auto-generated by openapi-python-client.
22
ionq_core/__init__.py linguist-generated=true
3-
ionq_core/client.py linguist-generated=true
4-
ionq_core/errors.py linguist-generated=true
5-
ionq_core/types.py linguist-generated=true
6-
ionq_core/api/** linguist-generated=true
7-
ionq_core/models/** linguist-generated=true
3+
ionq_core/client.py linguist-generated=true
4+
ionq_core/errors.py linguist-generated=true
5+
ionq_core/types.py linguist-generated=true
6+
ionq_core/api/** linguist-generated=true
7+
ionq_core/models/** linguist-generated=true
88

99
# Vendored upstream OpenAPI spec.
1010
openapi.json linguist-vendored=true
1111

12-
# Lockfiles.
12+
# Lockfile.
1313
uv.lock linguist-generated=true

.github/dependabot.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
labels: ["dependencies"]
9+
groups:
10+
actions:
11+
patterns: ["*"]
12+
cooldown:
13+
default-days: 7
14+
15+
- package-ecosystem: "uv"
16+
directory: "/"
17+
schedule:
18+
interval: "weekly"
19+
day: "monday"
20+
labels: ["dependencies"]
21+
groups:
22+
python:
23+
patterns: ["*"]
24+
cooldown:
25+
default-days: 7
26+
semver-major-days: 30
27+
semver-minor-days: 7
28+
semver-patch-days: 3
29+
30+
- package-ecosystem: "pre-commit"
31+
directory: "/"
32+
schedule:
33+
interval: "weekly"
34+
day: "monday"
35+
labels: ["dependencies"]
36+
groups:
37+
pre-commit:
38+
patterns: ["*"]
39+
cooldown:
40+
default-days: 7

openapi-python-client-config.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,3 @@ post_hooks:
77
- "perl -0777 -pi -e 's/\\A(?!# SPDX-FileCopyrightText)/# SPDX-FileCopyrightText: 2026 IonQ, Inc.\\n# SPDX-License-Identifier: Apache-2.0\\n# \\@generated\\n\\n/' $(find . -name '*.py')"
88
- "ruff check . --fix-only"
99
- "ruff format ."
10-
11-
class_overrides:
12-
Gate_QisGate:
13-
class_name: QisGateInstruction
14-
module_name: qis_gate_instruction
15-
Gate_NativeGate:
16-
class_name: NativeGateInstruction
17-
module_name: native_gate_instruction

openapi.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

renovate.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)