Skip to content

Commit e524fc7

Browse files
authored
User Feedback: Heavy install footprint (#139)
1 parent 981aee0 commit e524fc7

16 files changed

Lines changed: 202 additions & 95 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ jobs:
6666
platforms: linux/amd64,linux/arm64
6767
push: true
6868
tags: ${{ steps.meta.outputs.tags }}
69-
build-args: CLEANCLOUD_VERSION=${{ steps.version.outputs.CLEANCLOUD_VERSION }}
69+
build-args: |
70+
CLEANCLOUD_VERSION=${{ steps.version.outputs.CLEANCLOUD_VERSION }}
71+
CLEANCLOUD_EXTRAS=all
7072
labels: ${{ steps.meta.outputs.labels }}
7173
cache-from: type=gha
7274
cache-to: type=gha,mode=max

.github/workflows/main-validation.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install -e ".[dev]"
29+
pip install -e ".[all,dev]"
3030
3131
# - name: Verify imports
3232
# run: |
@@ -61,7 +61,7 @@ jobs:
6161
- name: Install CleanCloud
6262
run: |
6363
python -m pip install --upgrade pip
64-
pip install -e ".[dev]"
64+
pip install -e ".[all,dev]"
6565
6666
# AWS via OIDC (no static secrets)
6767
- name: Configure AWS credentials (OIDC)
@@ -104,7 +104,7 @@ jobs:
104104
- name: Install CleanCloud
105105
run: |
106106
python -m pip install --upgrade pip
107-
pip install -e ".[dev]"
107+
pip install -e ".[all,dev]"
108108
109109
- name: Configure AWS credentials (OIDC)
110110
uses: aws-actions/configure-aws-credentials@v4
@@ -146,7 +146,7 @@ jobs:
146146
- name: Install CleanCloud
147147
run: |
148148
python -m pip install --upgrade pip
149-
pip install -e ".[dev]"
149+
pip install -e ".[all,dev]"
150150
151151
- name: Azure Login via OIDC
152152
uses: azure/login@v2
@@ -191,7 +191,7 @@ jobs:
191191
- name: Install CleanCloud
192192
run: |
193193
python -m pip install --upgrade pip
194-
pip install -e ".[dev]"
194+
pip install -e ".[all,dev]"
195195
196196
- name: Azure Login via OIDC (no subscription pin — scans all)
197197
uses: azure/login@v2
@@ -233,7 +233,7 @@ jobs:
233233
- name: Install CleanCloud
234234
run: |
235235
python -m pip install --upgrade pip
236-
pip install -e ".[dev]"
236+
pip install -e ".[all,dev]"
237237
238238
- name: Authenticate to GCP (Workload Identity Federation)
239239
uses: google-github-actions/auth@v2

.github/workflows/pr-checks.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Install dependencies
6060
run: |
6161
python -m pip install --upgrade pip
62-
pip install -e ".[dev]"
62+
pip install -e ".[all,dev]"
6363
6464
# AWS via OIDC (no static secrets)
6565
- name: Configure AWS credentials (OIDC)
@@ -149,7 +149,7 @@ jobs:
149149
- name: Install CleanCloud
150150
run: |
151151
python -m pip install --upgrade pip
152-
pip install -e ".[dev]"
152+
pip install -e ".[all,dev]"
153153
154154
# AWS via OIDC (matches client CI usage)
155155
- name: Configure AWS credentials (OIDC)
@@ -194,7 +194,7 @@ jobs:
194194
- name: Install CleanCloud
195195
run: |
196196
python -m pip install --upgrade pip
197-
pip install -e ".[dev]"
197+
pip install -e ".[all,dev]"
198198
199199
- name: Configure AWS credentials (OIDC)
200200
uses: aws-actions/configure-aws-credentials@v4
@@ -235,7 +235,7 @@ jobs:
235235
- name: Install CleanCloud
236236
run: |
237237
python -m pip install --upgrade pip
238-
pip install -e ".[dev]"
238+
pip install -e ".[all,dev]"
239239
240240
- name: Azure Login via OIDC
241241
uses: azure/login@v2
@@ -281,7 +281,7 @@ jobs:
281281
- name: Install CleanCloud
282282
run: |
283283
python -m pip install --upgrade pip
284-
pip install -e ".[dev]"
284+
pip install -e ".[all,dev]"
285285
286286
- name: Azure Login via OIDC (no subscription pin — scans all)
287287
uses: azure/login@v2
@@ -322,7 +322,7 @@ jobs:
322322
- name: Install CleanCloud
323323
run: |
324324
python -m pip install --upgrade pip
325-
pip install -e ".[dev]"
325+
pip install -e ".[all,dev]"
326326
327327
- name: Authenticate to GCP (Workload Identity Federation)
328328
uses: google-github-actions/auth@v2

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ cd cleancloud
5353
python -m venv venv
5454
source venv/bin/activate # On Windows: venv\Scripts\activate
5555

56-
# Install dependencies
57-
pip install -e .
58-
pip install -r requirements-dev.txt # If exists
56+
# Install with all cloud SDKs and dev dependencies
57+
pip install -e '.[all,dev]'
5958
```
6059

6160
### 3. Run Tests

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ RUN apk update && apk upgrade && rm -rf /var/cache/apk/* \
88
&& pip install --upgrade pip
99

1010
ARG CLEANCLOUD_VERSION
11+
ARG CLEANCLOUD_EXTRAS=all
1112
RUN if [ -n "${CLEANCLOUD_VERSION}" ]; then \
12-
pip install cleancloud==${CLEANCLOUD_VERSION}; \
13+
pip install "cleancloud[${CLEANCLOUD_EXTRAS}]==${CLEANCLOUD_VERSION}"; \
1314
else \
14-
pip install cleancloud; \
15+
pip install "cleancloud[${CLEANCLOUD_EXTRAS}]"; \
1516
fi
1617

1718
ENTRYPOINT ["cleancloud"]

README.fr.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,16 @@ CleanCloud vous indique exactement ce qu'il faut supprimer dans votre cloud —
2222
## Démarrage rapide
2323

2424
```bash
25+
# Essayez sans credentials :
2526
pipx install cleancloud
26-
cleancloud demo # visualisez des findings — aucun credential requis
27-
cleancloud demo --category ai # findings IA/ML (SageMaker, AML, Vertex AI)
28-
```
29-
30-
Scannez votre cloud :
27+
cleancloud demo
28+
cleancloud demo --category ai
3129

32-
```bash
30+
# Prêt à scanner votre cloud ? Ajoutez votre fournisseur :
31+
pipx install 'cleancloud[aws]' # ou [azure], [gcp], [all]
3332
cleancloud scan --provider aws --all-regions
3433
cleancloud scan --provider azure
3534
cleancloud scan --provider gcp --all-projects
36-
cleancloud scan --provider aws --category ai # détectez les endpoints SageMaker inactifs
3735
```
3836

3937
---
@@ -244,7 +242,7 @@ Entièrement en lecture seule. Sûr pour la production et les environnements ré
244242
## Démarrage
245243

246244
```bash
247-
pipx install cleancloud
245+
pipx install 'cleancloud[all]' # tous les SDK cloud (AWS + Azure + GCP)
248246
cleancloud demo # aucun credential requis
249247
```
250248

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,16 @@ CleanCloud tells you exactly what to delete in your cloud — with cost per reso
2222
## Quick Start
2323

2424
```bash
25+
# Try it — no credentials needed:
2526
pipx install cleancloud
26-
cleancloud demo # see sample findings — no credentials needed
27-
cleancloud demo --category ai # see AI/ML waste findings (SageMaker, AML, Vertex AI)
28-
```
29-
30-
Scan your cloud:
27+
cleancloud demo
28+
cleancloud demo --category ai
3129

32-
```bash
30+
# Ready to scan your cloud? Add your provider:
31+
pipx install 'cleancloud[aws]' # or [azure], [gcp], [all]
3332
cleancloud scan --provider aws --all-regions
3433
cleancloud scan --provider azure
3534
cleancloud scan --provider gcp --all-projects
36-
cleancloud scan --provider aws --category ai # detect idle SageMaker endpoints
3735
```
3836

3937
---
@@ -244,7 +242,7 @@ Fully read-only. Safe for production and regulated environments.
244242
## Get Started
245243

246244
```bash
247-
pipx install cleancloud
245+
pipx install 'cleancloud[all]' # all cloud SDKs (AWS + Azure + GCP)
248246
cleancloud demo # no credentials needed
249247
```
250248

cleancloud/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def _version_info():
4242

4343
if not providers:
4444
lines.append("")
45-
lines.append("Install providers: pipx install cleancloud --force")
45+
lines.append("Install providers: pip install 'cleancloud[aws]' # or [azure], [gcp], [all]")
4646

4747
return "\n".join(lines)
4848

cleancloud/doctor/runner.py

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,42 @@
11
import sys
22
from typing import Optional
33

4-
from cleancloud.doctor.aws import run_aws_ai_doctor, run_aws_doctor
5-
from cleancloud.doctor.azure import run_azure_ai_doctor, run_azure_doctor
64
from cleancloud.doctor.common import DoctorError, info, success
7-
from cleancloud.doctor.gcp import run_gcp_ai_doctor, run_gcp_doctor
5+
6+
try:
7+
from cleancloud.doctor.aws import run_aws_ai_doctor, run_aws_doctor
8+
9+
_AWS_DOCTOR_AVAILABLE = True
10+
except ImportError:
11+
_AWS_DOCTOR_AVAILABLE = False
12+
run_aws_doctor = run_aws_ai_doctor = None # type: ignore[assignment]
13+
14+
try:
15+
from cleancloud.doctor.azure import run_azure_ai_doctor, run_azure_doctor
16+
17+
_AZURE_DOCTOR_AVAILABLE = True
18+
except ImportError:
19+
_AZURE_DOCTOR_AVAILABLE = False
20+
run_azure_doctor = run_azure_ai_doctor = None # type: ignore[assignment]
21+
22+
try:
23+
from cleancloud.doctor.gcp import run_gcp_ai_doctor, run_gcp_doctor
24+
25+
_GCP_DOCTOR_AVAILABLE = True
26+
except ImportError:
27+
_GCP_DOCTOR_AVAILABLE = False
28+
run_gcp_doctor = run_gcp_ai_doctor = None # type: ignore[assignment]
29+
30+
_DOCTOR_AVAILABLE = {
31+
"aws": lambda: _AWS_DOCTOR_AVAILABLE,
32+
"azure": lambda: _AZURE_DOCTOR_AVAILABLE,
33+
"gcp": lambda: _GCP_DOCTOR_AVAILABLE,
34+
}
35+
_INSTALL_HINTS = {
36+
"aws": "pip install 'cleancloud[aws]'",
37+
"azure": "pip install 'cleancloud[azure]'",
38+
"gcp": "pip install 'cleancloud[gcp]'",
39+
}
840

941

1042
def run_doctor(
@@ -46,6 +78,14 @@ def run_doctor(
4678

4779
# Run checks for each provider
4880
for p in providers_to_check:
81+
if not _DOCTOR_AVAILABLE.get(p, lambda: True)():
82+
hint = _INSTALL_HINTS.get(p, "pip install 'cleancloud[all]'")
83+
info(f"Provider '{p}' SDK is not installed. Install it with: {hint}")
84+
results[p] = {"status": "failed", "error": f"SDK not installed — {hint}"}
85+
if len(providers_to_check) == 1:
86+
sys.exit(1)
87+
continue
88+
4989
try:
5090
if p == "aws":
5191
if category == "ai":

0 commit comments

Comments
 (0)