Skip to content

Commit 061ef2e

Browse files
authored
chore: migrate from poetry to uv (#180)
1 parent e623694 commit 061ef2e

37 files changed

+3473
-5291
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Default owners for everything in the repo
2+
3+
* @opsmill/sa

.github/workflows/ci.yml

Lines changed: 55 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ on:
77
branches:
88
- main
99

10+
permissions:
11+
contents: read
12+
1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.ref }}
1215
cancel-in-progress: true
1316

1417
env:
15-
VALE_VERSION: "3.7.1"
18+
VALE_VERSION: "3.13.0"
1619

1720
jobs:
1821
files-changed:
@@ -23,6 +26,7 @@ jobs:
2326
documentation: ${{ steps.changes.outputs.documentation_all }}
2427
python: ${{ steps.changes.outputs.python_all }}
2528
yaml: ${{ steps.changes.outputs.yaml_all }}
29+
markdown: ${{ steps.changes.outputs.markdown_all }}
2630
steps:
2731
- name: "Check out repository code"
2832
uses: "actions/checkout@v5"
@@ -41,8 +45,6 @@ jobs:
4145
matrix:
4246
python-version:
4347
- "3.12"
44-
poetry-version:
45-
- "1.8.5"
4648
timeout-minutes: 5
4749
steps:
4850
- name: "Check out repository code"
@@ -52,28 +54,23 @@ jobs:
5254
uses: "actions/setup-python@v6"
5355
with:
5456
python-version: ${{ matrix.python-version }}
55-
- name: "Install Poetry ${{ matrix.poetry-version }}"
56-
uses: "snok/install-poetry@v1"
57+
58+
- name: "Install uv"
59+
uses: "astral-sh/setup-uv@v7"
5760
with:
58-
version: ${{ matrix.poetry-version }}
59-
virtualenvs-create: true
60-
virtualenvs-in-project: true
61-
installer-parallel: true
62-
- name: "Setup Python environment"
63-
run: |
64-
poetry config virtualenvs.create true --local
65-
poetry env use ${{ matrix.python-version }}
61+
version: "0.9.18"
62+
6663
- name: "Install dependencies"
67-
run: "poetry install --no-interaction --no-ansi --with dev"
64+
run: "uv sync --group dev"
6865

6966
- name: "Linting: ruff check"
70-
run: "poetry run ruff check ."
67+
run: "uv run ruff check ."
7168
- name: "Linting: ruff format"
72-
run: "poetry run ruff format --check --diff ."
69+
run: "uv run ruff format --check --diff ."
7370
- name: "Mypy Tests"
74-
run: "poetry run mypy --show-error-codes emma pages"
71+
run: "uv run mypy --show-error-codes emma pages"
7572
- name: "Pylint Tests"
76-
run: "poetry run pylint emma pages *.py"
73+
run: "uv run pylint emma pages *.py"
7774

7875
yaml-lint:
7976
if: needs.files-changed.outputs.yaml == 'true'
@@ -85,10 +82,31 @@ jobs:
8582
uses: "actions/checkout@v5"
8683
with:
8784
submodules: true
88-
- name: "Setup environment"
89-
run: "pip install yamllint==1.35.1"
85+
- name: "Install uv"
86+
uses: "astral-sh/setup-uv@v7"
87+
with:
88+
version: "0.9.18"
89+
- name: "Install dependencies"
90+
run: "uv sync --group dev"
9091
- name: "Linting: yamllint"
91-
run: "yamllint -s ."
92+
run: "uv run yamllint -s ."
93+
94+
markdown-lint:
95+
if: needs.files-changed.outputs.markdown == 'true'
96+
needs: ["files-changed"]
97+
runs-on: "ubuntu-latest"
98+
timeout-minutes: 5
99+
steps:
100+
- name: "Check out repository code"
101+
uses: "actions/checkout@v5"
102+
- name: "Install NodeJS"
103+
uses: "actions/setup-node@v6"
104+
with:
105+
node-version: 20
106+
- name: "Install markdownlint-cli"
107+
run: "npm install -g markdownlint-cli"
108+
- name: "Run markdownlint"
109+
run: 'markdownlint "**/*.{md,mdx}"'
92110

93111
documentation:
94112
defaults:
@@ -99,7 +117,7 @@ jobs:
99117
!contains(needs.*.result, 'failure') &&
100118
!contains(needs.*.result, 'cancelled') &&
101119
needs.files-changed.outputs.documentation == 'true'
102-
needs: ["files-changed", "yaml-lint", "python-lint"]
120+
needs: ["files-changed", "yaml-lint", "python-lint", "markdown-lint"]
103121
runs-on: "ubuntu-22.04"
104122
timeout-minutes: 5
105123
steps:
@@ -115,17 +133,23 @@ jobs:
115133
cache-dependency-path: docs/package-lock.json
116134
- name: "Install dependencies"
117135
run: npm install
118-
- name: "Setup Python environment"
119-
run: "pip install invoke toml"
136+
- name: "Install uv"
137+
uses: "astral-sh/setup-uv@v7"
138+
with:
139+
version: "0.9.18"
140+
- name: "Install Python dependencies"
141+
run: "uv sync"
142+
working-directory: ./
120143
- name: "Build docs website"
121-
run: "invoke docs"
144+
run: "uv run invoke docs"
145+
working-directory: ./
122146

123147
validate-documentation-style:
124148
if: |
125149
always() && !cancelled() &&
126150
!contains(needs.*.result, 'failure') &&
127151
!contains(needs.*.result, 'cancelled')
128-
needs: ["files-changed", "yaml-lint", "python-lint"]
152+
needs: ["files-changed", "yaml-lint", "python-lint", "markdown-lint"]
129153
runs-on: "ubuntu-22.04"
130154
timeout-minutes: 5
131155
steps:
@@ -153,8 +177,6 @@ jobs:
153177
matrix:
154178
python-version:
155179
- "3.12"
156-
poetry-version:
157-
- "1.8.5"
158180
timeout-minutes: 5
159181
steps:
160182
- name: "Check out repository code"
@@ -165,25 +187,17 @@ jobs:
165187
with:
166188
python-version: ${{ matrix.python-version }}
167189

168-
- name: "Install Poetry ${{ matrix.poetry-version }}"
169-
uses: "snok/install-poetry@v1"
190+
- name: "Install uv"
191+
uses: "astral-sh/setup-uv@v7"
170192
with:
171-
version: ${{ matrix.poetry-version }}
172-
virtualenvs-create: true
173-
virtualenvs-in-project: true
174-
installer-parallel: true
175-
176-
- name: "Setup Python environment"
177-
run: |
178-
poetry config virtualenvs.create true --local
179-
poetry env use ${{ matrix.python-version }}
193+
version: "0.9.18"
180194

181195
- name: "Install dependencies"
182-
run: "poetry install --no-interaction --no-ansi"
196+
run: "uv sync"
183197

184198
- name: "Run Streamlit"
185199
run: |
186-
timeout 30s poetry run streamlit run main.py &
200+
timeout 30s uv run streamlit run main.py &
187201
PID=$!
188202
sleep 10
189203
if ps -p $PID > /dev/null; then

.markdownlint.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.markdownlint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
# Markdownlint configuration
3+
# https://github.com/DavidAnson/markdownlint
4+
5+
default: true
6+
7+
# MD013/line-length - Line length (disabled for readability in prose)
8+
MD013: false
9+
10+
# MD024/no-duplicate-heading - Multiple headings with the same content
11+
# Allow duplicate headings in different sections (e.g., tabs)
12+
MD024:
13+
siblings_only: true
14+
15+
# MD025/single-title - Multiple top-level headings
16+
# Prevent collisions with h1s and frontmatter titles
17+
MD025:
18+
front_matter_title: ""
19+
20+
# MD029/ol-prefix - Ordered list item prefix (disabled for manual numbering)
21+
MD029: false
22+
23+
# MD033/no-inline-html - Inline HTML (disabled for MDX React components)
24+
MD033: false
25+
26+
# MD060/table-column-style - Table column style (disabled for flexibility)
27+
MD060: false

.markdownlintignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Files to ignore
2+
3+
.claude/
4+
.git/
5+
.kiro/
6+
.mypy_cache/
7+
.ruff_cache/
8+
.venv/
9+
CLAUDE.md
10+
docs/.docusaurus/
11+
docs/build/
12+
docs/node_modules/
13+
docs/README.md
14+
node_modules/
15+
schema-library/

.vale/styles/Infrahub/sentence-case.yml

Lines changed: 13 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -12,85 +12,22 @@ scope:
1212
match: $sentence
1313
exceptions:
1414
- AI
15+
- AI configuration
16+
- AI integration
17+
- AI limitations
18+
- AI assistant settings
19+
- AI schema builder issues
1520
- Alpha
16-
- Ansible
1721
- API
18-
- Attributes
19-
- AWS S3
22+
- API token security
2023
- Beta
21-
- BGP
22-
- CA certificates
23-
- CI
24-
- Codespaces
25-
- Computed Attribute
26-
- Computed Attributes
27-
- CoreArtifactTarget
28-
- CoreGroup
29-
- CoreRepository
24+
- Cannot connect to Infrahub
3025
- Docker Compose
31-
- E2E
3226
- Emma
33-
- Generics
34-
- Git
35-
- GitHub
36-
- GitHub Codespaces
37-
- GitLab
38-
- GitPod
39-
- GraphQL
40-
- GraphQLQuery
41-
- Helm
42-
- High Availability
43-
- Human Friendly Identifier
44-
- IDE
45-
- include_in_menu & menu_placement
27+
- Getting an API token
4628
- Infrahub
47-
- Infrahub Enterprise
48-
- infrahubctl
49-
- IP
50-
- IP Fabric
51-
- IPAM
52-
- IPHost
53-
- IPNetwork
54-
- JavaScript
55-
- JetStream
56-
- Jinja
57-
- Jinja2
58-
- JWT
59-
- LibreNMS
60-
- Namespace
61-
- NATS
62-
- Nautobot
63-
- Neo4j
64-
- Netbox
65-
- NetBox
66-
- Netpicker
67-
- NetPicker
68-
- Node
69-
- NumberPool
70-
- OAuth2
71-
- Observium
72-
- OIDC
73-
- Open ID Connect
74-
- OpsMill
75-
- Peering Manager
76-
- Pydantic
77-
- Python
78-
- RabbitMQ
79-
- REST
80-
- RFile
81-
- Schema
82-
- SDK
83-
- Single sign-on
84-
- Slurp'it
85-
- SSO
86-
- Terraform
87-
- TLS
88-
- Tony Stark
89-
- TransformPython
90-
- TruffleHog
91-
- Trusted Root Certificate Store
92-
- UI
93-
- Vale
94-
- VS Code
95-
- VS Code extensions
96-
- WebUI
29+
- Integration APIs
30+
- Opening Emma
31+
- Understanding Emma's interface
32+
- Using Infrahub directly
33+
- What Emma can do

0 commit comments

Comments
 (0)