Package: plantmeter
plantmeterOpenERP module and library to manage multisite energy generationTo be extinguished packageMost of the content of this packages is in progress of being
moved to somenergia-generationkwh o generic packages like
somenergia-utils.Further development should consider continuing this transition.Install and testpipinstall-e.
pytestplantmeter# Run unit testspytestsom_plantmeter/tests# Run erp tests (require a working local erp)Some erp tests clean up collections on the mongo database the erp points to,
which could be a disaster if your dbconfig is pointing to a production setup.
So, those tests are disabled by default.
In order to enable clean room test in erp tests:Ensure your dbconfig.py configuration is pointing to a testing databaseRunenable_destructive_tests.pyfrom somenergia-utilsThis enables an erp config flag, that makes destrutive testing not to be skipped.If, later, you accidentally change dbconfig to point a production setup, and run those tests they won't actually be runCode MapRefer to somenergia-generationkwh documentation on tips on how
the code is structured.How to releaseUpdate the version in README changelogsUpdate the version in setup.pyCommit "Bump to plantmeter-M.m.p"git tag plantmeter-M.m.pgit push && git push --tagsThe later push will generate the source package in pypi for the non-erp moduleCHANGESplantmeter 1.7.5 2023-01-18Add filter capabilities to MongoTimeCurve.get()plantmeter 1.7.4 2022-01-08"Keeping up with Python 2.7" ReleaseGithub actions for CIMoved isodates to somutilsPython 2.7 compatibility: added conditional dependenciesplantmeter 1.7.3 2019-07-29Py3 portability backMTC: mongo's bjson do not accept numpy types as attributes,
so we are taking the native item when updating with numpy arrays.plantmeter 1.7.2 2019-07-18Not importing anymore releaseRemoving logic for importing metering since now is done by Gisce:RemovedMeter.last_commitrelated to the meter importing logicRemovedGenerationkwhProductionNotifierand related helpersupdate_kwhmethods removedRemoved all (metering) providersRemovedGenerationkwhProductionAggregator.getNShares()genkwh_productionscript renamed asgenkwh_plantsgenkwh_production curveextracted asgenkwh_mtcgenkwh_mtc: collections alias renamed:gisce->productionproduction->production_oldgenkwh_mtc: New collectionrightscorrectionPlants havefirst/last_active_dateMeters havefirst/last_active_dateNewAggregator.firstActiveDate()returning the min of the plant'sfirst_active_dateFunctional tests moved tosom_plantmeter/testsFIX: Fontivsolar meter number was wrongNew migration script to perform the former fix and rewrite the rightsplantmeter 1.7.1 2019-04-04Removed deprecated scriptsgenkwh_pull_statusandgenkwh_exportRemoved deprecatedgenkwh_productionsubcommands: pull-status, load-meassures and update-kwhScriptgenkwh_production.pyinstalled by setup.pyplantmeter 1.7.0 2019-04-02Meters and plants havefirst_active_dateattributeBuilt plant shares is not a constant curve anymore, changes when adding new plantsMeterfirst_active_datefilters out earlier meassuresFix: lastMesurement in a mix/plant is the first one of lastMeasurement of the childsgenkwh_migrate_1_6_3_newplant.sh: Script to migrate old plant and incorporate the new oneIn general, fixes to really enable multiple plantsgenkwh_production.py: editmix, editplant, editmetergenkwh_production.py: editmix, editplant, editmetergenkwh_production.py: delmix, delplant, delmetergenkwh_production.py: meterset -> editmeterplantmeter 1.6.2 2019-01-21Deprecatedgenkwh_pull_status.pyandgenkwh_pull_status.shgenkwh_production.py: addedpull_statusas subcommandgenkwh_production.py pull_status: nicer output and exit statusgenkwh_migration_ftp_to_tmprofile.pymigration scriptplantmeter 1.6.1 2019-01-03Show erp configuration at the begining of every commandProtectgenkwh_production.py clearagaints lossy fingersplantmeter 1.6.0 2019-01-03Python 3 supported (python module, not yet the erp code)Migrated to pymongo 3MongoTimeCurve takes some field names as parameters (timestampandcreation)Abstracted ResourceParent from ProductionPlant and ProductionAggregatorgenkwh_production.py list: list all the resorce hierarchy (mixes, plants, meters)genkwh_production.py addmix: to add an aggregator, now 'mix'genkwh_production.py addplant: to add a plantgenkwh_production.py addmeter: to add a metergenkwh_production.py curve: to extract stored curves as TSV (production, rights...)genkwh_production.pycommmand documentation