Skip to content
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fb4fa60
Initial plan
Copilot Nov 24, 2025
9496644
Add ancestors and descendants support for hierarchical nodes
Copilot Nov 24, 2025
b79cef0
Add comprehensive tests for hierarchical nodes ancestors and descendants
Copilot Nov 24, 2025
a5146dd
Address code review feedback - remove redundant conditional checks
Copilot Nov 24, 2025
0ba9ef2
IHS-176: Remove `is_visible` property from attribute metadata (#603)
solababs Nov 27, 2025
2191f4e
Add parent and children as well
BeArchiTek Nov 27, 2025
d21c500
Python 3.14
ogenstad Nov 28, 2025
d7a7046
Set vale to ignore yaml files
ogenstad Nov 28, 2025
4bcfc7e
Validate uv.lock in CI
ogenstad Nov 28, 2025
e188689
Fix hierarchy support validation in InfrahubNode and InfrahubNodeSync
BeArchiTek Nov 28, 2025
0259a78
linter
BeArchiTek Nov 28, 2025
489d6f9
Merge pull request #664 from opsmill/pog-vale-ignore-yaml
ogenstad Nov 28, 2025
f98b496
Fix _artifact_support to correctly check for CoreArtifactTarget
BeArchiTek Nov 28, 2025
983da61
Merge pull request #665 from opsmill/pog-check-uv-lock
ogenstad Nov 28, 2025
5093a3f
Add AGENTS files (#609)
dgarros Nov 30, 2025
6daaf83
Resolve merge conflicts
ogenstad Dec 2, 2025
17cf122
Fix table
ogenstad Dec 2, 2025
1b6791f
Merge pull request #659 from opsmill/copilot/add-hierarchical-nodes-s…
BeArchiTek Dec 2, 2025
1e2a513
Merge pull request #674 from opsmill/pog-stable-to-develop-20251202
ogenstad Dec 2, 2025
72481ab
Fix linting violations after merge
ogenstad Dec 2, 2025
3b4148f
Merge pull request #675 from opsmill/pog-new-linting-violations
ogenstad Dec 2, 2025
0228a55
Merge pull request #677 from opsmill/stable
ogenstad Dec 3, 2025
7dbe178
chore: upgrade whenever for py3.14 compat
fatih-acar Dec 6, 2025
0c19e68
Merge pull request #683 from opsmill/stable
ogenstad Dec 9, 2025
632eed1
Add newsfragment
ogenstad Dec 9, 2025
f739954
Merge pull request #663 from opsmill/pog-python-3.14
ogenstad Dec 9, 2025
2a87394
Initial plan
Copilot Dec 10, 2025
fb57960
Fix boolean logic error in hierarchy support detection
Copilot Dec 10, 2025
e9e214a
Merge pull request #688 from opsmill/copilot/sub-pr-687
BeArchiTek Dec 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,28 @@ jobs:
env:
SHELLCHECK_OPTS: --exclude=SC2086 --exclude=SC2046 --exclude=SC2004 --exclude=SC2129

uv-lock-check:
if: |
needs.files-changed.outputs.uv_files == 'true' ||
needs.files-changed.outputs.github_workflows == 'true'
needs:
- files-changed
- prepare-environment
runs-on: "ubuntu-latest"
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
- name: "Set up Python"
uses: "actions/setup-python@v6"
with:
python-version: "3.12"
- name: "Install uv"
uses: astral-sh/setup-uv@v7
with:
version: ${{ needs.prepare-environment.outputs.UV_VERSION }}
- name: "Validate pyproject.toml and consistency with uv.lock"
run: uv lock --locked --offline

documentation:
defaults:
Expand Down Expand Up @@ -229,6 +251,7 @@ jobs:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
if: |
always() && !cancelled() &&
!contains(needs.*.result, 'failure') &&
Expand Down
5 changes: 5 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ BlockIgnores = (?s) *((import.*?\n)|(```.*?```\n))
# in files like pyproject.toml
BasedOnStyles =

[*.yml]
# Ignore all rules for yaml files, to prevent false positives
# in files for GitHub Actions or other CI/CD configurations
BasedOnStyles =

[*]
BasedOnStyles = Infrahub
4 changes: 4 additions & 0 deletions .vale/styles/spelling-exceptions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ Containerlab
content_type
convert_query_response
coroutine
callouts
cypher
Dagster
datastore
Diataxis
default_branch
default_filter
deserialized
Expand All @@ -42,6 +44,7 @@ eslint
excalidraw
fanout
file_path
frontmatter
generator_definition
generator_definitions
github
Expand Down Expand Up @@ -114,6 +117,7 @@ template_path
toml
Towncrier
towncrier
Typer
uncheck
uniqueness_constraints
userinfo
Expand Down
77 changes: 77 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# AGENTS.md

Infrahub Python SDK - async/sync client for Infrahub infrastructure management.

## Commands

```bash
uv sync --all-groups --all-extras # Install all deps
uv run invoke format # Format code
uv run invoke lint # Lint (ruff + mypy + yamllint)
uv run pytest tests/unit/ # Unit tests
uv run pytest tests/integration/ # Integration tests
```

## Tech Stack

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

## Code Pattern

```python
# Always provide both async and sync versions
client = InfrahubClient() # async
client = InfrahubClientSync() # sync

node = await client.get(kind="NetworkDevice")
await node.save()
```

## Project Structure

```text
infrahub_sdk/
├── client.py # Main client implementations
├── config.py # Pydantic configuration
├── node/ # Node system (core data model)
├── ctl/ # CLI (infrahubctl)
└── pytest_plugin/ # Custom pytest plugin
```

## Markdown Style

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

Key rules:

- Use `text` language for directory structure code blocks
- Add blank lines before and after lists
- Always specify language in fenced code blocks (`python`, `bash`, `text`)

## Boundaries

✅ **Always**

- Run `uv run invoke format lint` before committing Python code
- Run markdownlint before committing markdown changes
- Follow async/sync dual pattern for new features
- Use type hints on all function signatures

⚠️ **Ask first**

- Adding new dependencies
- Changing public API signatures

🚫 **Never**

- Push to GitHub automatically (always wait for user approval)
- Mix async/sync inappropriately
- Modify generated code (protocols.py)
- Bypass type checking without justification

## Subdirectory Guides

- [docs/AGENTS.md](docs/AGENTS.md) - Documentation (Docusaurus)
- [infrahub_sdk/ctl/AGENTS.md](infrahub_sdk/ctl/AGENTS.md) - CLI development
- [infrahub_sdk/pytest_plugin/AGENTS.md](infrahub_sdk/pytest_plugin/AGENTS.md) - Pytest plugin
- [tests/AGENTS.md](tests/AGENTS.md) - Testing
Loading