Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .agents/commands/pre-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Run a subset of fast CI checks locally. These are lightweight validations that c
uv run invoke format
```

2. **Lint** (YAML, Ruff, ty, mypy, markdownlint, vale):
2. **Lint** (YAML, Ruff, ty, mypy, rumdl, vale):
```bash
uv run invoke lint
```
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,18 @@ jobs:
if: |
needs.files-changed.outputs.documentation == 'true' ||
needs.files-changed.outputs.github_workflows == 'true'
needs: ["files-changed"]
needs: ["files-changed", "prepare-environment"]
runs-on: "ubuntu-latest"
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v7"
- name: "Linting: markdownlint"
uses: DavidAnson/markdownlint-cli2-action@v23
- name: "Install uv"
uses: astral-sh/setup-uv@v7
with:
config: docs/.markdownlint.yaml
globs: |
**/*.{md,mdx}
!changelog/*.md
!.agents/commands/**
!.agents/skills/**
!.claude/commands/**
!.claude/skills/**
!dev/commands/**
!dev/skills/**
!.specify/templates/**
!.specify/extensions/**
version: ${{ needs.prepare-environment.outputs.UV_VERSION }}
- name: "Linting: rumdl"
run: "uvx rumdl@0.2.28 check ."

action-lint:
if: needs.files-changed.outputs.github_workflows == 'true'
Expand Down
15 changes: 0 additions & 15 deletions .markdownlint-cli2.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Foundational library for programmatically interacting with Infrahub. Abstracts t
```bash
uv sync --all-groups --all-extras # Install all deps
uv run invoke format # Format code
uv run invoke lint # Full pipeline: ruff, yamllint, ty, mypy, markdownlint, vale
uv run invoke lint # Full pipeline: ruff, yamllint, ty, mypy, rumdl, vale
uv run invoke lint-code # All linters for Python code
uv run invoke docs-generate # Generate all docs (CLI + SDK)
uv run invoke docs-validate # Check generated docs match committed version
Expand Down
1 change: 1 addition & 0 deletions changelog/1138.housekeeping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replaced `markdownlint-cli2` with [rumdl](https://github.com/rvben/rumdl) for markdown linting. This removes the Node.js/npm dependency for the markdown check, speeds up linting, and consolidates the configuration into `pyproject.toml` under `[tool.rumdl]`.
9 changes: 9 additions & 0 deletions dev/constitution.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,55 @@
# [PROJECT_NAME] Constitution

<!-- Example: Spec Constitution, TaskFlow Constitution, etc. -->

## Core Principles

### [PRINCIPLE_1_NAME]

<!-- Example: I. Library-First -->
[PRINCIPLE_1_DESCRIPTION]
<!-- Example: Every feature starts as a standalone library; Libraries must be self-contained, independently testable, documented; Clear purpose required - no organizational-only libraries -->

### [PRINCIPLE_2_NAME]

<!-- Example: II. CLI Interface -->
[PRINCIPLE_2_DESCRIPTION]
<!-- Example: Every library exposes functionality via CLI; Text in/out protocol: stdin/args → stdout, errors → stderr; Support JSON + human-readable formats -->

### [PRINCIPLE_3_NAME]

<!-- Example: III. Test-First (NON-NEGOTIABLE) -->
[PRINCIPLE_3_DESCRIPTION]
<!-- Example: TDD mandatory: Tests written → User approved → Tests fail → Then implement; Red-Green-Refactor cycle strictly enforced -->

### [PRINCIPLE_4_NAME]

<!-- Example: IV. Integration Testing -->
[PRINCIPLE_4_DESCRIPTION]
<!-- Example: Focus areas requiring integration tests: New library contract tests, Contract changes, Inter-service communication, Shared schemas -->

### [PRINCIPLE_5_NAME]

<!-- Example: V. Observability, VI. Versioning & Breaking Changes, VII. Simplicity -->
[PRINCIPLE_5_DESCRIPTION]
<!-- Example: Text I/O ensures debuggability; Structured logging required; Or: MAJOR.MINOR.BUILD format; Or: Start simple, YAGNI principles -->

## [SECTION_2_NAME]

<!-- Example: Additional Constraints, Security Requirements, Performance Standards, etc. -->

[SECTION_2_CONTENT]
<!-- Example: Technology stack requirements, compliance standards, deployment policies, etc. -->

## [SECTION_3_NAME]

<!-- Example: Development Workflow, Review Process, Quality Gates, etc. -->

[SECTION_3_CONTENT]
<!-- Example: Code review requirements, testing gates, deployment approval process, etc. -->

## Governance

<!-- Example: Constitution supersedes all other practices; Amendments require documentation, approval, migration plan -->

[GOVERNANCE_RULES]
Expand Down
15 changes: 0 additions & 15 deletions docs/.markdownlint.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions docs/docs/python-sdk/guides/installation.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Installing infrahub-sdk
---

# Installing infrahub-sdk

The Infrahub SDK for Python is available on [PyPI](https://pypi.org/project/infrahub-sdk/) and can be installed using the pip package installer. It is recommended to install the SDK into a virtual environment.
Expand All @@ -15,25 +16,33 @@ pip install infrahub-sdk

Extras can be installed as part of the Python SDK and are not installed by default.
<!-- vale off -->

### ctl

<!-- vale on -->

The `ctl` extra provides the `infrahubctl` command, which allows you to interact with an Infrahub instance.

```shell
pip install 'infrahub-sdk[ctl]'
```

<!-- vale off -->

### tests

<!-- vale on -->

The `tests` extra provides all the components for the testing framework of Transforms, Queries and Checks.

```shell
pip install 'infrahub-sdk[tests]'
```

<!-- vale off -->

### all

<!-- vale on -->

Installs `infrahub-sdk` together with all the extras.
Expand Down
4 changes: 3 additions & 1 deletion docs/docs/python-sdk/guides/tracking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,14 @@ This behavior ensures that the tracking group specifically reflects changes made

When enabling tracking mode with the `start_tracking` method, you can customize the tracking session with the following parameters:
<!-- vale off -->

| Parameter | Description |
|------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| **identifier** | Unique string to identify the session, used for correlating operations and logs. Defaults to "python-sdk" if not specified. |
| **params** | Optional dictionary for extra context, enabling fine-grained control over tracking. |
| **delete_unused_nodes**| Boolean indicating if nodes not referenced should be automatically deleted, helping maintain a clean state. |
| **group_type** | Type of group object for tracking, default is `CoreStandardGroup`, customizable for specific grouping logic. |

<!-- vale on -->
These parameters provide flexibility, enabling detailed auditing, efficient data management, and support for idempotent operations.

Expand Down Expand Up @@ -245,4 +247,4 @@ if group:
```

</TabItem>
</Tabs>
</Tabs>
8 changes: 8 additions & 0 deletions docs/docs/python-sdk/reference/compatibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This page documents which versions of the Infrahub Python SDK are compatible wit
Each Infrahub release pins a specific SDK version. Using the matching SDK version ensures full compatibility. Newer patch releases of the SDK within the same minor version are generally safe to use.

<!-- vale off -->

| Infrahub | Required SDK | Release date |
| --- | --- | --- |
| 1.9.x | >= 1.20.0 | April 2026 |
Expand All @@ -23,13 +24,15 @@ Each Infrahub release pins a specific SDK version. Using the matching SDK versio
| 1.1.x | >= 1.3.0 | December 2024 |
| 1.0.x | >= 1.0.0 | October 2024 |
| 0.16.x | >= 0.13.1 | September 2024 |

<!-- vale on -->

## Detailed release mapping

The table below shows the exact SDK version pinned to each Infrahub release.

<!-- vale off -->

| Infrahub | SDK version | Infrahub release date |
| --- | --- | --- |
| 1.9.3 | 1.20.0 | 2026-05-05 |
Expand Down Expand Up @@ -123,16 +126,19 @@ The table below shows the exact SDK version pinned to each Infrahub release.
| 0.16.3 | 0.14.0 | 2024-10-10 |
| 0.16.2 | 0.13.1 | 2024-10-01 |
| 0.16.1 | 0.13.1 | 2024-09-25 |

<!-- vale on -->

## Python version support

<!-- vale off -->

| SDK version | Python versions |
| --- | --- |
| >= 1.17.0 | 3.10, 3.11, 3.12, 3.13, 3.14 |
| 1.16.0 | 3.10, 3.11, 3.12, 3.13 |
| 1.13.0 - 1.15.x | 3.9, 3.10, 3.11, 3.12, 3.13 |

<!-- vale on -->

:::note
Expand All @@ -144,11 +150,13 @@ The Infrahub server requires Python 3.12 or later. The SDK supports older Python
Some SDK features require a minimum Infrahub version:

<!-- vale off -->

| Feature | Minimum SDK | Minimum Infrahub |
| --- | --- | --- |
| infrahubctl branch report | 1.19.0 | 1.7 |
| FileObject support | 1.19.0 | 1.8 |
| NumberPool support | 1.13.0 | 1.3 |

<!-- vale on -->

## General guidance
Expand Down
Loading
Loading