pvtool


Namepvtool JSON
Version 0.0.6 PyPI version JSON
download
home_page
SummaryThis tool contains validation logic for the BO4E migration data model (ibims). It uses the pvframework.
upload_time2023-11-14 13:18:59
maintainer
docs_urlNone
author
requires_python>=3.11
licenseMIT
keywords bo4e migration python validation
VCS
bugtrack_url
requirements annotated-types attrs bidict bo4e bomf dnspython email-validator frozendict ibims idna injector iso3166 more-itertools networkx pvframework pycountry pydantic pydantic-core pyhumps python-dateutil python-generics pytz schwifty six typeguard typing-extensions
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pedantic Validator Tool

![Unittests status badge](https://github.com/Hochfrequenz/pedantic-validator-tool/workflows/Unittests/badge.svg)
![Coverage status badge](https://github.com/Hochfrequenz/pedantic-validator-tool/workflows/Coverage/badge.svg)
![Linting status badge](https://github.com/Hochfrequenz/pedantic-validator-tool/workflows/Linting/badge.svg)
![Black status badge](https://github.com/Hochfrequenz/pedantic-validator-tool/workflows/Formatting/badge.svg)
![PyPI](https://img.shields.io/pypi/v/pvtool)

This package contains the validation logic to validate the data of the BO4E migration model
[ibims](https://github.com/Hochfrequenz/intermediate-bo4e-migration-models).
It uses the [pedantic-validator-framework](https://github.com/Hochfrequenz/pedantic-validator-framework) to
create `ValidationManager`s for each data set in
[ibims](https://github.com/Hochfrequenz/intermediate-bo4e-migration-models).
(Currently supported are only `Customer`, `Network` and `Resource`.)

This package is designed to be used together with [bomf](https://github.com/Hochfrequenz/bo4e_migration_framework).
Although, it only uses the `MigrationConfig` to use the `migration_key_date` which is necessary for some validations.

## Usage
Install it [from pypi](https://pypi.org/project/pvtool/):
```bash
pip install pvtool
```

To use the validation logic you just need to bind the preconfigured modules of this package to
`ValidationManager` of your `Injector`. Alternatively, you could execute the provider-method of the
module on your own by supplying a `MigrationConfig` instance.

```python
from injector import Injector
from pvtool import ValidationManagerProviderCustomer
from pvframework import ValidationManager
from bomf.config import MigrationConfig
from datetime import datetime, UTC

customer_injector = Injector([
    ValidationManagerProviderCustomer,
    lambda binder: binder.bind(MigrationConfig, MigrationConfig(migration_key_date=datetime(2021, 1, 1, tzinfo=UTC))),
])

customer_validation_manager = customer_injector.get(ValidationManager)
```

## How to use this Repository on Your Machine

Follow the instructions in our [Python template repository](https://github.com/Hochfrequenz/python_template_repository#how-to-use-this-repository-on-your-machine).

## Contribute

You are very welcome to contribute to this repository by opening a pull request against the main branch.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pvtool",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "bo4e,migration,python,validation",
    "author": "",
    "author_email": "Hochfrequenz Unternehmensberatung GmbH <info@hochfrequenz.de>",
    "download_url": "https://files.pythonhosted.org/packages/d7/43/5e0cd44c1f62b186258ffeb4113f77f3631d68862781184d2f9eb9c5d3f9/pvtool-0.0.6.tar.gz",
    "platform": null,
    "description": "# Pedantic Validator Tool\n\n![Unittests status badge](https://github.com/Hochfrequenz/pedantic-validator-tool/workflows/Unittests/badge.svg)\n![Coverage status badge](https://github.com/Hochfrequenz/pedantic-validator-tool/workflows/Coverage/badge.svg)\n![Linting status badge](https://github.com/Hochfrequenz/pedantic-validator-tool/workflows/Linting/badge.svg)\n![Black status badge](https://github.com/Hochfrequenz/pedantic-validator-tool/workflows/Formatting/badge.svg)\n![PyPI](https://img.shields.io/pypi/v/pvtool)\n\nThis package contains the validation logic to validate the data of the BO4E migration model\n[ibims](https://github.com/Hochfrequenz/intermediate-bo4e-migration-models).\nIt uses the [pedantic-validator-framework](https://github.com/Hochfrequenz/pedantic-validator-framework) to\ncreate `ValidationManager`s for each data set in\n[ibims](https://github.com/Hochfrequenz/intermediate-bo4e-migration-models).\n(Currently supported are only `Customer`, `Network` and `Resource`.)\n\nThis package is designed to be used together with [bomf](https://github.com/Hochfrequenz/bo4e_migration_framework).\nAlthough, it only uses the `MigrationConfig` to use the `migration_key_date` which is necessary for some validations.\n\n## Usage\nInstall it [from pypi](https://pypi.org/project/pvtool/):\n```bash\npip install pvtool\n```\n\nTo use the validation logic you just need to bind the preconfigured modules of this package to\n`ValidationManager` of your `Injector`. Alternatively, you could execute the provider-method of the\nmodule on your own by supplying a `MigrationConfig` instance.\n\n```python\nfrom injector import Injector\nfrom pvtool import ValidationManagerProviderCustomer\nfrom pvframework import ValidationManager\nfrom bomf.config import MigrationConfig\nfrom datetime import datetime, UTC\n\ncustomer_injector = Injector([\n    ValidationManagerProviderCustomer,\n    lambda binder: binder.bind(MigrationConfig, MigrationConfig(migration_key_date=datetime(2021, 1, 1, tzinfo=UTC))),\n])\n\ncustomer_validation_manager = customer_injector.get(ValidationManager)\n```\n\n## How to use this Repository on Your Machine\n\nFollow the instructions in our [Python template repository](https://github.com/Hochfrequenz/python_template_repository#how-to-use-this-repository-on-your-machine).\n\n## Contribute\n\nYou are very welcome to contribute to this repository by opening a pull request against the main branch.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This tool contains validation logic for the BO4E migration data model (ibims). It uses the pvframework.",
    "version": "0.0.6",
    "project_urls": {
        "Changelog": "https://github.com/Hochfrequenz/pedantic-validator-tool/releases",
        "Homepage": "https://github.com/Hochfrequenz/pedantic-validator-tool"
    },
    "split_keywords": [
        "bo4e",
        "migration",
        "python",
        "validation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "51ebd540a76e75c3486464b2b573d8bcabce1378088b48c8ee404289c8715252",
                "md5": "205eecae61e4fc676b1ecb771477aa34",
                "sha256": "a563903ec19d17e2a6510476863bb0fe8a719f54e2a87b663ca4f6b4a812ade5"
            },
            "downloads": -1,
            "filename": "pvtool-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "205eecae61e4fc676b1ecb771477aa34",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 13800,
            "upload_time": "2023-11-14T13:18:58",
            "upload_time_iso_8601": "2023-11-14T13:18:58.416520Z",
            "url": "https://files.pythonhosted.org/packages/51/eb/d540a76e75c3486464b2b573d8bcabce1378088b48c8ee404289c8715252/pvtool-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d7435e0cd44c1f62b186258ffeb4113f77f3631d68862781184d2f9eb9c5d3f9",
                "md5": "a10a41a534cc44101b3a507a75fdc907",
                "sha256": "62e15ba5db938e195b10856bc537102b9c8e6b152729fb329ef5fa750d9644a9"
            },
            "downloads": -1,
            "filename": "pvtool-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "a10a41a534cc44101b3a507a75fdc907",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 17843,
            "upload_time": "2023-11-14T13:18:59",
            "upload_time_iso_8601": "2023-11-14T13:18:59.813192Z",
            "url": "https://files.pythonhosted.org/packages/d7/43/5e0cd44c1f62b186258ffeb4113f77f3631d68862781184d2f9eb9c5d3f9/pvtool-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-14 13:18:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Hochfrequenz",
    "github_project": "pedantic-validator-tool",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "annotated-types",
            "specs": [
                [
                    "==",
                    "0.5.0"
                ]
            ]
        },
        {
            "name": "attrs",
            "specs": [
                [
                    "==",
                    "23.1.0"
                ]
            ]
        },
        {
            "name": "bidict",
            "specs": [
                [
                    "==",
                    "0.22.1"
                ]
            ]
        },
        {
            "name": "bo4e",
            "specs": [
                [
                    "==",
                    "0.5.6"
                ]
            ]
        },
        {
            "name": "bomf",
            "specs": [
                [
                    "==",
                    "0.8.1"
                ]
            ]
        },
        {
            "name": "dnspython",
            "specs": [
                [
                    "==",
                    "2.4.2"
                ]
            ]
        },
        {
            "name": "email-validator",
            "specs": [
                [
                    "==",
                    "2.0.0.post2"
                ]
            ]
        },
        {
            "name": "frozendict",
            "specs": [
                [
                    "==",
                    "2.3.8"
                ]
            ]
        },
        {
            "name": "ibims",
            "specs": [
                [
                    "==",
                    "0.1.6"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.4"
                ]
            ]
        },
        {
            "name": "injector",
            "specs": [
                [
                    "==",
                    "0.21.0"
                ]
            ]
        },
        {
            "name": "iso3166",
            "specs": [
                [
                    "==",
                    "2.1.1"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "10.1.0"
                ]
            ]
        },
        {
            "name": "networkx",
            "specs": [
                [
                    "==",
                    "3.1"
                ]
            ]
        },
        {
            "name": "pvframework",
            "specs": [
                [
                    "==",
                    "0.0.5"
                ]
            ]
        },
        {
            "name": "pycountry",
            "specs": [
                [
                    "==",
                    "22.3.5"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.5.0"
                ]
            ]
        },
        {
            "name": "pydantic-core",
            "specs": [
                [
                    "==",
                    "2.14.1"
                ]
            ]
        },
        {
            "name": "pyhumps",
            "specs": [
                [
                    "==",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.8.2"
                ]
            ]
        },
        {
            "name": "python-generics",
            "specs": [
                [
                    "==",
                    "0.0.2"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2023.3.post1"
                ]
            ]
        },
        {
            "name": "schwifty",
            "specs": [
                [
                    "==",
                    "2023.10.0"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "typeguard",
            "specs": [
                [
                    "==",
                    "4.1.5"
                ]
            ]
        },
        {
            "name": "typing-extensions",
            "specs": [
                [
                    "==",
                    "4.8.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "pvtool"
}
        
Elapsed time: 0.16018s