Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .claude/logs/quality-hook.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
2025-12-25 13:41:50 - quality-hook - INFO - [main:695] - Linter hook started
2025-12-25 13:41:50 - quality-hook - INFO - [main:737] - Starting fix iteration 1/3
2025-12-25 13:41:50 - quality-hook - INFO - [lint_files_parallel:606] - Starting parallel linting of 1 file(s) with 4 workers
2025-12-25 13:41:50 - quality-hook - INFO - [lint_file:500] - Linting file: /Users/pete/src/infrahub-demo-dc-fabric/.github/workflows/ci.yml (extension: .yml)
2025-12-25 13:41:50 - quality-hook - INFO - [lint_file:503] - No linter configured for extension .yml
2025-12-25 13:41:50 - quality-hook - INFO - [lint_files_parallel:635] - Parallel linting completed in 0.00s
2025-12-25 13:41:50 - quality-hook - INFO - [main:752] - All files passed linting on iteration 1
2025-12-25 13:41:50 - quality-hook - INFO - [format_output:645] - Processing lint results for 1 file(s)
2025-12-25 13:41:50 - quality-hook - INFO - [format_output:657] - All files passed linting successfully
2025-12-25 13:41:50 - quality-hook - INFO - [main:906] - Linter hook completed in 0.00s (lint time: 0.00s)
2025-12-25 13:42:06 - quality-hook - INFO - [main:695] - Linter hook started
2025-12-25 13:42:06 - quality-hook - INFO - [main:737] - Starting fix iteration 1/3
2025-12-25 13:42:06 - quality-hook - INFO - [lint_files_parallel:606] - Starting parallel linting of 1 file(s) with 4 workers
2025-12-25 13:42:06 - quality-hook - INFO - [lint_file:500] - Linting file: /Users/pete/src/infrahub-demo-dc-fabric/.vale/styles/spelling-exceptions.txt (extension: .txt)
2025-12-25 13:42:06 - quality-hook - INFO - [lint_file:503] - No linter configured for extension .txt
2025-12-25 13:42:06 - quality-hook - INFO - [lint_files_parallel:635] - Parallel linting completed in 0.00s
2025-12-25 13:42:06 - quality-hook - INFO - [main:752] - All files passed linting on iteration 1
2025-12-25 13:42:06 - quality-hook - INFO - [format_output:645] - Processing lint results for 1 file(s)
2025-12-25 13:42:06 - quality-hook - INFO - [format_output:657] - All files passed linting successfully
2025-12-25 13:42:06 - quality-hook - INFO - [main:906] - Linter hook completed in 0.00s (lint time: 0.00s)
2025-12-25 13:42:16 - quality-hook - INFO - [main:695] - Linter hook started
2025-12-25 13:42:16 - quality-hook - INFO - [main:737] - Starting fix iteration 1/3
2025-12-25 13:42:16 - quality-hook - INFO - [lint_files_parallel:606] - Starting parallel linting of 1 file(s) with 4 workers
2025-12-25 13:42:16 - quality-hook - INFO - [lint_file:500] - Linting file: /Users/pete/src/infrahub-demo-dc-fabric/docs/docs/install.mdx (extension: .mdx)
2025-12-25 13:42:16 - quality-hook - INFO - [lint_file:537] - Lint passed for /Users/pete/src/infrahub-demo-dc-fabric/docs/docs/install.mdx using markdownlint
2025-12-25 13:42:16 - quality-hook - INFO - [lint_files_parallel:635] - Parallel linting completed in 0.20s
2025-12-25 13:42:16 - quality-hook - INFO - [main:752] - All files passed linting on iteration 1
2025-12-25 13:42:16 - quality-hook - INFO - [format_output:645] - Processing lint results for 1 file(s)
2025-12-25 13:42:16 - quality-hook - INFO - [format_output:657] - All files passed linting successfully
2025-12-25 13:42:16 - quality-hook - INFO - [main:906] - Linter hook completed in 0.20s (lint time: 0.20s)
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ COPY . .

USER vscode

RUN curl -sSL https://install.python-poetry.org | python3 - && \
RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
echo "export PATH=\"$HOME/.local/bin:$PATH\"" >> $HOME/.bashrc

RUN bash -c "$(curl -sL https://get.containerlab.dev)"
7 changes: 3 additions & 4 deletions .devcontainer/onCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/bin/bash

poetry config virtualenvs.create true
poetry install
uv sync --group dev

# Install Arista Collection
poetry run ansible-galaxy install -r ansible-requirements.yml
uv run ansible-galaxy install -r ansible-requirements.yml

poetry run invoke start
uv run invoke start
# Deploy the lab!
# sudo -E containerlab deploy -t ./topology/demo.clab.yml --reconfigure
4 changes: 2 additions & 2 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

# Load infra-schema + infra-topology
poetry run invoke load-schema
uv run invoke load-schema

# Wait a bit extra to be sure the schema are properly loaded
sleep 30

# Load infra-data
poetry run invoke load-data
uv run invoke load-data
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Default owners for everything in the repo

* @opsmill/sa
119 changes: 83 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
---
name: Build and Deploy Docusaurus
name: CI
# yamllint disable rule:truthy rule:line-length
on:
pull_request:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
VALE_VERSION: "3.7.1"
VALE_VERSION: "3.13.0"

jobs:
files-changed:
Expand All @@ -18,9 +26,10 @@ jobs:
documentation: ${{ steps.changes.outputs.documentation_all }}
python: ${{ steps.changes.outputs.python_all }}
yaml: ${{ steps.changes.outputs.yaml_all }}
markdown: ${{ steps.changes.outputs.markdown_all }}
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
- name: Check for file changes
uses: opsmill/[email protected]
id: changes
Expand All @@ -35,24 +44,27 @@ jobs:
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: "Setup Python environment"
run: |
pipx install poetry==1.8.5
poetry config virtualenvs.create true --local
poetry env use 3.12
- name: Install uv
uses: "astral-sh/setup-uv@v7"
with:
version: "0.9.18"
- name: "Install dependencies"
run: "poetry install --with dev"
- name: "Linting: ruff check"
run: "poetry run ruff check ."
- name: "Linting: ruff format"
run: "poetry run ruff format --check --diff"
run: "uv sync --group dev"
- name: "Check code formatting"
run: |
uv run ruff format --check --diff
uv run ruff check --select I .
- name: "Run linters"
run: "uv run ruff check ."
- name: "Run type checks"
run: "uv run mypy ."

yaml-lint:
if: needs.files-changed.outputs.yaml == 'true'
Expand All @@ -61,19 +73,50 @@ jobs:
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
with:
submodules: true
- name: "Setup environment"
run: "pip install yamllint==1.35.1"
- name: "Linting: yamllint"
run: "yamllint -s ."
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install uv
uses: "astral-sh/setup-uv@v7"
with:
version: "0.9.18"
- name: "Install dependencies"
run: "uv sync --group dev"
- name: "Run yamllint"
run: "uv run yamllint -s ."

markdown-lint:
if: needs.files-changed.outputs.markdown == 'true'
needs: ["files-changed"]
runs-on: "ubuntu-latest"
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v6"
- uses: actions/setup-node@v6
with:
node-version: 20
- name: "Install markdownlint-cli"
run: npm install -g markdownlint-cli
- name: "Run markdownlint"
run: markdownlint "**/*.{md,mdx}"

integration-test:
needs: ["files-changed", "python-lint", "yaml-lint", "markdown-lint"]
if: |
always() && !cancelled() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled')
runs-on:
group: "huge-runners"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
timeout-minutes: 60
env:
INFRAHUB_DB_TYPE: neo4j
Expand All @@ -82,23 +125,23 @@ jobs:
INFRAHUB_TESTING_LOG_LEVEL: INFO
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: "Setup Python environment"
run: |
poetry config virtualenvs.create true --local
poetry env use 3.12
- name: Install uv
uses: "astral-sh/setup-uv@v7"
with:
version: "0.9.18"
- name: "Install dependencies"
run: "poetry install --with dev"
run: "uv sync --group dev"
- name: "Set environment variables"
run: |
RUNNER_NAME=$(echo "${{ runner.name }}" | grep -o 'ghrunner[0-9]\+' | sed 's/ghrunner\([0-9]\+\)/ghrunner_\1/')
echo "PYTEST_DEBUG_TEMPROOT=/var/lib/github/${RUNNER_NAME}/_temp" >> $GITHUB_ENV
- name: "Run integration tests"
run: "poetry run pytest tests/integration/"
run: "uv run pytest tests/integration/"
env:
REPOSITORY_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -111,12 +154,12 @@ jobs:
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled') &&
needs.files-changed.outputs.documentation == 'true'
needs: ["files-changed", "yaml-lint", "python-lint"]
needs: ["files-changed", "yaml-lint", "python-lint", "markdown-lint"]
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
with:
submodules: true
- name: Install NodeJS
Expand All @@ -125,25 +168,29 @@ jobs:
node-version: 20
cache: 'npm'
cache-dependency-path: docs/package-lock.json
- name: "Install dependencies"
- name: "Install Node dependencies"
run: npm install
- name: "Setup Python environment"
run: "pip install invoke toml"
- name: Install uv
uses: "astral-sh/setup-uv@v7"
with:
version: "0.9.18"
- name: "Install Python dependencies"
run: "uv sync"
working-directory: ./
- name: "Build docs website"
run: "invoke docs"

run: "uv run invoke docs"

validate-documentation-style:
if: |
always() && !cancelled() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled')
needs: ["files-changed", "yaml-lint", "python-lint"]
needs: ["files-changed", "yaml-lint", "python-lint", "markdown-lint"]
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
with:
submodules: true

Expand All @@ -156,4 +203,4 @@ jobs:
env:
VALE_VERSION: ${{ env.VALE_VERSION }}
- name: "Validate documentation style"
run: ./vale $(find ./docs -type f \( -name "*.mdx" -o -name "*.md" \) )
run: ./vale $(find ./docs/docs -type f \( -name "*.mdx" -o -name "*.md" \) )
4 changes: 2 additions & 2 deletions .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
path: source-repo

- name: Checkout target repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: opsmill/infrahub-docs
token: ${{ secrets.PAT_TOKEN }}
Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/update-infrahub-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,21 @@ jobs:
BRANCH_NAME: ${{ matrix.branch-name }}-infrahub-sdk-${{ github.event_name == 'repository_dispatch' && github.event.client_payload.version || github.event.inputs.version }}
steps:
- name: Check out code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: "Install Poetry"
uses: "snok/install-poetry@v1"
- name: Install uv
uses: "astral-sh/setup-uv@v7"
with:
version: 1.8.5
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
version: "0.9.18"

- name: "Setup Python environment"
- name: Update infrahub-sdk to workflow version ${{ env.INFRAHUB_SDK_VERSION }}
run: |
poetry config virtualenvs.create true --local
poetry env use 3.12

- name: Update testcontainers to workflow version ${{ env.INFRAHUB_SDK_VERSION }}
run: |
poetry add infrahub-sdk==${INFRAHUB_SDK_VERSION} -E all
uv add "infrahub-sdk[all]==${INFRAHUB_SDK_VERSION}"

- name: Prepare the branch for the update
id: prepare-branch
Expand All @@ -74,7 +66,7 @@ jobs:
commit-message: "chore: update infrahub-sdk to version ${{ env.INFRAHUB_SDK_VERSION }} and bump version in pyproject"
files: |
pyproject.toml
poetry.lock
uv.lock
name: opsmill-bot
email: [email protected]
rebase: ${{ env.BRANCH_EXISTS == 1 }}
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/update-infrahub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,21 @@ jobs:
BRANCH_NAME: ${{ matrix.branch-name }}-${{ github.event_name == 'repository_dispatch' && github.event.client_payload.version || github.event.inputs.version }}
steps:
- name: Check out code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: "Install Poetry"
uses: "snok/install-poetry@v1"
- name: Install uv
uses: "astral-sh/setup-uv@v7"
with:
version: 1.8.5
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: "Setup Python environment"
run: |
poetry config virtualenvs.create true --local
poetry env use 3.12
version: "0.9.18"

- name: Update testcontainers to workflow version ${{ env.INFRAHUB_VERSION }}
run: |
poetry add --group=dev infrahub-testcontainers==${INFRAHUB_VERSION}
uv add --group dev "infrahub-testcontainers==${INFRAHUB_VERSION}"

- name: Prepare the branch for the update
id: prepare-branch
Expand All @@ -80,7 +72,7 @@ jobs:
commit-message: "chore: update test-containers to version ${{ env.INFRAHUB_VERSION }} and bump version in pyproject"
files: |
pyproject.toml
poetry.lock
uv.lock
name: opsmill-bot
email: [email protected]
rebase: ${{ env.BRANCH_EXISTS == 1 }}
Expand Down
Loading