Skip to content

Commit fcf3704

Browse files
committed
BUGFIX relative paths in scripts/*.py and README
Signed-off-by: Julien Nioche <[email protected]>
1 parent eb85fb5 commit fcf3704

3 files changed

Lines changed: 10 additions & 14 deletions

File tree

boaviztapi/data/utils/scripts/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Reports:
1212
- Spec mismatches (vCPU, memory, storage, GPUs) for instances present in both
1313

1414
```sh
15-
python scripts/compare_aws_instances.py
16-
python scripts/compare_aws_instances.py --region eu-west-1
17-
python scripts/compare_aws_instances.py --output report.csv
15+
python3 compare_aws_instances.py
16+
python3 compare_aws_instances.py --region eu-west-1
17+
python3 compare_aws_instances.py --output report.csv
1818
```
1919

2020
## update_aws_instances.py
@@ -23,16 +23,16 @@ Adds or updates instance entries in `aws.csv` and creates platform entries in `s
2323

2424
```sh
2525
# Add/update all instances in a family
26-
python scripts/update_aws_instances.py c7g
26+
python3 update_aws_instances.py c7g
2727

2828
# Add/update specific instance types
29-
python scripts/update_aws_instances.py c7g.xlarge c7g.2xlarge
29+
python3 update_aws_instances.py c7g.xlarge c7g.2xlarge
3030

3131
# Multiple families at once
32-
python scripts/update_aws_instances.py c7g m7g r7g
32+
python3 update_aws_instances.py c7g m7g r7g
3333

3434
# Preview changes without writing files
35-
python scripts/update_aws_instances.py --dry-run c7g
35+
python3 update_aws_instances.py --dry-run c7g
3636
```
3737

3838
New platform entries in `server.csv` require manual review: the AWS API does not expose the CPU model name, so `CPU.name` must be filled in by hand. `RAM.units` and `RAM.capacity` are estimated and should also be verified.

boaviztapi/data/utils/scripts/compare_aws_instances.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
from pathlib import Path
1919

2020
BOAVIZTA_AWS_CSV = (
21-
Path(__file__).resolve().parent.parent
22-
/ "boaviztapi"
23-
/ "data"
21+
Path(__file__).resolve().parent.parent.parent
2422
/ "archetypes"
2523
/ "cloud"
2624
/ "aws.csv"

boaviztapi/data/utils/scripts/update_aws_instances.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@
3131
import sys
3232
from pathlib import Path
3333

34-
DATA_DIR = Path(__file__).resolve().parent.parent / "boaviztapi" / "data" / "archetypes"
34+
DATA_DIR = Path(__file__).resolve().parent.parent.parent / "archetypes"
3535
AWS_CSV = DATA_DIR / "cloud" / "aws.csv"
3636
SERVER_CSV = DATA_DIR / "server.csv"
3737
CPU_SPECS_CSV = (
38-
Path(__file__).resolve().parent.parent
39-
/ "boaviztapi"
40-
/ "data"
38+
Path(__file__).resolve().parent.parent.parent
4139
/ "crowdsourcing"
4240
/ "cpu_specs.csv"
4341
)

0 commit comments

Comments
 (0)