# plantmeter
[](https://github.com/Som-Energia/plantmeter/actions/workflows/main.yml)
[](https://coveralls.io/github/Som-Energia/plantmeter?branch=master)
[](https://pypi.org/project/plantmeter)
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
```bash
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
Raw data
{
"_id": null,
"home_page": "https://github.com/Som-Energia/plantmeter",
"name": "plantmeter",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Som Energia SCCL",
"author_email": "info@somenergia.coop",
"download_url": "https://files.pythonhosted.org/packages/22/2a/553d0250ca362690a4a91e5ece60285f57fef0c0cb547a585dc03f98fc1c/plantmeter-1.7.11.tar.gz",
"platform": null,
"description": "# plantmeter \n[](https://github.com/Som-Energia/plantmeter/actions/workflows/main.yml)\n[](https://coveralls.io/github/Som-Energia/plantmeter?branch=master)\n[](https://pypi.org/project/plantmeter)\n\nOpenERP module and library to manage multisite energy generation\n\n## To be extinguished package\n\nMost of the content of this packages is in progress of being\nmoved to somenergia-generationkwh o generic packages like\nsomenergia-utils.\n\nFurther development should consider continuing this transition.\n\n## Install and test\n\n```bash\npip install -e .\npytest plantmeter # Run unit tests\npytest som_plantmeter/tests # Run erp tests (require a working local erp)\n```\n\nSome erp tests clean up collections on the mongo database the erp points to,\nwhich could be a disaster if your dbconfig is pointing to a production setup.\nSo, those tests are disabled by default.\nIn order to enable clean room test in erp tests:\n\n- Ensure your dbconfig.py configuration is pointing to a testing database\n- Run `enable_destructive_tests.py` from somenergia-utils\n- This enables an erp config flag, that makes destrutive testing not to be skipped.\n- If, later, you accidentally change dbconfig to point a production setup, and run those tests they won't actually be run\n\n## Code Map\n\nRefer to somenergia-generationkwh documentation on tips on how\nthe code is structured.\n\n## How to release\n\n- Update the version in README changelogs\n- Update the version in setup.py\n- Commit \"Bump to plantmeter-M.m.p\"\n- git tag plantmeter-M.m.p\n- git push && git push --tags\n- The later push will generate the source package in pypi for the non-erp module\n\n\n## CHANGES\n\n### plantmeter 1.7.5 2023-01-18\n\n- Add filter capabilities to MongoTimeCurve.get()\n\n### plantmeter 1.7.4 2022-01-08\n\n_\"Keeping up with Python 2.7\" Release_\n\n- Github actions for CI\n- Moved isodates to somutils\n- Python 2.7 compatibility: added conditional dependencies\n\n### plantmeter 1.7.3 2019-07-29\n\n_Py3 portability back_\n\n- MTC: mongo's bjson do not accept numpy types as attributes,\n so we are taking the native item when updating with numpy arrays.\n\n### plantmeter 1.7.2 2019-07-18\n\n_Not importing anymore release_\n\n- Removing logic for importing metering since now is done by Gisce:\n - Removed `Meter.last_commit` related to the meter importing logic\n - Removed `GenerationkwhProductionNotifier` and related helpers\n - `update_kwh` methods removed\n - Removed all (metering) providers\n - Removed `GenerationkwhProductionAggregator.getNShares()`\n- `genkwh_production` script renamed as `genkwh_plants`\n- `genkwh_production curve` extracted as `genkwh_mtc`\n- `genkwh_mtc`: collections alias renamed:\n - `gisce` -> `production`\n - `production` -> `production_old`\n- `genkwh_mtc`: New collection `rightscorrection`\n- Plants have `first/last_active_date`\n- Meters have `first/last_active_date`\n- New `Aggregator.firstActiveDate()` returning the min of the plant's `first_active_date`\n- Functional tests moved to `som_plantmeter/tests`\n- FIX: Fontivsolar meter number was wrong\n- New migration script to perform the former fix and rewrite the rights\n\n\n### plantmeter 1.7.1 2019-04-04\n\n- Removed deprecated scripts `genkwh_pull_status` and `genkwh_export`\n- Removed deprecated `genkwh_production` subcommands: pull-status, load-meassures and update-kwh\n- Script `genkwh_production.py` installed by setup.py\n\n### plantmeter 1.7.0 2019-04-02\n\n- Meters and plants have `first_active_date` attribute\n- Built plant shares is not a constant curve anymore, changes when adding new plants\n- Meter `first_active_date` filters out earlier meassures\n- Fix: lastMesurement in a mix/plant is the first one of lastMeasurement of the childs\n- `genkwh_migrate_1_6_3_newplant.sh`: Script to migrate old plant and incorporate the new one\n- In general, fixes to really enable multiple plants\n- `genkwh_production.py`: editmix, editplant, editmeter\n- `genkwh_production.py`: editmix, editplant, editmeter\n- `genkwh_production.py`: delmix, delplant, delmeter\n- `genkwh_production.py`: meterset -> editmeter\n\n\n### plantmeter 1.6.2 2019-01-21\n\n- Deprecated `genkwh_pull_status.py` and `genkwh_pull_status.sh`\n- `genkwh_production.py`: added `pull_status` as subcommand\n- `genkwh_production.py pull_status`: nicer output and exit status\n- `genkwh_migration_ftp_to_tmprofile.py` migration script\n\n### plantmeter 1.6.1 2019-01-03\n\n- Show erp configuration at the begining of every command\n- Protect `genkwh_production.py clear` againts lossy fingers\n\n### plantmeter 1.6.0 2019-01-03\n\n- Python 3 supported (python module, not yet the erp code)\n- Migrated to pymongo 3\n- MongoTimeCurve takes some field names as parameters (_timestamp_ and _creation_)\n- Abstracted ResourceParent from ProductionPlant and ProductionAggregator\n- `genkwh_production.py list`: list all the resorce hierarchy (mixes, plants, meters)\n- `genkwh_production.py addmix`: to add an aggregator, now 'mix'\n- `genkwh_production.py addplant`: to add a plant\n- `genkwh_production.py addmeter`: to add a meter\n- `genkwh_production.py curve`: to extract stored curves as TSV (production, rights...)\n- `genkwh_production.py` commmand documentation\n\n\n\n\n\n\n",
"bugtrack_url": null,
"license": "GNU General Public License v3 or later (GPLv3+)",
"summary": "OpenERP module and library to manage multisite energy generation",
"version": "1.7.11",
"project_urls": {
"Homepage": "https://github.com/Som-Energia/plantmeter"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2a22c12c4f418b9952d4cc2e6b1bd36045c314c3218320fa2bf648a94e044ddb",
"md5": "509f8b710be3bf031231a0f5a9343834",
"sha256": "edc49a37c1911255f263db3bec0a79489328abbb42e5e399eb6edb0b8758c7b2"
},
"downloads": -1,
"filename": "plantmeter-1.7.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "509f8b710be3bf031231a0f5a9343834",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 30279,
"upload_time": "2024-03-04T17:23:56",
"upload_time_iso_8601": "2024-03-04T17:23:56.323924Z",
"url": "https://files.pythonhosted.org/packages/2a/22/c12c4f418b9952d4cc2e6b1bd36045c314c3218320fa2bf648a94e044ddb/plantmeter-1.7.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "222a553d0250ca362690a4a91e5ece60285f57fef0c0cb547a585dc03f98fc1c",
"md5": "836a93e65d78c06089ffa24761dc831d",
"sha256": "dce86cb14c24ff2c55d96e33dac54591e0445a1e8c66bd4fd106c3dc0fe9376e"
},
"downloads": -1,
"filename": "plantmeter-1.7.11.tar.gz",
"has_sig": false,
"md5_digest": "836a93e65d78c06089ffa24761dc831d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 30376,
"upload_time": "2024-03-04T17:23:59",
"upload_time_iso_8601": "2024-03-04T17:23:59.436455Z",
"url": "https://files.pythonhosted.org/packages/22/2a/553d0250ca362690a4a91e5ece60285f57fef0c0cb547a585dc03f98fc1c/plantmeter-1.7.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-04 17:23:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Som-Energia",
"github_project": "plantmeter",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "plantmeter"
}