Skip to content

Conversation

@a-delannoy
Copy link

@a-delannoy a-delannoy commented Jul 23, 2025

Provide the basics for automatic Infrahub SDK API documentation generation:

  • Add the mdxify package to the dependencies
  • Generate a first version of the Infrahub SDK API documentation
  • Fix docusaurus interpretation of mdx files with Icon element in it
  • Update docusaurus sidebar configuration to include the SDK API documentation reference
  • Add an invoke task to regenerate the documentation: poetry run invoke generate-sdk-api-docs
  • Add a CI rule for checking the SDK API obsolescence and fail if it is not up to date

Summary by CodeRabbit

  • New Features

    • Added automated generation of Python SDK API documentation from code docstrings, including comprehensive reference pages for client and node modules.
    • Introduced a new documentation sidebar section for Python SDK API reference.
    • Enabled use of the Iconify Icon component in documentation MDX files.
  • Chores

    • Added a continuous integration job to check for outdated SDK API documentation.
    • Added development dependencies for API doc generation and linting.
  • Documentation

    • Improved and expanded Python SDK documentation with detailed API references.
    • Fixed minor typos and improved docstring clarity in several modules.

@a-delannoy a-delannoy self-assigned this Jul 23, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 23, 2025

Walkthrough

This update introduces automated generation of Python SDK API documentation using the mdxify tool, integrates the process into the CI workflow, and adds new, comprehensive API reference documentation pages for key SDK modules. Supporting scripts, dependencies, and sidebar configurations are updated to enable and display these docs. Minor docstring typo corrections and formatting improvements are also included.

Changes

Cohort / File(s) Change Summary
CI Workflow Integration
.github/workflows/ci.yml
Adds a new CI job to check for obsolete SDK API documentation, triggers on Python or doc changes, installs dependencies, generates docs, and checks for uncommitted changes. Minor formatting and command improvements.
SDK API Docs Generation Task
tasks.py
Adds a new Invoke task generate-sdk-api-docs to generate Python SDK API documentation using mdxify, organize output, and optionally lint the docs.
SDK API Reference Documentation
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx, docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx
Adds detailed, auto-generated API reference documentation for infrahub_sdk.client and infrahub_sdk.node.node modules, covering all public classes, methods, and functions.
Sidebar and MDX Enhancements
docs/sidebars-python-sdk.ts, docs/src/theme/MDXComponents.js, docs/package.json
Updates sidebar to include a new "Python SDK API" category with autogenerated items; adds Iconify React dependency and MDX components mapping to support icons in MDX.
Dependency Management
pyproject.toml
Adds mdxify as a development dependency for API doc generation.
Changelog
changelog/201.added.md
Adds changelog entry describing the new automatic Python SDK API documentation generation feature.
Docstring and Typo Corrections
infrahub_sdk/client.py, infrahub_sdk/ctl/utils.py, infrahub_sdk/jinja2.py, infrahub_sdk/pytest_plugin/items/base.py
Corrects typos and improves capitalization in docstrings; no logic or API changes.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant CI as GitHub Actions CI
    participant Task as Invoke Task
    participant Mdxify as mdxify Tool
    participant Docs as Documentation Output

    Dev->>CI: Push/PR changes (Python or docs)
    CI->>Task: Run generate-sdk-api-docs
    Task->>Mdxify: Generate API docs for SDK modules
    Mdxify-->>Task: Output .mdx files
    Task->>Docs: Organize and move .mdx files
    Task->>Task: Optionally run markdownlint
    Task-->>CI: Complete doc generation
    CI->>CI: Check for uncommitted doc changes
    CI-->>Dev: Report status/checks
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf30309 and a0a8686.

📒 Files selected for processing (1)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: unit-tests (3.13)
  • GitHub Check: unit-tests (3.11)
  • GitHub Check: unit-tests (3.12)
  • GitHub Check: unit-tests (3.9)
  • GitHub Check: unit-tests (3.10)
  • GitHub Check: integration-tests-latest-infrahub
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ady-add-api-doc-generation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or Summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added group/ci Issue related to the CI pipeline type/documentation Improvements or additions to documentation labels Jul 23, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

♻️ Duplicate comments (2)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/transform.mdx (1)

10-10: Same Icon component consideration applies here.

As with other documentation files, verify that the Icon component usage is compatible with Docusaurus MDX processing.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/check.mdx (1)

10-12: Same permalink drift issue as other MDX files

Update link generation to use commit SHAs or drop line anchors to keep docs stable over time.

🧹 Nitpick comments (71)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/constants.mdx (1)

1-4: Use the standard Docusaurus front-matter key sidebar_label instead of sidebarTitle.

sidebarTitle is not recognised by Docusaurus v2; the expected key is sidebar_label.
Switching prevents the page from being hidden in the generated sidebar.

-title: constants
-sidebarTitle: constants
+title: constants
+sidebar_label: constants
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli.mdx (1)

1-4: Align front-matter with Docusaurus conventions.

Same comment as above – replace sidebarTitle with sidebar_label to guarantee proper sidebar rendering.

-title: cli
-sidebarTitle: cli
+title: cli
+sidebar_label: cli
docs/docs/python-sdk/sdk_ref/infrahub_sdk/playback.mdx (2)

1-4: Sidebar label key mismatch.

Update the key for consistency:

-title: playback
-sidebarTitle: playback
+title: playback
+sidebar_label: playback

6-25: Add a brief module & class description for better discoverability.

The page jumps straight into signatures. Two short sentences explaining what infrahub_sdk.playback does and typical JSONPlayback use-cases (e.g., “record/replay HTTP traffic for offline tests”) will greatly help readers.

No code diff provided since the text can be placed directly after the H1.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exceptions.mdx (2)

1-4: Update front-matter key.

-title: exceptions
-sidebarTitle: exceptions
+title: exceptions
+sidebar_label: exceptions

8-18: Consider adding one-line summaries for each exception.

Readers benefit from seeing at a glance why each custom exception exists (e.g., file-already-exists vs. invalid namespace).
Example:

### `TransferError`
_Base class for all transfer-related errors._
docs/docs/python-sdk/sdk_ref/infrahub_sdk/object_store.mdx (2)

1-4: Use sidebar_label for sidebar entry.

-title: object_store
-sidebarTitle: object_store
+title: object_store
+sidebar_label: object_store

10-42: Provide high-level context & return-value notes.

A short paragraph describing what an “Object Store” is and clarifying what the upload method returns (e.g., signed URL, handle, etc.) will improve clarity.

Also, consider grouping async vs sync variants explicitly so users understand when to pick each.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx (2)

60-64: Copy-paste description does not match the exception.

InvalidResponseError inherits from Error but the description “Raised when an object requires an initialization step before use” is clearly for UninitializedError. Update the sentence (or remove it) so users are not mis-led when debugging API failures.


54-64: Repeated sentences make the prose look autogenerated.

Three consecutive blocks start with “Raised when …”. Varying the wording (or using a short, single-sentence list style) will read better and avoids the LanguageTool warning in the CI hints.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/constants.mdx (1)

6-9: Empty-module notice is fine but consider hiding the page.

If the module truly has no public surface, you may omit it from the sidebar to avoid a “nothing to see here” experience, or generate it only when content exists.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/filters.mdx (1)

8-11: Minor completeness nit: list functions/constants too.

infrahub_sdk.template.filters also exports helper functions alongside FilterDefinition. Including them will give users a full view of the module.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/constants.mdx (1)

8-11: Add the enum members for real usefulness

The page stops at the class heading; without listing InfrahubClientMode members (e.g., SYNC, ASYNC, …) consumers still have to open the source. Consider appending a fenced block or a bullet list enumerating the available modes.

 ### `InfrahubClientMode` …</sup>

+```python
+class InfrahubClientMode(Enum):
+    SYNC = "sync"
+    ASYNC = "async"
+```
+
+| Member | Meaning |
+| ------ | ------- |
+| `SYNC` | Blocking client that executes operations synchronously. |
+| `ASYNC`| Non-blocking client using asyncio under the hood. |
docs/docs/python-sdk/sdk_ref/infrahub_sdk/repository.mdx (1)

16-24: Link the Repo return type to its origin for clarity

Repo comes from gitpython. A quick hint prevents readers from guessing.

 ```python
 initialize_repo(self) -> Repo

+Repo refers to git.Repo from the GitPython package.


</blockquote></details>
<details>
<summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/exceptions.mdx (1)</summary><blockquote>

`8-16`: **Provide one-line descriptions for each exception**  

Listing names alone forces readers into source code. Add a short rationale per exception.

```diff
 ### `TaskError` …</sup>
+Generic base class for all task-related errors.
 
 ### `TaskNotFoundError` …</sup>
+Raised when a task with the requested ID does not exist.
 
 ### `TooManyTasksError` …</sup>
+Thrown when a query returns more tasks than expected or allowed.
 
 ### `TaskNotCompletedError` …</sup>
+Indicates that an awaited task is still in progress.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx (1)

18-28: Avoid duplicate headings for the value property

Two separate “value” entries are rendered – one for the getter and one for the setter – but both appear as ordinary methods. This is slightly confusing because the implementation is actually a @property with a corresponding @value.setter.

Consider collapsing them into a single heading (e.g. “value property”) and, inside that section, documenting the getter / setter behavior.
That keeps the reference concise and avoids giving the impression that two overloads must be called directly.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx (1)

10-16: Generic base class name may cause ambiguity

Using an unconstrained name like Error for the project’s base exception can be confusing when scanning stack traces – it conveys almost no project context.
Unless this is locked in by API guarantees, consider renaming to something that is immediately recognisable, e.g. InfraHubError.

docs/src/theme/MDXComponents.js (1)

4-10: Minor inconsistencies & bundle-size consideration

  1. The comment says “available in MDX as <icon />”, but the export key is Icon, so usage will actually be <Icon />.
    Update the comment to avoid confusion.

  2. The remark “Import the entire Iconify library” is slightly misleading – @iconify/react only ships the Icon component wrapper, not every icon.
    Still, including Iconify can noticeably increase the docs bundle. If bundle size becomes an issue, look at:

    • @iconify/react/dist/iconify/icon.js (tree-shakable subset)
    • Dynamic imports for rarely-used icons.
-import { Icon } from '@iconify/react'; // Import the entire Iconify library.
+import { Icon } from '@iconify/react'; // Makes <Icon /> available in MDX.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/data.mdx (1)

8-18: Add concise class & method summaries to improve usability

The page lists RepositoryBranchInfo, RepositoryData, and get_staging_branch, but provides no short explanation of what each class / method represents or when to use it. A one-sentence summary under every heading dramatically improves discoverability when browsing the generated sidebar.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/groups.mdx (1)

8-14: Document parameters & return value

group_add_subscriber exposes four parameters and a dict return type, yet no information is given about expected shapes (e.g. subscriber list contents, branch semantics, structure of the returned dictionary). Consider adding a short “Parameters / Returns” block.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/models.mdx (1)

8-10: Missing class description

UndefinedJinja2Error is listed without context. Including what triggers this error and typical handling guidance would save users a round-trip to the source.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/generator.mdx (1)

16-20: Return type None may hide useful output

If list_generators prints to stdout rather than returning data, note this explicitly; otherwise consider returning the list so callers can programmatically consume it.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx (1)

10-14: Provide examples for tricky parsing rules

parse_human_friendly_id is central to node look-ups but the docs lack concrete examples (e.g. 'user:john.doe' -> ('user', ['john', 'doe'])). Two or three examples would make the behaviour immediately clear.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/models.mdx (1)

10-17: Avoid hard-wiring the main branch in GitHub source links

The generated links point explicitly to …blob/main/….
If users browse a versioned site (e.g. a tagged release or an older branch), the links will always jump to main, which may no longer match the rendered signature.

Prefer injecting the current commit SHA (or the branch/tag used during doc build) so the source link always reflects the exact code that was documented.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/client.mdx (1)

12-20: Consider shortening long signatures for readability

Very long one-liners tend to wrap in narrow view-ports and hurt readability.
A common pattern is:

```python title="signature"
initialize_client(
    branch: str | None = None,
    identifier: str | None = None,
    …
) -> InfrahubClient

Not mandatory, but improves UX.

</blockquote></details>
<details>
<summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/interface.mdx (1)</summary><blockquote>

`10-18`: **Minor style nit – add back-ticks around parameter types**

For consistency with other auto-generated pages, wrap type names in ``` `Path` ``` and ``` `str` ``` inside the signature so they render monospace.

Purely cosmetic.

</blockquote></details>
<details>
<summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/async_typer.mdx (1)</summary><blockquote>

`12-30`: **Add concise descriptions & param/return details for each method**  
Right now the section lists the signatures only. A one-line summary plus an *Args / Returns* block would make the generated docs far more useful to readers skimming for behaviour, without having to open the source link each time.

</blockquote></details>
<details>
<summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx (1)</summary><blockquote>

`10-37`: **Document parameters, options, and possible errors**  
`load`/`validate` expose several Typer options (`paths`, `debug`, `branch`, config param) but the reference omits any explanation of what they do or which CLI flags map to them. Adding a short bullet list (and mentioning raised exceptions) would align this page with the rest of the ctl docs and help CLI users quickly understand usage.

</blockquote></details>
<details>
<summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/render.mdx (1)</summary><blockquote>

`10-20`: **Include purpose/usage examples for helper utilities**  
Both `list_jinja2_transforms` and `print_template_errors` are utility helpers whose usefulness is not obvious from the signature alone. A two-sentence description or minimal code snippet (e.g. how to call them from a script) would greatly improve discoverability.

</blockquote></details>
<details>
<summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx (1)</summary><blockquote>

`10-37`: **Provide argument descriptions for consistency with other ctl pages**  
The `menus`, `debug`, `branch`, and config arguments are undocumented here, whereas parallel pages (e.g. *branch*, *object*) include at least a brief explanation. Adding those keeps the generated reference consistent and avoids reader confusion.

</blockquote></details>
<details>
<summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/schema_sorter.mdx (1)</summary><blockquote>

`12-18`: **Explain the return structure of `get_sorted_node_schema`**  
The method returns `list[set[str]]`, but the semantics (order guarantees, meaning of the inner sets) are not described. A short *Returns* section clarifying this would prevent misuse.

</blockquote></details>
<details>
<summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx (2)</summary><blockquote>

`20-56`: **Avoid repetitive phrasing in method descriptions**

Six consecutive method descriptions start with “Send a … event.” Language-Tool rightfully flags the repetition; varying the phrasing or dropping the verb entirely (“Debug event”, “Info event”, …) makes the page read less mechanical.

No functional impact, but quick to improve user experience and perceived polish.

---

`10-18`: **Missing class summaries**

Only the header and GitHub link are rendered for each class (`HTTPMethod`, `RequesterTransport`, …) without even a one-line synopsis of what the class represents. Readers landing here have to click through to source to know if they’re in the right place.

If docstrings exist, configure `mdxify` to emit the first sentence; otherwise add a terse manual summary.

</blockquote></details>
<details>
<summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/menu.mdx (1)</summary><blockquote>

`10-34`: **Add brief descriptions for new classes**

`InfrahubMenuFileData` and `MenuFile` headers render without any explanatory text. Even a single sentence lifted from the class docstring (e.g., “Pydantic model for menu-spec files”) helps give context.

</blockquote></details>
<details>
<summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx (1)</summary><blockquote>

`10-15`: **Refine base-exception description**

The sentence “pytest-infrahub Base exception.” reads awkward. Consider:  

```diff
-pytest-infrahub Base exception.
+Base class for all pytest-infrahub exceptions.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/plugin.mdx (1)

10-32: Prefer commit-pinned GitHub permalinks instead of main branch anchors

All source links target .../blob/main/...#LXX.
If the file later changes, the line anchors will drift and the link will drop the visitor in the wrong place.
Using a short (or full) commit SHA in the URL guarantees the anchor always resolves to the exact line that was documented.

Example:

-https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/pytest_plugin/plugin.py#L15
+https://github.com/opsmill/infrahub-sdk-python/blob/<COMMIT_SHA>/infrahub_sdk/pytest_plugin/plugin.py#L15

mdxify supports injecting the current git SHA; if it is not already available, consider extending the generator (or a post-processing step) to rewrite the links.
This is cosmetic but avoids subtle “where am I?” moments for readers.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/yaml.mdx (1)

10-88: Stabilise source links with commit SHAs

Same remark as for pytest_plugin/plugin.mdx: every anchor relies on the mutable main branch.
Pinning to a commit (or tag) removes the risk of stale / shifted anchors when the file evolves.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx (1)

20-35: Long signature is hard-wrapped; consider breaking lines for readability

The rendered MDX line for validate_graphql is >180 chars which makes horizontal scrolling likely on smaller view-ports.
mdxify can insert \ line continuations or wrap the parameters on multiple lines inside the code block to improve readability without affecting copy-paste:

-validate_graphql(query: str, variables: Optional[list[str]] = typer.Argument(None, help='Variables to pass along with the query. Format key=value key=value.'), debug: bool = typer.Option(False, help='Display more troubleshooting information.'), branch: str = typer.Option(None, help='Branch on which to validate the GraphQL Query.'), _: str = CONFIG_PARAM, out: str = typer.Option(None, help='Path to a file to save the result.')) -> None
+validate_graphql(
+    query: str,
+    variables: Optional[list[str]] = typer.Argument(
+        None,
+        help='Variables to pass along with the query. Format key=value key=value.',
+    ),
+    debug: bool = typer.Option(False, help='Display more troubleshooting information.'),
+    branch: str = typer.Option(None, help='Branch on which to validate the GraphQL Query.'),
+    _: str = CONFIG_PARAM,
+    out: str = typer.Option(None, help='Path to a file to save the result.'),
+) -> None

Minor, but it noticeably boosts legibility.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx (1)

10-36: Consistent return-type wording

skip_version already states “Check if a test should be skipped…”.
For client / client_sync, adding a one-liner (“Return an async/sync Infrahub client bound to the running Docker instance.”) would align with the concise descriptive style used elsewhere and give context to newcomers skimming the docs.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/repository.mdx (1)

18-46: Missing short descriptions for methods

Each method is listed with its signature but no accompanying description, unlike other sections (e.g., skip_version). Adding a sentence or two explaining what the method does (not just how) will make this page self-contained and quicker to digest.

Example:

#### `repo`
Return the underlying `GitRepoManager` instance handling low-level git operations.

Auto-generation could pull the method docstring when available.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx (1)

41-44: Replace “check” with “transform” to avoid confusion

The sentence still talks about “the result of the check”; this looks like a copy-paste from the checks docs and is misleading in the context of a transform.

-The result of the check is determined based on the presence or not of ERROR log messages.
+The result of the transform is determined based on the presence or absence of ERROR log messages.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx (1)

57-63: Parameter name, default value and typo are inconsistent with the signature

  1. The docstring refers to config_file_name, but the actual parameter is config_file.
  2. Default file in the signature is infrahubctl.toml, while here it states pyprojectctl.toml.
  3. Typo: ValidationErorrValidationError.
-This is done to handle a ValidationErorr which is raised when settings are specified but invalid.
+This is done to handle a ValidationError which is raised when settings are specified but invalid.
@@
-**Args:**
-- `config_file_name`: [description]. Defaults to "pyprojectctl.toml".
+**Args:**
+- `config_file`: Path to the TOML configuration file. Defaults to "infrahubctl.toml".
docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx (1)

40-41: Nit: “digit” → “digits”

Minor grammar improvement.

-Return the last 8 digit of the UUID (the most random part)
+Return the last 8 digits of the UUID (the most random part)
tasks.py (1)

276-282: Consider improving error handling specificity.

The current error handling catches UnexpectedExit with exit code 127, but the error message specifically mentions Python version compatibility. Consider making the error message more generic or checking for other potential causes.

         except UnexpectedExit as e:
             if e.result.exited == 127:
                 print(
-                    " - mdxify is not installed, probably due to the python version being outside its supported range."
+                    " - mdxify is not available. This could be due to it not being installed or Python version compatibility issues."
                 )
+            else:
+                print(f" - mdxify failed with exit code {e.result.exited}")
             sys.exit(1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/graphql_query.mdx (1)

10-12: Avoid hard-coding branch & line numbers in GitHub permalinks

Every link points to .../blob/main/...#Lxx.
As soon as the source file changes, these anchors will drift and the docs will lead to incorrect code lines.
Generate links against a commit SHA (permalink) or drop the #Lxx fragment entirely to avoid link-rot.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx (2)

72-80: Document states “NOT IMPLEMENTED YET” – flag clearly as TODO

The validate function description advertises behaviour that is “NOT IMPLEMENTED YET”.
Mark this explicitly with a TODO or @experimental badge so users don’t assume the feature works today.


35-36: Signature lines are extremely long – consider line-wrapping for readability

Long, unwrapped signatures render poorly on narrow viewports and mobile docs.
Have the generator insert line breaks after each argument.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/topological_sort.mdx (1)

24-32: Missing mention that functions raise DependencyCycleExistsError

topological_sort and get_cycles raise DependencyCycleExistsError, but the docs for those functions don’t reference this exception.
Add a “Raises” section so users know which errors to catch.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx (1)

18-20: Excessively long function signature hampers readability

The dump signature is 350+ characters. Break each parameter onto its own line for easier scanning and to avoid horizontal scrolling.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx (1)

20-32: Add minimal descriptions for undocumented functions

Several functions (validate_schema_content_and_exit, display_schema_load_errors, handle_non_detail_errors, …) lack any descriptive text after the code block, unlike callback, load, and check. Including one-liner summaries (even if copied from the docstring) greatly improves the generated reference usability.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx (1)

14-22: Document key class attributes / behaviours

InfrahubBaseTest, InfrahubInputOutputTest, etc., are top-level abstractions but their purpose is unclear without any narrative. Consider inserting a short paragraph before the Methods list explaining the role of each class (e.g., “Base class for …”, expected usage, important attributes).

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx (1)

60-63: Missing explanation for CheckModule

CheckModule is listed under Classes without any description or method list, unlike the functions above. Either omit the heading or add at least a short summary and public attributes/methods so readers know how to use it.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/jinja2_transform.mdx (1)

32-38: Consider collapsing repetitive method stubs into tables

The current layout shows many short code blocks that only repeat the signature. For long pages, converting these into a single markdown table (Method | Return type | Description) cuts vertical scroll and improves scannability.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx (1)

6-8: Consider adding an “Enums” subsection for clarity
Several entities listed below (RelationshipCardinality, BranchSupportType, …) are enumerations, not classes. Grouping them under a dedicated “## Enums” header makes the doc easier to scan.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx (1)

51-56: Parameter name shadows Python built-in filter
The generated signature shows a parameter called filter. In the code this shadows Python’s built-in filter() and may confuse users or tooling. Consider renaming the argument (e.g. filters) in the source to avoid the clash; the docs will follow automatically on next generation.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx (1)

61-65: Spelling: “absolut” → “absolute”

-This will be an absolute path if --infrahub-config-path is an absolut path as happens when
-tests are started from within Infrahub server.
+This will be an absolute path if `--infrahub-config-path` is an absolute path, as happens when
+tests are started from within the Infrahub server.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx (1)

68-72: Minor style: Avoid passive voice in class description
“Represents a RelatedNodeBase in an asynchronous context” reads clearer as “Asynchronous wrapper around RelatedNodeBase”.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx (1)

30-33: Remove the double blank line to satisfy markdown-lint (MD012)

Two consecutive blank lines are present, triggering the CI markdown-lint failure.

-Executes the stored task.
-
-
+Executes the stored task.
+
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx (2)

29-32: Tighten wording of the module overview

The sentence ends with a double‐dot ellipsis and does not actually mention the object (“repositories”) it refers to.

-Manage the repositories in a remote Infrahub instance.

-List, create, delete ..
+Manage repositories in a remote Infrahub instance.

+List, create and delete repositories.

36-38: Hide internal “_” parameter from the docstring

_: str = CONFIG_PARAM is an internal Typer context parameter and adds noise to the public API reference.
Consider excluding it during generation (e.g. via :exclude-members: or a custom mdxify filter).

docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx (1)

16-21: Correct the type annotation for render_variables_to_string

dict[str, type[str | int | float | bool]] is not valid Python typing and may confuse readers.

-render_variables_to_string(data: dict[str, type[str | int | float | bool]]) -> str
+render_variables_to_string(data: dict[str, str | int | float | bool]) -> str

Ensure the source annotation in infrahub_sdk/graphql.py matches this correction so that the next doc-generation run stays consistent.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx (2)

103-107: Bullet list formatting is off

The three lines are intended as list items but render as plain text. Prefix them with “- ” to display properly.

- the intersection of both
- the item present only in list1
- the item present only in list2
+ - the intersection of both
+ - the item present only in list1
+ - the item present only in list2

216-218: Typo: “seam” → “seem”

-This implementation may seam counter intuitive but in the current implementation
+This implementation may seem counter-intuitive, but in the current implementation
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx (1)

23-23: Fix typo & tighten wording

execeptionexception, and use the adverb “differently” to avoid verbosity.

-Handle exeception in a different fashion based on its type.
+Handle exceptions differently based on their type.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx (1)

23-24: Remove extra blank line to satisfy markdown-lint MD012

-
-
+
docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx (1)

43-47: Polish phrasing for conciseness.

The introductory sentence is verbose; tightening it improves readability without losing meaning.

-Internal Store for InfrahubNode objects.
-
-Often while creating a lot of new objects,
-we need to save them in order to reuse them later to associate them with another node for example.
+Internal store for InfrahubNode objects.
+
+When creating many new objects, we often need to keep them so they can be reused later—for instance, when associating them with another node.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx (2)

29-31: Clarify activation wording for store

“The store will be populated … if activated” is a bit vague. Consider a wording that specifies the flag/mechanism that enables population so that users know exactly what to set.

-The store will be populated with nodes based on the query during the collection of data if activated
+The store is populated with nodes that match the query **when `populate_store=True` in the collection API**

38-47: Differentiate nodes() vs related_nodes()

Both descriptions are identical, leaving readers unsure about the distinction between the two helpers.
Add a brief sentence highlighting what qualifies a node as “related” (relationship traversal depth, direction, etc.) or remove one if they are aliases.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/animal.mdx (1)

38-43: Provide high-level purpose for schema_base

schema_base is central to the class but the docstring is empty. Adding a one-liner (e.g. “Composes the root schema from all node-specific fragments”) helps newcomers understand why they would call this helper.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx (1)

165-170: Fix grammar & indentation in generate_query_data_node args list

Minor markdown glitches make the bullet list hard to read:

- - `inherited`: Indicated of the attributes and the relationships inherited from generics should be included as well.
-                       Defaults to True.
+ - `inherited`: Whether attributes/relationships inherited from generics are included (default **True**).

Also out-dented continuation lines so bullets render correctly.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1)

94-112: Collapse overloaded signatures to reduce noise

The four consecutive create(...) overloads make the page extremely long and difficult to scan.
Consider configuring mdxify to hide duplicated overloads behind a collapsible section or keep only the most generic signature.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 64a7957 and 3dde67b.

⛔ Files ignored due to path filters (2)
  • docs/package-lock.json is excluded by !**/package-lock.json
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (99)
  • .github/workflows/ci.yml (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/async_typer.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/config.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/constants.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/client.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/generator.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/render.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/transform.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/data.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/diff.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/groups.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/constants.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/object_store.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/playback.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_base.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/constants.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/check.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/graphql_query.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/jinja2_transform.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/python_transform.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/plugin.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/utils.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/queries.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/repository.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/menu.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/constants.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/models.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/filters.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/models.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/repository.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/animal.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/car_person.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/timestamp.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/topological_sort.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/constants.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/interface.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/json.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/interface.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/json.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/schema_sorter.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/yaml.mdx (1 hunks)
  • docs/package.json (1 hunks)
  • docs/sidebars-python-sdk.ts (2 hunks)
  • docs/src/theme/MDXComponents.js (1 hunks)
  • pyproject.toml (1 hunks)
  • tasks.py (2 hunks)
🪛 GitHub Check: markdown-lint
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx

[failure] 65-65: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx:65 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 56-56: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx:56 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md

docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx

[failure] 91-91: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:91 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 82-82: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:82 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 73-73: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:73 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 40-40: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:40 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 15-15: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 12-12: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:12 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md

docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx

[failure] 32-32: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx:32 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md

docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx

[failure] 24-24: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx:24 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md

🪛 GitHub Actions: CI
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx

[error] 56-56: markdownlint MD012/no-multiple-blanks: Multiple consecutive blank lines [Expected: 1; Actual: 2]

tasks.py

[error] 261-261: Ruff FA100: Add from __future__ import annotations to simplify typing.Union usage.

🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx

[style] ~56-~56: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...th: 14px; height: 14px;" /> Raised when an object requires an initializati...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx

[grammar] ~19-~19: Ensure spelling is correct
Context: ...stack trace and extract Frames for each expection found in the trace.

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send a critical event. #### exception <s...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~72-~72: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send an exception event. ### Order ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx

[grammar] ~63-~63: Ensure spelling is correct
Context: ...te path if --infrahub-config-path is an absolut path as happens when tests are started from ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx

[grammar] ~23-~23: Ensure spelling is correct
Context: ...xit_code: int) -> NoReturn ``` Handle exeception in a different fashion based on its typ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~23-~23: Consider replacing this phrase with the adverb “differently” to avoid wordiness.
Context: ...nt) -> NoReturn ``` Handle exeception in a different fashion based on its type. ### `catch_excepti...

(IN_A_X_MANNER)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx

[grammar] ~105-~105: Ensure spelling is correct
Context: ...tion of both - the item present only in list1 - the item present only in list2 ### ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~106-~106: Ensure spelling is correct
Context: ...nly in list1 - the item present only in list2 ### deep_merge_dict python deep_merge_dict(dicta: dict, dictb: dict, path: list | None = None) -> dict Deep Merge Dictionary B into Dictionary ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx

[style] ~45-~45: Consider using a synonym to be more concise.
Context: ...ahubNode objects. Often while creating a lot of new objects, we need to save them in or...

(A_LOT_OF)


[style] ~46-~46: Consider a more concise word here.
Context: ...ot of new objects, we need to save them in order to reuse them later to associate them with...

(IN_ORDER_TO_PREMIUM)

🧰 Additional context used
🪛 GitHub Check: markdown-lint
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx

[failure] 65-65: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx:65 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 56-56: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx:56 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md

docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx

[failure] 91-91: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:91 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 82-82: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:82 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 73-73: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:73 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 40-40: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:40 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 15-15: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md


[failure] 12-12: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:12 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md

docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx

[failure] 32-32: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx:32 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md

docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx

[failure] 24-24: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx:24 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md

🪛 GitHub Actions: CI
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx

[error] 56-56: markdownlint MD012/no-multiple-blanks: Multiple consecutive blank lines [Expected: 1; Actual: 2]

tasks.py

[error] 261-261: Ruff FA100: Add from __future__ import annotations to simplify typing.Union usage.

🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx

[style] ~56-~56: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...th: 14px; height: 14px;" /> Raised when an object requires an initializati...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx

[grammar] ~19-~19: Ensure spelling is correct
Context: ...stack trace and extract Frames for each expection found in the trace.

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx

[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send a critical event. #### exception <s...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~72-~72: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send an exception event. ### Order ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx

[grammar] ~63-~63: Ensure spelling is correct
Context: ...te path if --infrahub-config-path is an absolut path as happens when tests are started from ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx

[grammar] ~23-~23: Ensure spelling is correct
Context: ...xit_code: int) -> NoReturn ``` Handle exeception in a different fashion based on its typ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~23-~23: Consider replacing this phrase with the adverb “differently” to avoid wordiness.
Context: ...nt) -> NoReturn ``` Handle exeception in a different fashion based on its type. ### `catch_excepti...

(IN_A_X_MANNER)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx

[grammar] ~105-~105: Ensure spelling is correct
Context: ...tion of both - the item present only in list1 - the item present only in list2 ### ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~106-~106: Ensure spelling is correct
Context: ...nly in list1 - the item present only in list2 ### deep_merge_dict python deep_merge_dict(dicta: dict, dictb: dict, path: list | None = None) -> dict Deep Merge Dictionary B into Dictionary ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx

[style] ~45-~45: Consider using a synonym to be more concise.
Context: ...ahubNode objects. Often while creating a lot of new objects, we need to save them in or...

(A_LOT_OF)


[style] ~46-~46: Consider a more concise word here.
Context: ...ot of new objects, we need to save them in order to reuse them later to associate them with...

(IN_ORDER_TO_PREMIUM)

🔇 Additional comments (38)
docs/package.json (1)

18-22: Pin the Iconify dependency to an exact version to keep docs builds reproducible.

The SDK’s docs are built in CI; using ^6.0.0 means any future 6.x release could break the build unexpectedly (Iconify had breaking changes between minor versions before). Consider:

-    "@iconify/react": "^6.0.0",
+    "@iconify/react": "6.0.0",

or lock via pnpm-lock.yaml/package-lock.json.

pyproject.toml (1)

22-24: If you do raise the minimum Python version, update the classifier list.

Classifiers still include “Programming Language :: Python :: 3.9”. Keep the metadata consistent to avoid publishing wheels with incorrect tags.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/constants.mdx (1)

1-9: Documentation structure looks good for an empty module.

The MDX file correctly uses frontmatter formatting and provides clear messaging that this module contains no public API elements. This approach maintains consistency in the SDK reference documentation structure.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx (2)

1-14: Documentation structure and content are well-formatted.

The MDX frontmatter, class documentation, and GitHub source link are properly structured and provide clear information about the NodeProperty class.


10-10: Confirm Icon component availability in MDX

Our search showed multiple <Icon icon="github" /> usages (including in docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx) but no corresponding import Icon or Docusaurus MDX‐components configuration. Please verify that:

  • Icon is registered in your MDX provider (e.g. via themeConfig.stylesheets or a custom MDXComponents mapping in docusaurus.config.js),
  • Or add an explicit import at the top of the MDX files, for example:
    import Icon from '@site/src/components/Icon';
    
    ### `NodeProperty` <sup>
      <a href=""><Icon icon="github" /></a>
    </sup>
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/transform.mdx (1)

12-14: Function signature documentation is clear and informative.

The function signature with type hints and proper code block formatting provides clear documentation for the list_transforms function.

docs/sidebars-python-sdk.ts (2)

1-1: Import formatting improvement.

The spacing around braces in the import statement improves code readability and follows TypeScript formatting conventions.


38-47: Well-structured SDK References integration.

The new "SDK References" category with autogenerated items from the sdk_ref directory properly integrates the API documentation into the sidebar navigation. The positioning before the existing "Reference" section is logical.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/constants.mdx (1)

1-9: Consistent documentation pattern for empty modules.

This file follows the same well-structured approach as other empty module documentation, maintaining consistency across the SDK reference documentation.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/queries.mdx (1)

10-14: Looks good – generated snippet renders correctly

Heading hierarchy, GitHub source link and the signature block are all well-formed.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx (1)

10-15: Nice – short but self-contained explanation

The brief paragraph clarifies why the context exists. No issues spotted.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx (1)

10-14: Parameter name looks off – please verify

The signature shows load_configuration(value: str), yet the description speaks about a configuration file path.
If the parameter is indeed a file path, consider renaming it in the source code (and consequently in the generated docs) to something clearer like config_path or file_path to improve self-documentation.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/interface.mdx (1)

14-18: Small type-hint polish

list[str] works only on Python 3.9+. If the SDK still supports 3.8, the canonical hint would be List[str] with from typing import List.
Double-check the supported Python versions and adjust the docstring generator accordingly to avoid mismatches between documentation and runtime type hints.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/models.mdx (1)

1-4: Front-matter looks correct. Nothing else to flag.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/client.mdx (1)

1-4: No issues detected.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/utils.mdx (1)

10-14: Good, concise reference.

No problems spotted.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/exceptions.mdx (1)

6-18: Looks good – exception list renders correctly.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx (1)

8-37: Looks good

Headers, code fences, and descriptions render correctly and link back to source.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx (1)

1-37: Auto-generated reference – no manual issues detected

No actionable feedback; looks mechanically correct.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/diff.mdx (1)

1-31: Auto-generated reference – no manual issues detected

Nothing to flag.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx (1)

1-25: Auto-generated reference – no manual issues detected

Nothing to flag.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols.mdx (1)

1-333: Extensive auto-generated listing – no manual issues detected

Skipping detailed review of mechanically-generated protocol index.

.github/workflows/ci.yml (1)

183-218: Fail CI on new or deleted SDK docs in CI workflow

The current step only checks tracked modifications. New or removed files under SDK_API_DOCS_DIR won’t be caught, allowing documentation drift to slip through.

Please update .github/workflows/ci.yml around lines 183–218 as follows:

   - name: "Check if SDK API documentation needs to be refreshed"
     run: |
-      git diff --quiet "${SDK_API_DOCS_DIR}"
+      # Fail on modified, deleted, or new files inside the docs dir
+      if ! git diff --quiet -- "${SDK_API_DOCS_DIR}" || \
+         [ -n "$(git ls-files --others --exclude-standard "${SDK_API_DOCS_DIR}")" ]; then
+        echo "SDK API documentation is out-of-date. Run '${DOCS_COMMAND}' and commit the changes." >&2
+        git status --short "${SDK_API_DOCS_DIR}" || true
+        exit 1
+      fi

.fix_required

docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx (1)

1-53: LGTM! Well-structured auto-generated API documentation.

The generated MDX documentation is properly formatted with clear class and method documentation, appropriate GitHub source links, and consistent structure.

tasks.py (1)

260-305: Well-implemented SDK API documentation generation task.

The implementation effectively handles:

  • Proper error handling for missing mdxify tool
  • Clean temporary directory usage
  • Intelligent file filtering and reorganization
  • Robust directory structure creation

The file reorganization logic using reduce(operator.truediv, ...) is elegant for converting flat filenames with hyphens into nested directory structures.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx (1)

1-140: LGTM! Comprehensive auto-generated API documentation.

The documentation thoroughly covers all classes and methods in the query_groups module with clear descriptions, method signatures, and GitHub source links. The structure is consistent with other generated documentation files.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx (1)

1-70: LGTM! Excellent auto-generated documentation with helpful implementation guidance.

The documentation is well-structured and includes particularly valuable implementation guidance for the abstract generate() method, explaining the expected idempotent behavior and usage patterns.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/json.mdx (1)

1-37: LGTM! Documentation properly organized in nested directory structure.

The auto-generated documentation is well-formatted and demonstrates that the file reorganization logic in the tasks.py implementation correctly handles nested module structures.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/graphql_query.mdx (1)

10-10: <Icon … /> component may fail at build time without an import

MDX requires the component to be either globally registered or explicitly imported.
If the docs site does not configure Icon as a global, add

import { Icon } from '@site/src/components/Icon';

at the top via the generator to prevent the Docusaurus build from breaking.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/python_transform.mdx (1)

10-12: Ensure the Icon component is resolvable at build time

<Icon> is used, but the file does not import it. Unless you rely on a global MDX provider, add an explicit import to avoid MDX compile-time errors:

 ---
 title: python_transform
 sidebarTitle: python_transform
 ---
+import { Icon } from '@iconify/react';

Please confirm that the Docusaurus config or a remark/rehype plugin already provides Icon; otherwise, the docs build will break.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/json.mdx (1)

1-12: Documentation looks solid

Front-matter, headings, and GitHub source links render correctly; nothing stands out as problematic.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/config.mdx (1)

1-8: LGTM – config module reference reads well

Structure, code fences and links look correct.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/timestamp.mdx (1)

1-12: Timestamp docs are clear and consistent

No issues spotted in formatting or content.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx (1)

10-18: Relationship manager docs look good

The class hierarchy and method listings are rendered correctly.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx (1)

6-10: Documentation looks solid

Headings, code fences, and links render correctly. No issues spotted.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx (1)

6-10: Well-structured reference

Clear class listing and source links—nothing to flag.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx (1)

6-10: Comprehensive & accurate

The function/class signatures and links are correct; no issues detected.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/car_person.mdx (1)

18-44: LGTM – rich auto-generated reference

The section cleanly lists all schema helpers and links back to source. No issues spotted.

Comment on lines 10 to 14
### `run` <sup><a href="https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/ctl/generator.py#L20" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
run(generator_name: str, path: str, debug: bool, list_available: bool, branch: str | None = None, variables: Optional[list[str]] = None) -> None
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Clarify optional arguments & side-effects

The signature shows branch and variables as optional, but the docs do not explain default behaviours (e.g. which branch is used when None). Also mention whether run mutates the working directory or writes files so users can anticipate side-effects.

🤖 Prompt for AI Agents
In docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/generator.mdx around lines 10
to 14, clarify the behavior of the optional parameters `branch` and `variables`
in the `run` function signature by explaining what default branch is used when
`branch` is None and how `variables` are handled if not provided. Additionally,
document any side-effects of the `run` function, such as whether it mutates the
working directory or writes files, so users understand the impact of calling
this function. Update the docstring or surrounding text accordingly to include
these details.

Comment on lines 20 to 25
#### `hfid` <sup><a href="https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/protocols_base.py#L18" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
hfid(self) -> list[Any] | None
```

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Inconsistent return-type in signature – should be list[str], not list[Any].

The hfid() method on RelatedNodeBase is documented here as returning list[Any] | None, whereas the same method on CoreNodeBase (and in the source code) returns list[str] | None. The mismatch will confuse users and hints at a potential doc-generation bug.

- hfid(self) -> list[Any] | None
+ hfid(self) -> list[str] | None
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#### `hfid` <sup><a href="https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/protocols_base.py#L18" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```python
hfid(self) -> list[Any] | None
```
#### `hfid` <sup><a href="https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/protocols_base.py#L18" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
🤖 Prompt for AI Agents
In docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_base.mdx around lines 20
to 25, the return type of the hfid() method is incorrectly documented as
list[Any] | None. Update the return type annotation to list[str] | None to match
the CoreNodeBase method and the source code, ensuring consistency and avoiding
user confusion.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 23, 2025

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: a0a8686
Status: ✅  Deploy successful!
Preview URL: https://d27fc507.infrahub-sdk-python.pages.dev
Branch Preview URL: https://ady-add-api-doc-generation.infrahub-sdk-python.pages.dev

View logs

@codecov
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

❗ There is a different number of reports uploaded between BASE (5daba0e) and HEAD (a0a8686). Click for more details.

HEAD has 8 uploads less than BASE
Flag BASE (5daba0e) HEAD (a0a8686)
python-3.9 2 1
python-3.11 2 1
python-3.12 2 1
python-3.10 2 1
python-filler-3.12 2 1
python-3.13 2 1
integration-tests 2 0
@@            Coverage Diff             @@
##           stable     #481      +/-   ##
==========================================
- Coverage   75.83%   69.99%   -5.85%     
==========================================
  Files         100      100              
  Lines        8870     8821      -49     
  Branches     1740     1727      -13     
==========================================
- Hits         6727     6174     -553     
- Misses       1667     2168     +501     
- Partials      476      479       +3     
Flag Coverage Δ
integration-tests ?
python-3.10 48.14% <ø> (-0.25%) ⬇️
python-3.11 48.14% <ø> (-0.25%) ⬇️
python-3.12 48.10% <ø> (-0.27%) ⬇️
python-3.13 48.10% <ø> (-0.25%) ⬇️
python-3.9 46.79% <ø> (-0.20%) ⬇️
python-filler-3.12 25.16% <ø> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
infrahub_sdk/client.py 65.92% <ø> (-3.57%) ⬇️
infrahub_sdk/ctl/utils.py 68.08% <ø> (ø)
infrahub_sdk/jinja2.py 0.00% <ø> (ø)
infrahub_sdk/pytest_plugin/items/base.py 78.37% <ø> (ø)

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🔭 Outside diff range comments (1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx (1)

51-60: Typo & argument-name mismatch

  1. ValidationErorr is misspelled.
  2. The Args section refers to config_file_name, but the signature exposes config_file.
-This is done to handle a ValidationErorr which is raised when settings are specified but invalid.
+This is done to handle a ValidationError which is raised when settings are specified but invalid.
@@
-• `config_file_name`: [description]. Defaults to "pyprojectctl.toml".
+• `config_file`: [description]. Defaults to "infrahubctl.toml".
♻️ Duplicate comments (1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1)

505-515: Duplicate typo in sync-client section

Same typo as above appears in the synchronous execute_graphql description.

-If retry_on_failure is True, the query will retry until the server becomes reacheable.
+If `retry_on_failure` is `True`, the query will keep retrying until the server becomes reachable.
🧹 Nitpick comments (7)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx (1)

24-68: Consistent punctuation for method descriptions
debug, info, warning, critical, and exception end their description sentences without a period, whereas error ends with one. Use a uniform style for all six docstrings.

-Send a error event.
+Send an error event

…and either add or remove the trailing period on the other five lines to match.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx (1)

50-57: Duplicate description – consider removing one
InvalidResponseError (L54-56) repeats exactly the text already used for UninitializedError (L50-52). Either adjust the wording or remove the duplicate to avoid confusion.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx (1)

148-154: Minor grammar / wording fixes

  1. If branch isn't provideIf a branch isn't provided
  2. may seam counter intuitivemay seem counter-intuitive
  3. Currently the function supportCurrently the function supports
-If branch isn't provide, return the name of the local Git branch.
+If a branch isn't provided, return the name of the local Git branch.

-This implementation may seam counter intuitive but in the current implementation
+This implementation may seem counter-intuitive, but in the current implementation

-Currently the function support Fields and InlineFragments but in a combined tree
+Currently the function supports Fields and InlineFragments but in a combined tree

Also applies to: 186-192

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx (1)

22-23: Simplify wording for clarity

-Handle exception in a different fashion based on its type.
+Handle exceptions differently depending on their type.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx (2)

42-46: Grammar tightening for the introductory paragraph

Minor wording improvements for clarity & conciseness.

-Internal Store for InfrahubNode objects.
-
-Often while creating a lot of new objects,
-we need to save them in order to reuse them later to associate them with another node for example.
+Internal store for `InfrahubNode` objects.
+
+When creating many new objects, we often need to save them so they can be reused later—for example, to associate them with another node.

60-100: Consider collapsing the overload explosion for NodeStore.get

Eight consecutive overload signatures make the doc noisy and push relevant content far below the fold. A single canonical signature plus a table/paragraph explaining the parameter permutations would be easier to read and maintain.

This is purely a docs-generation choice (mdxify supports signature suppression/merging).
If you keep the current layout, expect frequent diffs when line numbers drift, increasing CI churn.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1)

258-268: Fix typo “reacheable” → “reachable”

-If retry_on_failure is True, the query will retry until the server becomes reacheable.
+If `retry_on_failure` is `True`, the query will keep retrying until the server becomes reachable.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13c42cc and c98f441.

📒 Files selected for processing (49)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx (1 hunks)
  • tasks.py (2 hunks)
🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx

[grammar] ~259-~259: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~505-~505: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx

[grammar] ~53-~53: Ensure spelling is correct
Context: ...except block. This is done to handle a ValidationErorr which is raised when settings are speci...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx

[style] ~22-~22: Consider replacing this phrase with the adverb “differently” to avoid wordiness.
Context: ... int) -> NoReturn ``` Handle exception in a different fashion based on its type. ### `catch_exceptio...

(IN_A_X_MANNER)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx

[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...dth: 14px; height: 14px;" /> Raised when an object requires an initializati...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx

[style] ~44-~44: Consider using a synonym to be more concise.
Context: ...ahubNode objects. Often while creating a lot of new objects, we need to save them in or...

(A_LOT_OF)


[style] ~45-~45: Consider a more concise word here.
Context: ...ot of new objects, we need to save them in order to reuse them later to associate them with...

(IN_ORDER_TO_PREMIUM)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx

[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send a critical event. #### exception <su...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send an exception event. ### Order <...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx

[grammar] ~95-~95: Ensure spelling is correct
Context: ...tion of both - the item present only in list1 - the item present only in list2 ### `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~96-~96: Ensure spelling is correct
Context: ...nly in list1 - the item present only in list2 ### deep_merge_dict python deep_merge_dict(dicta: dict, dictb: dict, path: list | None = None) -> dict Deep Merge Dictionary B into Dictionary ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

✅ Files skipped from review due to trivial changes (12)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx
🚧 Files skipped from review as they are similar to previous changes (30)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx
  • tasks.py
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx
🧰 Additional context used
🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx

[grammar] ~259-~259: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~505-~505: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx

[grammar] ~53-~53: Ensure spelling is correct
Context: ...except block. This is done to handle a ValidationErorr which is raised when settings are speci...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx

[style] ~22-~22: Consider replacing this phrase with the adverb “differently” to avoid wordiness.
Context: ... int) -> NoReturn ``` Handle exception in a different fashion based on its type. ### `catch_exceptio...

(IN_A_X_MANNER)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx

[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...dth: 14px; height: 14px;" /> Raised when an object requires an initializati...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx

[style] ~44-~44: Consider using a synonym to be more concise.
Context: ...ahubNode objects. Often while creating a lot of new objects, we need to save them in or...

(A_LOT_OF)


[style] ~45-~45: Consider a more concise word here.
Context: ...ot of new objects, we need to save them in order to reuse them later to associate them with...

(IN_ORDER_TO_PREMIUM)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx

[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send a critical event. #### exception <su...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send an exception event. ### Order <...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx

[grammar] ~95-~95: Ensure spelling is correct
Context: ...tion of both - the item present only in list1 - the item present only in list2 ### `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~96-~96: Ensure spelling is correct
Context: ...nly in list1 - the item present only in list2 ### deep_merge_dict python deep_merge_dict(dicta: dict, dictb: dict, path: list | None = None) -> dict Deep Merge Dictionary B into Dictionary ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: unit-tests (3.12)
  • GitHub Check: unit-tests (3.9)
  • GitHub Check: unit-tests (3.13)
  • GitHub Check: unit-tests (3.10)
  • GitHub Check: unit-tests (3.11)
  • GitHub Check: integration-tests-latest-infrahub
🔇 Additional comments (1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1)

345-356: Argument descriptions drift from actual parameters

allocate_next_ip_address lists
timeout, tracker, raise_for_error with texts that clearly belong to pagination (offset, limit) rather than their real purpose.

Please re-check the auto-generated docstrings or tweak the mdxify template so that each bullet matches the parameter it documents; otherwise users will be mis-guided.

@a-delannoy a-delannoy force-pushed the ady-add-api-doc-generation branch 2 times, most recently from 360069a to 90a8edb Compare July 23, 2025 14:41
Copy link
Contributor

@dgarros dgarros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great
Many things to improve but at least we have the foundation 👍🏼

@@ -0,0 +1,10 @@
import React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@petercrocker do we need to add this component to Infrahub-docs as well ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I commented the wrong line in this file
I meant "@iconify/react" and the Icon component

@dgarros
Copy link
Contributor

dgarros commented Jul 24, 2025

please don't forget to add a fragment for the changelog

@a-delannoy a-delannoy force-pushed the ady-add-api-doc-generation branch from 9a0e63e to bfe7baf Compare July 24, 2025 11:57
@a-delannoy
Copy link
Author

The only failing CI check is about documentation style using Vale. The thing is, it does not like some of the tokens that are used in Google style docstrings (like Args for example), among other more technical spellings.

I am not sure if it is relevant to have it run on doc files generated from the code. I would suggest excluding the newly generated doc path from Vale surveillance. Otherwise, we would have to add a lot of spelling exceptions over time that I don't find very relevant.
What do you think about this ?

@dgarros
Copy link
Contributor

dgarros commented Jul 24, 2025

I would suggest excluding the newly generated doc path from Vale surveillance.
Agreed

@a-delannoy a-delannoy force-pushed the ady-add-api-doc-generation branch from 7d1c06f to fb08b5f Compare July 25, 2025 07:54
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (10)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx (2)

8-18: Add class-level descriptions for better usability

Only InfrahubLogger contains a description; every other class is listed without any context. Readers landing on this page have no idea what a SyncRequester, Order, etc. represent. Please generate at least a one-liner per class – you already have the source links so a short summary is easy to pull from docstrings.


54-68: Avoid repetitive “Send a … event.” sentences

Six consecutive method descriptions start with “Send a … event.” and add no real value. Either omit the sentence (the method name is self-explanatory) or replace it with specific behaviour notes (e.g. “Logs at DEBUG level through the configured Infrahub logger”).

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx (1)

56-60: Parameter names do not match the actual signature

The Args section lists config_file_name, while the signature is load_and_exit(..., config_file='infrahubctl.toml', ...). Please update the parameter list to match the code or the generated docs will mislead users.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx (1)

30-38: Document intent for exceptions that only have a name

Many exceptions (e.g. SchemaNotFoundError, ModuleImportError) are listed with zero description. A single-sentence rationale (“Raised when …”) greatly improves searchability and DX. Consider pulling the first line of each class docstring into the MDX.

docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx (2)

188-192: Typo: “seam” → “seem”

-This implementation may seam counter intuitive
+This implementation may seem counter-intuitive

226-229: Minor wording

“between a timedate in string format and now.” → “between a date-time string and now.”

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx (1)

22-24: Tighten phrasing

“Handle exception in a different fashion based on its type.” → “Handle exceptions differently depending on their type.”

docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx (1)

44-45: Streamline wording for better readability

The phrasing is a bit verbose and uses the patterns “a lot of” / “in order to”, which can be tightened up.

-Often while creating a lot of new objects,
-we need to save them in order to reuse them later to associate them with another node for example.
+Often when creating many new objects, we need to persist them so they can be reused later—for example, to associate them with another node.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (2)

258-259: Fix typo “reacheable” → “reachable”

-If retry_on_failure is True, the query will retry until the server becomes reacheable.
+If `retry_on_failure` is **True**, the query will retry until the server becomes **reachable**.

504-505: Same typo re-appears – correct it here as well

-If retry_on_failure is True, the query will retry until the server becomes reacheable.
+If `retry_on_failure` is **True**, the query will retry until the server becomes **reachable**.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9a0e63e and fb08b5f.

⛔ Files ignored due to path filters (2)
  • docs/package-lock.json is excluded by !**/package-lock.json
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (104)
  • .github/workflows/ci.yml (4 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/async_typer.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/config.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/constants.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/client.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/generator.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/render.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/transform.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/data.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/diff.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/groups.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/constants.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/object_store.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/playback.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_base.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/constants.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/check.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/graphql_query.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/jinja2_transform.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/python_transform.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/plugin.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/utils.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/queries.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/repository.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/menu.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/constants.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/models.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/filters.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/models.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/repository.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/animal.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/car_person.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/timestamp.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/topological_sort.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/constants.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exceptions.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/interface.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/json.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/interface.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/json.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/schema_sorter.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/yaml.mdx (1 hunks)
  • docs/package.json (1 hunks)
  • docs/sidebars-python-sdk.ts (2 hunks)
  • docs/src/theme/MDXComponents.js (1 hunks)
  • infrahub_sdk/client.py (6 hunks)
  • infrahub_sdk/ctl/utils.py (1 hunks)
  • infrahub_sdk/jinja2.py (1 hunks)
  • infrahub_sdk/node/node.py (1 hunks)
  • infrahub_sdk/pytest_plugin/items/base.py (1 hunks)
  • pyproject.toml (1 hunks)
  • tasks.py (2 hunks)
✅ Files skipped from review due to trivial changes (38)
  • infrahub_sdk/pytest_plugin/items/base.py
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/data.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/constants.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/transform.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/repository.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/interface.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exceptions.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/interface.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/exceptions.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/queries.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/exceptions.mdx
  • docs/src/theme/MDXComponents.js
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/groups.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/client.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/utils.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/models.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/async_typer.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/plugin.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/playback.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/graphql_query.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/check.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/json.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/animal.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_base.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx
🚧 Files skipped from review as they are similar to previous changes (59)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/constants.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/constants.mdx
  • infrahub_sdk/ctl/utils.py
  • infrahub_sdk/node/node.py
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/filters.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/constants.mdx
  • docs/sidebars-python-sdk.ts
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx
  • infrahub_sdk/jinja2.py
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/constants.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli.mdx
  • pyproject.toml
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx
  • docs/package.json
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/generator.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/schema_sorter.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/object_store.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/models.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/menu.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/repository.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/diff.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx
  • .github/workflows/ci.yml
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx
  • infrahub_sdk/client.py
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/python_transform.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/topological_sort.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/render.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/json.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/yaml.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/jinja2_transform.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/timestamp.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx
  • tasks.py
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/config.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/car_person.mdx
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx
🧰 Additional context used
🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx

[grammar] ~259-~259: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~505-~505: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx

[grammar] ~53-~53: Ensure spelling is correct
Context: ...except block. This is done to handle a ValidationErorr which is raised when settings are speci...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx

[style] ~22-~22: Consider replacing this phrase with the adverb “differently” to avoid wordiness.
Context: ... int) -> NoReturn ``` Handle exception in a different fashion based on its type. ### `catch_exceptio...

(IN_A_X_MANNER)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx

[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...dth: 14px; height: 14px;" /> Raised when an object requires an initializati...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx

[style] ~44-~44: Consider using a synonym to be more concise.
Context: ...ahubNode objects. Often while creating a lot of new objects, we need to save them in or...

(A_LOT_OF)


[style] ~45-~45: Consider a more concise word here.
Context: ...ot of new objects, we need to save them in order to reuse them later to associate them with...

(IN_ORDER_TO_PREMIUM)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx

[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send a critical event. #### exception <su...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send an exception event. ### Order <...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx

[grammar] ~95-~95: Ensure spelling is correct
Context: ...tion of both - the item present only in list1 - the item present only in list2 ### `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~96-~96: Ensure spelling is correct
Context: ...nly in list1 - the item present only in list2 ### deep_merge_dict python deep_merge_dict(dicta: dict, dictb: dict, path: list | None = None) -> dict Deep Merge Dictionary B into Dictionary ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: unit-tests (3.10)
  • GitHub Check: unit-tests (3.11)
  • GitHub Check: unit-tests (3.13)
  • GitHub Check: integration-tests-latest-infrahub
  • GitHub Check: unit-tests (3.12)
🔇 Additional comments (2)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (2)

789-792: Parameter name mismatch: size vs prefix_length

The docstring refers to size, but the function signature exposes prefix_length. Confirm which name is authoritative and update either the signature or the bullet list so they match.


345-355: Several parameter descriptions don’t match their actual meaning

timeout, tracker, and raise_for_error bullets look copy-pasted:

  • timeout is described as “populate the store…”, which is unrelated.
  • tracker is labelled “offset for pagination”.
  • raise_for_error is labelled “limit for pagination”.

Please revise these descriptions to reflect the real semantics or regenerate the docs with the correct metadata.

Comment on lines 51 to 55
Calls load, but wraps it in a try except block.

This is done to handle a ValidationErorr which is raised when settings are specified but invalid.
In such cases, a message is printed to the screen indicating the settings which don't pass validation.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix misspelling of ValidationError

ValidationErorr is misspelled and will show up in rendered docs as-is.

-This is done to handle a ValidationErorr which is raised when settings are specified but invalid.
+This is done to handle a ValidationError which is raised when settings are specified but invalid.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Calls load, but wraps it in a try except block.
This is done to handle a ValidationErorr which is raised when settings are specified but invalid.
In such cases, a message is printed to the screen indicating the settings which don't pass validation.
Calls load, but wraps it in a try except block.
This is done to handle a ValidationError which is raised when settings are specified but invalid.
In such cases, a message is printed to the screen indicating the settings which don't pass validation.
🧰 Tools
🪛 LanguageTool

[grammar] ~53-~53: Ensure spelling is correct
Context: ...except block. This is done to handle a ValidationErorr which is raised when settings are speci...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx around lines 51 to
55, correct the misspelling of "ValidationErorr" to "ValidationError" in the
text to ensure the error name is spelled correctly and renders properly in the
documentation.

@a-delannoy
Copy link
Author

I would suggest excluding the newly generated doc path from Vale surveillance.
Agreed

Ok, that's done !

@a-delannoy
Copy link
Author

please don't forget to add a fragment for the changelog

Done as well !

run: ${{ env.DOCS_COMMAND }}
- name: "Check if SDK API documentation needs to be refreshed"
run: |
git diff --quiet ${SDK_API_DOCS_DIR}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add this as an invoke command too so that it's consistent with how we do it in other repos.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate a bit about which part here you'd add as an invoke command ?
For now, I added an invoke command to generate the API docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean that we can run poetry run invoke generate-sdk-api-docs to generate the docs but then have another command to validate. It could simplify to also have a shortcut for the git diff like we have here:
https://github.com/opsmill/infrahub/blob/infrahub-v1.3.4/tasks/backend.py#L176

This part isn't critical though just a suggestion.


## Classes

### `GraphQLQueryVariable` <sup><a href="https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/analyzer.py#L20" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of these links to the main branch along with a line number. Looking at the published docs https://5390d612.infrahub-sdk-python.pages.dev/python-sdk/sdk_ref/infrahub_sdk/analyzer#graphqlqueryvariable- I can't actually see the these links on the page. But they are available in the source. I think we'd need to get rid of them to avoid conflicts as well as having a link that points to an incorrect branch.

If possible it could make sense to have this point to the current version at build time so that we have a link to a tagged release instead of a branch where the line numbers as well as overall structure of the file might change.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it is about docusaurus configuration because the FastMCP doc partake of those links while they don't appear in our documentation.

Mdxify lib provides us with a CLI arg to properly point at the desired git branch (might also work with any git ref but not sure about this) in generated code links. Do you want to leverage this ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say there are two issues the first is that the links are currently broken due to the main branch reference. The second is that as I can't even see the links on the website I don't think they fill a need. It might be because the icon for Github is missing so there's nothing to click on?

Copy link
Contributor

@ogenstad ogenstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I'd suggest that we start with a smaller scale and document the InfrahubClient classes as well as InfrahubNode and then curate the classes that we want to, later it could perhaps be based on file locations.

I think that we have too many public methods exposed today which we probably don't want to have documented like this.

Some of them could be confusing for a user such as: https://5390d612.infrahub-sdk-python.pages.dev/python-sdk/sdk_ref/infrahub_sdk/ctl/branch The functions under the CTL shouldn't really be used by end users directly but consumed by infrahubctl. I'm afraid that AI agents will make assumptions based of function names like this and generate faulty code as a result. Alternatively that "internal" functions are used in ways that might break when we change the code in future SDK versions. Also with things like https://5390d612.infrahub-sdk-python.pages.dev/python-sdk/sdk_ref/infrahub_sdk/constants that doesn't provide as much value as other pages it just adds noise.

Some of the output might be a bit confusing for humans when looking at for example the client.get method: https://5390d612.infrahub-sdk-python.pages.dev/python-sdk/sdk_ref/infrahub_sdk/client#get- most of these listings would be for @overload methods but it's not quite clear by looking at the docs. If possible it would be nice if we could mark the ones that are overload methods.

@a-delannoy
Copy link
Author

Nice work! I'd suggest that we start with a smaller scale and document the InfrahubClient classes as well as InfrahubNode and then curate the classes that we want to, later it could perhaps be based on file locations.

I think that we have too many public methods exposed today which we probably don't want to have documented like this.

Some of them could be confusing for a user such as: https://5390d612.infrahub-sdk-python.pages.dev/python-sdk/sdk_ref/infrahub_sdk/ctl/branch The functions under the CTL shouldn't really be used by end users directly but consumed by infrahubctl. I'm afraid that AI agents will make assumptions based of function names like this and generate faulty code as a result. Alternatively that "internal" functions are used in ways that might break when we change the code in future SDK versions. Also with things like https://5390d612.infrahub-sdk-python.pages.dev/python-sdk/sdk_ref/infrahub_sdk/constants that doesn't provide as much value as other pages it just adds noise.

Some of the output might be a bit confusing for humans when looking at for example the client.get method: https://5390d612.infrahub-sdk-python.pages.dev/python-sdk/sdk_ref/infrahub_sdk/client#get- most of these listings would be for @overload methods but it's not quite clear by looking at the docs. If possible it would be nice if we could mark the ones that are overload methods.

I agree with this. Do you have a list of modules to include/exclude ?

@a-delannoy
Copy link
Author

Also, regarding decorators, this is a thing we already started discussing with Damien. We opened an issue on mdxify to start a discussion around this.

@ogenstad
Copy link
Contributor

I agree with this. Do you have a list of modules to include/exclude ?

For the first iteration perhaps InfrahubClient, InfrahubClientSync, InfrahubNode and InfrahubNodeSync. If we have an easy way to just update it later that should be enough to add more as a follow up step.

@a-delannoy
Copy link
Author

I agree with this. Do you have a list of modules to include/exclude ?

For the first iteration perhaps InfrahubClient, InfrahubClientSync, InfrahubNode and InfrahubNodeSync. If we have an easy way to just update it later that should be enough to add more as a follow up step.

Just a precision, mdxify works on a module basis. So I found the proper modules, but the full generation is generated for everything that's inside it.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (2)

414-416: Copy-paste artefacts leak into IP-prefix docs

Same pagination wording is repeated here; fix as in previous comment.


736-739: Sync allocate_next_ip_address docs – incorrect parameter details

Replicate the correction applied to the async variant for timeout, tracker, and raise_for_error.

🧹 Nitpick comments (4)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (4)

34-44: Duplicate request_context entries create noise

Both the getter and the setter show up under the exact same heading. Consider renaming one of the headings (e.g. “request_context ‑ getter” / “request_context ‑ setter”) or grouping them in a single section to avoid reader confusion.


88-105: Overload explosion – collapse identical create() signatures

Seven overload blocks are rendered back-to-back, yet only two logical variants exist (“kind as str” and “kind as SchemaType”). The current dump overwhelms the page and makes the real API harder to grasp.

Diff-style proposal (keep only meaningful variants – pseudo code):

-### `create`
-```python
-create(self, kind: str, data: dict | None = ..., ...)
-```
-### `create`
-```python
-create(self, kind: type[SchemaType], data: dict | None = ..., ...)
-```
-...
+### `create`
+```python
+create(
+    self,
+    kind: str | type[SchemaType],
+    data: dict | None = None,
+    *,
+    branch: str | None = None,
+    timeout: int | None = None,
+    **kwargs: Any,
+) -> InfrahubNode | SchemaType
+```

This reduces clutter while fully describing the callable.


259-259: Spelling: “reachable”

reacheablereachable.


505-505: Spelling: “reachable” (sync variant)

reacheablereachable.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f13b94 and cf30309.

📒 Files selected for processing (3)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1 hunks)
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx (1 hunks)
  • tasks.py (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • tasks.py
  • docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx
🧰 Additional context used
🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx

[grammar] ~259-~259: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~505-~505: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

Comment on lines +353 to +356
- `timeout`: Flag to indicate whether to populate the store with the retrieved nodes.
- `tracker`: The offset for pagination.
- `raise_for_error`: The limit for pagination.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Wrong parameter descriptions for allocate_next_ip_address

timeout, tracker, and raise_for_error are described as pagination concepts, which is inaccurate and misleading.

-`timeout`: Flag to indicate whether to populate the store with the retrieved nodes.
-`tracker`: The offset for pagination.
-`raise_for_error`: The limit for pagination.
+`timeout`: Overrides the default request timeout (seconds).
+`tracker`: Identifier used for request tracing / correlation.
+`raise_for_error`: If True, raise an exception when GraphQL returns errors.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `timeout`: Flag to indicate whether to populate the store with the retrieved nodes.
- `tracker`: The offset for pagination.
- `raise_for_error`: The limit for pagination.
- `timeout`: Overrides the default request timeout (seconds).
- `tracker`: Identifier used for request tracing / correlation.
- `raise_for_error`: If True, raise an exception when GraphQL returns errors.
🤖 Prompt for AI Agents
In docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx around lines 353 to 356,
the parameter descriptions for `allocate_next_ip_address` incorrectly describe
`timeout`, `tracker`, and `raise_for_error` as pagination-related. Update these
descriptions to accurately reflect their actual purpose and usage in the method,
removing any references to pagination concepts.

Comment on lines +791 to +799
- `size`: Length of the prefix to allocate.
- `member_type`: Member type of the prefix to allocate.
- `prefix_type`: Kind of the prefix to allocate.
- `data`: A key/value map to use to set attributes values on the allocated prefix.
- `branch`: Name of the branch to allocate from. Defaults to default_branch.
- `timeout`: Flag to indicate whether to populate the store with the retrieved nodes.
- `tracker`: The offset for pagination.
- `raise_for_error`: The limit for pagination.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

size vs prefix_length mismatch

The Args section suddenly refers to size, but the actual parameter is prefix_length. Update the name to avoid confusion.

-`size`: Length of the prefix to allocate.
+`prefix_length`: Length of the prefix to allocate.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `size`: Length of the prefix to allocate.
- `member_type`: Member type of the prefix to allocate.
- `prefix_type`: Kind of the prefix to allocate.
- `data`: A key/value map to use to set attributes values on the allocated prefix.
- `branch`: Name of the branch to allocate from. Defaults to default_branch.
- `timeout`: Flag to indicate whether to populate the store with the retrieved nodes.
- `tracker`: The offset for pagination.
- `raise_for_error`: The limit for pagination.
- `prefix_length`: Length of the prefix to allocate.
- `member_type`: Member type of the prefix to allocate.
- `prefix_type`: Kind of the prefix to allocate.
- `data`: A key/value map to use to set attributes values on the allocated prefix.
- `branch`: Name of the branch to allocate from. Defaults to default_branch.
- `timeout`: Flag to indicate whether to populate the store with the retrieved nodes.
- `tracker`: The offset for pagination.
- `raise_for_error`: The limit for pagination.
🤖 Prompt for AI Agents
In docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx around lines 791 to 799,
the Args section uses the parameter name `size` which does not match the actual
parameter name `prefix_length`. Update all occurrences of `size` to
`prefix_length` in this section to ensure consistency and avoid confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/ci Issue related to the CI pipeline type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants