Patrick Schurig a23161b3b6 feat(spot): le fournisseur aWATTar sort du build livré (brief 3, T0)
Le fournisseur spot aWATTar était le seul flux sortant du moteur (invariant 10).
Il n'est plus compilé que sous `qmake CONFIG+=etm_spotmarket` ; la source reste
dans l'arbre pour la synchronisation amont.

Sans l'option (build livré) :
- `spotmarketdataproviderawattar.*` hors de SOURCES/HEADERS, enregistrement
  sous `#ifdef ETM_SPOTMARKET` ;
- aucun `QNetworkAccessManager` : le plugin et l'expérience de simulation
  passent par le même point, `SpotMarketBuild::creer()` ;
- `SetSpotMarketConfiguration` refuse l'activation avec
  `EnergyErrorInvalidParameter` + `fault: SPOT_MARKET_NOT_IN_BUILD` (code,
  pas de phrase). Désactiver reste accepté ;
- `planSpotMarketCharging()` est inerte : `enabled()` ne peut plus devenir vrai.

Tests :
- simulation `testSpotMarketIsOutOfTheBuild` ; contre-épreuve faite (un
  QNetworkAccessManager réintroduit fait échouer le test) ;
- spotmarket `shippedBuildHasNoProvider`, sur le .so réel ; les 4 tests qui
  lisent la liste aWATTar sont sautés hors option et passent avec l'option ;
- `testDecisionReasonRendering` : ligne de rendu du nouveau code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 12:48:27 +02:00

82 lines
3.1 KiB
Plaintext

# Rend les headers du répertoire energyplugin/ accessibles aux consommateurs
# (simulation, tests) qui incluent ce .pri depuis un autre répertoire.
INCLUDEPATH += $$PWD
# [ETM] Activate ETM arbitrator — replaces SmartChargingManager::update() with EnergyArbitrator.
# Propagé à tous les consommateurs du .pri (plugin + simulation + tests).
# Uncommenter pour activer. Commité DÉSACTIVÉ jusqu'à preuve iso (3b-iv).
DEFINES += ETM_ARBITRATOR
# [ETM] Fournisseur spot aWATTar — HORS DU BUILD LIVRÉ (invariant 10 : aucun flux sortant).
# C'était le seul appel réseau du moteur : une requête HTTPS vers api.awattar.{at,de}. La
# source reste dans l'arbre pour la synchronisation amont ; elle n'est compilée qu'avec
# `qmake CONFIG+=etm_spotmarket`. Sans l'option : aucun fournisseur enregistré, aucun
# QNetworkAccessManager construit, et l'activation par RPC est refusée avec un code
# (SPOT_MARKET_NOT_IN_BUILD). Le gestionnaire et ses fonctions de calcul restent compilés :
# SmartChargingManager (amont) en dépend, et les suites de test y injectent un fournisseur mock.
etm_spotmarket {
message("Fournisseur spot aWATTar COMPILÉ (CONFIG+=etm_spotmarket) — flux sortant actif")
DEFINES += ETM_SPOTMARKET
HEADERS += $$PWD/spotmarket/spotmarketdataproviderawattar.h
SOURCES += $$PWD/spotmarket/spotmarketdataproviderawattar.cpp
}
greaterThan(QT_MAJOR_VERSION, 5) {
message("Building using Qt6 support")
CONFIG *= c++17
QMAKE_LFLAGS *= -std=c++17
QMAKE_CXXFLAGS *= -std=c++17
} else {
message("Building using Qt5 support")
CONFIG *= c++11
QMAKE_LFLAGS *= -std=c++11
QMAKE_CXXFLAGS *= -std=c++11
DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x050F00
}
coverage {
message(Building with code coverage enabled)
# --coverage option contains: -fprofile-arcs -ftest-coverage -lgcov
QMAKE_CXXFLAGS *= --coverage
QMAKE_LDFLAGS *= --coverage
LIBS += -lgcov
}
HEADERS += \
$$PWD/energymanagerconfiguration.h \
$$PWD/energysettings.h \
$$PWD/evcharger.h \
$$PWD/nymeaenergyjsonhandler.h \
$$PWD/rootmeter.h \
$$PWD/smartchargingmanager.h \
$$PWD/etm/forecast/forecaststore.h \
$$PWD/spotmarket/spotmarketdataprovider.h \
$$PWD/spotmarket/spotmarketmanager.h \
$$PWD/types/chargingaction.h \
$$PWD/types/charginginfo.h \
$$PWD/types/chargingprocessinfo.h \
$$PWD/types/chargingschedule.h \
$$PWD/types/scoreentry.h \
$$PWD/types/smartchargingstate.h \
$$PWD/types/timeframe.h \
include($$PWD/etm/etm.pri)
SOURCES += \
$$PWD/energymanagerconfiguration.cpp \
$$PWD/energysettings.cpp \
$$PWD/evcharger.cpp \
$$PWD/nymeaenergyjsonhandler.cpp \
$$PWD/rootmeter.cpp \
$$PWD/smartchargingmanager.cpp \
$$PWD/etm/forecast/forecaststore.cpp \
$$PWD/spotmarket/spotmarketdataprovider.cpp \
$$PWD/spotmarket/spotmarketmanager.cpp \
$$PWD/types/chargingaction.cpp \
$$PWD/types/charginginfo.cpp \
$$PWD/types/chargingprocessinfo.cpp \
$$PWD/types/chargingschedule.cpp \
$$PWD/types/scoreentry.cpp \
$$PWD/types/smartchargingstate.cpp \
$$PWD/types/timeframe.cpp \