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
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
96 changes: 55 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ on:
branches:
- main

permissions:
contents: read

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

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

jobs:
files-changed:
Expand All @@ -23,6 +26,7 @@ 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"
Expand All @@ -41,8 +45,6 @@ jobs:
matrix:
python-version:
- "3.12"
poetry-version:
- "1.8.5"
timeout-minutes: 5
steps:
- name: "Check out repository code"
Expand All @@ -52,28 +54,23 @@ jobs:
uses: "actions/setup-python@v6"
with:
python-version: ${{ matrix.python-version }}
- name: "Install Poetry ${{ matrix.poetry-version }}"
uses: "snok/install-poetry@v1"

- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
version: ${{ matrix.poetry-version }}
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: "Setup Python environment"
run: |
poetry config virtualenvs.create true --local
poetry env use ${{ matrix.python-version }}
version: "0.9.18"

- name: "Install dependencies"
run: "poetry install --no-interaction --no-ansi --with dev"
run: "uv sync --group dev"

- name: "Linting: ruff check"
run: "poetry run ruff check ."
run: "uv run ruff check ."
- name: "Linting: ruff format"
run: "poetry run ruff format --check --diff ."
run: "uv run ruff format --check --diff ."
- name: "Mypy Tests"
run: "poetry run mypy --show-error-codes emma pages"
run: "uv run mypy --show-error-codes emma pages"
- name: "Pylint Tests"
run: "poetry run pylint emma pages *.py"
run: "uv run pylint emma pages *.py"

yaml-lint:
if: needs.files-changed.outputs.yaml == 'true'
Expand All @@ -85,10 +82,31 @@ jobs:
uses: "actions/checkout@v5"
with:
submodules: true
- name: "Setup environment"
run: "pip install yamllint==1.35.1"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
version: "0.9.18"
- name: "Install dependencies"
run: "uv sync --group dev"
- name: "Linting: yamllint"
run: "yamllint -s ."
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@v5"
- name: "Install NodeJS"
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}"'

documentation:
defaults:
Expand All @@ -99,7 +117,7 @@ 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:
Expand All @@ -115,17 +133,23 @@ jobs:
cache-dependency-path: docs/package-lock.json
- name: "Install 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"
working-directory: ./

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:
Expand Down Expand Up @@ -153,8 +177,6 @@ jobs:
matrix:
python-version:
- "3.12"
poetry-version:
- "1.8.5"
timeout-minutes: 5
steps:
- name: "Check out repository code"
Expand All @@ -165,25 +187,17 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

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

- name: "Setup Python environment"
run: |
poetry config virtualenvs.create true --local
poetry env use ${{ matrix.python-version }}
version: "0.9.18"

- name: "Install dependencies"
run: "poetry install --no-interaction --no-ansi"
run: "uv sync"

- name: "Run Streamlit"
run: |
timeout 30s poetry run streamlit run main.py &
timeout 30s uv run streamlit run main.py &
PID=$!
sleep 10
if ps -p $PID > /dev/null; then
Expand Down
16 changes: 0 additions & 16 deletions .markdownlint.yaml

This file was deleted.

27 changes: 27 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# Markdownlint configuration
# https://github.com/DavidAnson/markdownlint

default: true

# MD013/line-length - Line length (disabled for readability in prose)
MD013: false

# MD024/no-duplicate-heading - Multiple headings with the same content
# Allow duplicate headings in different sections (e.g., tabs)
MD024:
siblings_only: true

# MD025/single-title - Multiple top-level headings
# Prevent collisions with h1s and frontmatter titles
MD025:
front_matter_title: ""

# MD029/ol-prefix - Ordered list item prefix (disabled for manual numbering)
MD029: false

# MD033/no-inline-html - Inline HTML (disabled for MDX React components)
MD033: false

# MD060/table-column-style - Table column style (disabled for flexibility)
MD060: false
15 changes: 15 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Files to ignore

.claude/
.git/
.kiro/
.mypy_cache/
.ruff_cache/
.venv/
CLAUDE.md
docs/.docusaurus/
docs/build/
docs/node_modules/
docs/README.md
node_modules/
schema-library/
89 changes: 13 additions & 76 deletions .vale/styles/Infrahub/sentence-case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,85 +12,22 @@ scope:
match: $sentence
exceptions:
- AI
- AI configuration
- AI integration
- AI limitations
- AI assistant settings
- AI schema builder issues
- Alpha
- Ansible
- API
- Attributes
- AWS S3
- API token security
- Beta
- BGP
- CA certificates
- CI
- Codespaces
- Computed Attribute
- Computed Attributes
- CoreArtifactTarget
- CoreGroup
- CoreRepository
- Cannot connect to Infrahub
- Docker Compose
- E2E
- Emma
- Generics
- Git
- GitHub
- GitHub Codespaces
- GitLab
- GitPod
- GraphQL
- GraphQLQuery
- Helm
- High Availability
- Human Friendly Identifier
- IDE
- include_in_menu & menu_placement
- Getting an API token
- Infrahub
- Infrahub Enterprise
- infrahubctl
- IP
- IP Fabric
- IPAM
- IPHost
- IPNetwork
- JavaScript
- JetStream
- Jinja
- Jinja2
- JWT
- LibreNMS
- Namespace
- NATS
- Nautobot
- Neo4j
- Netbox
- NetBox
- Netpicker
- NetPicker
- Node
- NumberPool
- OAuth2
- Observium
- OIDC
- Open ID Connect
- OpsMill
- Peering Manager
- Pydantic
- Python
- RabbitMQ
- REST
- RFile
- Schema
- SDK
- Single sign-on
- Slurp'it
- SSO
- Terraform
- TLS
- Tony Stark
- TransformPython
- TruffleHog
- Trusted Root Certificate Store
- UI
- Vale
- VS Code
- VS Code extensions
- WebUI
- Integration APIs
- Opening Emma
- Understanding Emma's interface
- Using Infrahub directly
- What Emma can do
Loading