Skip to content

Commit 652bc25

Browse files
authored
Merge pull request #817 from opsmill/develop
Merge develop into infrahub-develop
2 parents 62fcd75 + 813f3c0 commit 652bc25

3 files changed

Lines changed: 89 additions & 10 deletions

File tree

.github/pull_request_template.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<!--
2+
This template is a guide, not a gate. Use as much or as little as helps the
3+
reviewer understand your change. For straightforward PRs (dependency bumps,
4+
linting fixes, CI tweaks, typos) a one-liner description is perfectly fine
5+
-- delete the sections that don't add value.
6+
7+
Rule of thumb: the more the change affects behavior, the more sections you
8+
should fill in.
9+
-->
10+
11+
# Why
12+
13+
<!-- Problem statement: what's broken/slow/confusing/missing today? (1-3 sentences) -->
14+
15+
<!-- Goal: what outcome does this PR achieve? -->
16+
17+
<!-- Non-goals: what this PR intentionally does NOT do (prevents scope creep) -->
18+
19+
Closes <!-- #issue -->
20+
21+
## What changed
22+
23+
<!-- Group changes by intent, not by file. -->
24+
25+
<!-- Behavioral changes: what users/systems will observe differently -->
26+
-
27+
28+
<!-- Implementation notes: key design choices, tradeoffs, notable refactors -->
29+
30+
<!-- What stayed the same: especially useful if you touched sensitive areas -->
31+
<!-- e.g., "No schema changes", "API contract unchanged", "Only affects branch X" -->
32+
33+
<!-- If the diff is large, add a suggested review order:
34+
### Suggested review order
35+
1. Start with ...
36+
2. Then ...
37+
3. Tests are ...
38+
-->
39+
40+
## How to review
41+
42+
<!-- Key files/areas to focus on vs. mechanical/generated changes -->
43+
44+
<!-- Risky or uncertain parts where you want extra scrutiny -->
45+
46+
<!-- Alternatives considered (only if it affects future direction) -->
47+
48+
## How to test
49+
50+
<!-- Make it runnable and specific -->
51+
52+
```bash
53+
# Commands to validate
54+
```
55+
56+
<!-- Expected outputs, screenshots, or links to CI results -->
57+
58+
## Impact & rollout
59+
60+
<!-- Delete items that don't apply -->
61+
62+
- **Backward compatibility:** <!-- any breaking changes or migration steps -->
63+
- **Performance:** <!-- implications, measurements if relevant -->
64+
- **Config/env changes:** <!-- new settings, feature flags, env vars -->
65+
- **Deployment notes:** <!-- "safe to deploy" vs "requires coordinated release" -->
66+
67+
## Checklist
68+
69+
- [ ] Tests added/updated
70+
- [ ] Changelog entry added (`uv run towncrier create ...`)
71+
- [ ] External docs updated (if user-facing or ops-facing change)
72+
- [ ] Internal .md docs updated (internal knowledge and AI code tools knowledge)

AGENTS.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ Infrahub Python SDK - async/sync client for Infrahub infrastructure management.
77
```bash
88
uv sync --all-groups --all-extras # Install all deps
99
uv run invoke format # Format code
10-
uv run invoke lint # Lint (ruff + mypy + yamllint)
10+
uv run invoke lint # All linters (code + yamllint + documentation)
11+
uv run invoke lint-code # All linters for Python code
1112
uv run pytest tests/unit/ # Unit tests
1213
uv run pytest tests/integration/ # Integration tests
1314
```
1415

15-
## Tech Stack
16+
## Tech stack
1617

1718
Python 3.10-3.13, UV, pydantic >=2.0, httpx, graphql-core
1819

19-
## Code Pattern
20+
## Code pattern
2021

2122
```python
2223
# Always provide both async and sync versions
@@ -27,7 +28,7 @@ node = await client.get(kind="NetworkDevice")
2728
await node.save()
2829
```
2930

30-
## Project Structure
31+
## Project structure
3132

3233
```text
3334
infrahub_sdk/
@@ -38,7 +39,7 @@ infrahub_sdk/
3839
└── pytest_plugin/ # Custom pytest plugin
3940
```
4041

41-
## Markdown Style
42+
## Markdown style
4243

4344
When editing `.md` or `.mdx` files, run `uv run invoke lint-docs` before committing.
4445

@@ -52,7 +53,7 @@ Key rules:
5253

5354
**Always**
5455

55-
- Run `uv run invoke format lint` before committing Python code
56+
- Run `uv run invoke format lint-code` before committing Python code
5657
- Run markdownlint before committing markdown changes
5758
- Follow async/sync dual pattern for new features
5859
- Use type hints on all function signatures
@@ -69,7 +70,7 @@ Key rules:
6970
- Modify generated code (protocols.py)
7071
- Bypass type checking without justification
7172

72-
## Subdirectory Guides
73+
## Subdirectory guides
7374

7475
- [docs/AGENTS.md](docs/AGENTS.md) - Documentation (Docusaurus)
7576
- [infrahub_sdk/ctl/AGENTS.md](infrahub_sdk/ctl/AGENTS.md) - CLI development

tasks.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,14 @@ def lint_vale(context: Context) -> None:
218218
context.run(exec_cmd)
219219

220220

221+
@task
222+
def lint_code(context: Context) -> None:
223+
"""Run all code linters."""
224+
lint_ruff(context)
225+
lint_ty(context)
226+
lint_mypy(context)
227+
228+
221229
@task
222230
def lint_docs(context: Context) -> None:
223231
"""Run all documentation linters."""
@@ -229,9 +237,7 @@ def lint_docs(context: Context) -> None:
229237
def lint_all(context: Context) -> None:
230238
"""Run all linters."""
231239
lint_yaml(context)
232-
lint_ruff(context)
233-
lint_ty(context)
234-
lint_mypy(context)
240+
lint_code(context)
235241
lint_docs(context)
236242

237243

0 commit comments

Comments
 (0)