Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a15374-f59f-7a31-86d2-d23b5d2ed181
55 lines
2.2 KiB
Makefile
55 lines
2.2 KiB
Makefile
.PHONY: test forecast variance control-cycle exchange-forecast exchange-usage optimization portfolio-report settlement capability consumption-mode thresholds
|
|
|
|
test:
|
|
python3 -m unittest discover -s tests -p 'test_*.py'
|
|
python3 tools/validate.py
|
|
|
|
forecast:
|
|
python3 tools/cost_model.py data/demand/platform-audit-storage.json data/providers/object-storage.json
|
|
|
|
variance:
|
|
@test -n "$(ACTUAL)" || { echo 'ACTUAL=data/actuals/YYYY-MM.json is required' >&2; exit 2; }
|
|
python3 tools/variance.py data/forecasts/platform-audit-storage-scaleway-base-2026-08.json $(ACTUAL)
|
|
|
|
control-cycle:
|
|
@test -n "$(FORECAST)" -a -n "$(ACTUAL)" || { echo 'FORECAST=... ACTUAL=... are required' >&2; exit 2; }
|
|
python3 tools/control_cycle.py $(FORECAST) $(ACTUAL)
|
|
|
|
exchange-forecast:
|
|
python3 tools/financial_exchange.py forecast data/forecasts/platform-audit-storage-scaleway-base-2026-08.json
|
|
|
|
exchange-usage:
|
|
@test -n "$(ACTUAL)" || { echo 'ACTUAL=data/actuals/YYYY-MM.json is required' >&2; exit 2; }
|
|
python3 tools/financial_exchange.py usage $(ACTUAL) resource:platform:audit-storage
|
|
|
|
thresholds:
|
|
@test -n "$(PERIOD)" || { echo 'PERIOD=YYYY-MM is required' >&2; exit 2; }
|
|
python3 tools/thresholds.py data/thresholds/platform-audit-storage.json \
|
|
data/actuals/$(PERIOD).json $(PERIOD) \
|
|
data/forecasts/platform-audit-storage-scaleway-base-2026-08.json
|
|
|
|
optimization:
|
|
python3 tools/optimization.py $(CASE)
|
|
|
|
portfolio-report:
|
|
python3 tools/portfolio_report.py .
|
|
|
|
capability:
|
|
python3 tools/capability.py
|
|
|
|
consumption-mode:
|
|
@test -n "$(PERIOD)" || { echo 'PERIOD=YYYY-MM is required' >&2; exit 2; }
|
|
python3 tools/settlement.py consumption-mode --period $(PERIOD) \
|
|
> data/consumption-mode/current.json
|
|
@echo "wrote data/consumption-mode/current.json for $(PERIOD)"
|
|
|
|
settlement:
|
|
@test -n "$(PERIOD)" || { echo 'PERIOD=YYYY-MM is required' >&2; exit 2; }
|
|
python3 tools/settlement.py close --period $(PERIOD)
|
|
|
|
# CUST-WP-0079-T05: staged-source generation; hook uses the isolated recipe.
|
|
.PHONY: generated-work-records generated-work-records-check
|
|
generated-work-records:
|
|
$(MAKE) --no-print-directory -f .generated-work-records.mk generated-work-records
|
|
generated-work-records-check:
|
|
$(MAKE) --no-print-directory -f .generated-work-records.mk generated-work-records-check
|