Skip to main content

OpenERP module and library to manage multisite energy generation

Project description

plantmeter

CI Coverage Status PyPI - Downloads

OpenERP module and library to manage multisite energy generation

To be extinguished package

Most 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 test

pip install -e .
pytest plantmeter # Run unit tests
pytest som_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 database
  • Run enable_destructive_tests.py from somenergia-utils
  • This 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 run

Code Map

Refer to somenergia-generationkwh documentation on tips on how the code is structured.

How to release

  • Update the version in README changelogs
  • Update the version in setup.py
  • Commit "Bump to plantmeter-M.m.p"
  • git tag plantmeter-M.m.p
  • git push && git push --tags
  • The later push will generate the source package in pypi for the non-erp module

CHANGES

plantmeter 1.7.5 2023-01-18

  • Add filter capabilities to MongoTimeCurve.get()

plantmeter 1.7.4 2022-01-08

"Keeping up with Python 2.7" Release

  • Github actions for CI
  • Moved isodates to somutils
  • Python 2.7 compatibility: added conditional dependencies

plantmeter 1.7.3 2019-07-29

Py3 portability back

  • MTC: 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-18

Not importing anymore release

  • Removing logic for importing metering since now is done by Gisce:
    • Removed Meter.last_commit related to the meter importing logic
    • Removed GenerationkwhProductionNotifier and related helpers
    • update_kwh methods removed
    • Removed all (metering) providers
    • Removed GenerationkwhProductionAggregator.getNShares()
  • genkwh_production script renamed as genkwh_plants
  • genkwh_production curve extracted as genkwh_mtc
  • genkwh_mtc: collections alias renamed:
    • gisce -> production
    • production -> production_old
  • genkwh_mtc: New collection rightscorrection
  • Plants have first/last_active_date
  • Meters have first/last_active_date
  • New Aggregator.firstActiveDate() returning the min of the plant's first_active_date
  • Functional tests moved to som_plantmeter/tests
  • FIX: Fontivsolar meter number was wrong
  • New migration script to perform the former fix and rewrite the rights

plantmeter 1.7.1 2019-04-04

  • Removed deprecated scripts genkwh_pull_status and genkwh_export
  • Removed deprecated genkwh_production subcommands: pull-status, load-meassures and update-kwh
  • Script genkwh_production.py installed by setup.py

plantmeter 1.7.0 2019-04-02

  • Meters and plants have first_active_date attribute
  • Built plant shares is not a constant curve anymore, changes when adding new plants
  • Meter first_active_date filters out earlier meassures
  • Fix: lastMesurement in a mix/plant is the first one of lastMeasurement of the childs
  • genkwh_migrate_1_6_3_newplant.sh: Script to migrate old plant and incorporate the new one
  • In general, fixes to really enable multiple plants
  • genkwh_production.py: editmix, editplant, editmeter
  • genkwh_production.py: editmix, editplant, editmeter
  • genkwh_production.py: delmix, delplant, delmeter
  • genkwh_production.py: meterset -> editmeter

plantmeter 1.6.2 2019-01-21

  • Deprecated genkwh_pull_status.py and genkwh_pull_status.sh
  • genkwh_production.py: added pull_status as subcommand
  • genkwh_production.py pull_status: nicer output and exit status
  • genkwh_migration_ftp_to_tmprofile.py migration script

plantmeter 1.6.1 2019-01-03

  • Show erp configuration at the begining of every command
  • Protect genkwh_production.py clear againts lossy fingers

plantmeter 1.6.0 2019-01-03

  • Python 3 supported (python module, not yet the erp code)
  • Migrated to pymongo 3
  • MongoTimeCurve takes some field names as parameters (timestamp and creation)
  • Abstracted ResourceParent from ProductionPlant and ProductionAggregator
  • genkwh_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 plant
  • genkwh_production.py addmeter: to add a meter
  • genkwh_production.py curve: to extract stored curves as TSV (production, rights...)
  • genkwh_production.py commmand documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plantmeter-1.7.10.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plantmeter-1.7.10-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file plantmeter-1.7.10.tar.gz.

File metadata

  • Download URL: plantmeter-1.7.10.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for plantmeter-1.7.10.tar.gz
Algorithm Hash digest
SHA256 48a1e03b775dba139535b59f85999228ee7920479364b92a854e0922a33e12d4
MD5 64140378cc8b3ad1aa61fef1657a7c4e
BLAKE2b-256 aa61c52864af15abd2ba51ef32fc7cd2ebc43e77654794d5379eb8c5b83356fa

See more details on using hashes here.

File details

Details for the file plantmeter-1.7.10-py3-none-any.whl.

File metadata

  • Download URL: plantmeter-1.7.10-py3-none-any.whl
  • Upload date:
  • Size: 30.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for plantmeter-1.7.10-py3-none-any.whl
Algorithm Hash digest
SHA256 e0019ccdc1d11762aacb59eea9c522bac13509a4f477a2c5d241d2c8826c409b
MD5 c5bb5f04b8d415a4bcfd747c3206be95
BLAKE2b-256 868767110329a260ab205129346722152f36900691322c14c6e6a32aae54ed3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page