Skip to content

Commit 4766a89

Browse files
author
ikemilian-lewis
committed
fix: split azure runtime and test dependencies
1 parent 0395164 commit 4766a89

4 files changed

Lines changed: 25 additions & 77 deletions

File tree

.github/workflows/shared-config.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,13 @@ jobs:
130130
except ImportError:
131131
import tomli as tomllib # backport for Python < 3.11
132132
import json
133-
META = {'all', 'dev', 'ci', 'test-aws', 'test-k8s', 'all-providers', 'k8s-legacy', 'monitoring-aws'}
133+
META = {'all', 'dev', 'ci', 'all-providers', 'k8s-legacy', 'monitoring-aws'}
134134
with open('pyproject.toml', 'rb') as f:
135135
data = tomllib.load(f)
136-
extras = [k for k in data['project']['optional-dependencies'].keys() if k not in META]
136+
extras = [
137+
k for k in data['project']['optional-dependencies']
138+
if k not in META and not k.startswith('test-')
139+
]
137140
print(json.dumps(extras if extras else ['cli', 'api', 'monitoring']))
138141
")
139142

pyproject.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,12 @@ k8s = [
8989
"kubernetes",
9090
]
9191

92+
# Azure provider runtime dependencies. Install with:
93+
# pip install orb-py[azure]
9294
azure = [
9395
"azure-core>=1.38.2",
9496
"azure-identity>=1.25.2",
95-
"azure-mgmt-authorization>=4.0.0",
9697
"azure-mgmt-compute>=37.2.0",
97-
"azure-mgmt-monitor>=7.0.0",
98-
"azure-mgmt-msi>=7.1.0",
9998
"azure-mgmt-network>=30.2.0",
10099
"azure-mgmt-resource>=25.0.0",
101100
"azure-mgmt-resource-subscriptions>=1.0.0b1",
@@ -201,6 +200,15 @@ test-aws = [
201200
"requests-mock>=1.11.0,<2.0.0",
202201
]
203202

203+
# Azure SDK packages imported directly by the Azure tests. These overlap with
204+
# the runtime extra because the tests assert behavior using real SDK exception
205+
# and model types, but the test group does not install unrelated runtime SDKs.
206+
test-azure = [
207+
"azure-core>=1.38.2",
208+
"azure-identity>=1.25.2",
209+
"azure-mgmt-compute>=37.2.0",
210+
]
211+
204212
# Kubernetes test dependencies — kmock is an in-process HTTP-level K8s API mock.
205213
# Tests point the real kubernetes SDK client at the kmock URL so the full
206214
# client stack is exercised without a live cluster.

tests/providers/azure/test_import_guards.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
"azure.core.exceptions": None,
1212
"azure.identity": None,
1313
"azure.mgmt": None,
14-
"azure.mgmt.authorization": None,
1514
"azure.mgmt.compute": None,
16-
"azure.mgmt.monitor": None,
17-
"azure.mgmt.msi": None,
1815
"azure.mgmt.network": None,
1916
"azure.mgmt.resource": None,
2017
"azure.mgmt.resource.subscriptions": None,

uv.lock

Lines changed: 9 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)