pvtool


Namepvtool JSON
Version 0.3.3 PyPI version JSON
download
home_pageNone
SummaryThis tool contains validation logic for the BO4E migration data model (ibims). It uses the pvframework.
upload_time2024-09-26 07:37:22
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords bo4e migration python validation
VCS
bugtrack_url
requirements annotated-types bidict bomf dnspython email-validator frozendict ibims idna injector more-itertools networkx pvframework pycountry pydantic pydantic-core python-dateutil python-generics pytz rstr 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": null,
    "name": "pvtool",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "bo4e, migration, python, validation",
    "author": null,
    "author_email": "Hochfrequenz Unternehmensberatung GmbH <info@hochfrequenz.de>",
    "download_url": "https://files.pythonhosted.org/packages/de/c5/096863259e725912e3a198da7a5efd70ca79b91d08d7367cd42dac735b07/pvtool-0.3.3.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.3.3",
    "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": "3320a562fb7428cd79189fc45471cdb99bd92186bb75f8c251692dc1af56d814",
                "md5": "890343f82097278b33c5ca7ccba7d541",
                "sha256": "a8a9fe705e893fd870b9632cbcec967d246097a3e6e58bcbef5492b6559ec684"
            },
            "downloads": -1,
            "filename": "pvtool-0.3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "890343f82097278b33c5ca7ccba7d541",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 14133,
            "upload_time": "2024-09-26T07:37:20",
            "upload_time_iso_8601": "2024-09-26T07:37:20.790057Z",
            "url": "https://files.pythonhosted.org/packages/33/20/a562fb7428cd79189fc45471cdb99bd92186bb75f8c251692dc1af56d814/pvtool-0.3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dec5096863259e725912e3a198da7a5efd70ca79b91d08d7367cd42dac735b07",
                "md5": "65f69957f9001e9e41bcde2b495048a2",
                "sha256": "5c14ab31c6ee48993d84fb0d8855a344c915bf9310fef9cf93f7c9f2726fcdea"
            },
            "downloads": -1,
            "filename": "pvtool-0.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "65f69957f9001e9e41bcde2b495048a2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 17248,
            "upload_time": "2024-09-26T07:37:22",
            "upload_time_iso_8601": "2024-09-26T07:37:22.003639Z",
            "url": "https://files.pythonhosted.org/packages/de/c5/096863259e725912e3a198da7a5efd70ca79b91d08d7367cd42dac735b07/pvtool-0.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-26 07:37:22",
    "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.7.0"
                ]
            ]
        },
        {
            "name": "bidict",
            "specs": [
                [
                    "==",
                    "0.22.1"
                ]
            ]
        },
        {
            "name": "bomf",
            "specs": [
                [
                    "==",
                    "0.11.0"
                ]
            ]
        },
        {
            "name": "dnspython",
            "specs": [
                [
                    "==",
                    "2.4.2"
                ]
            ]
        },
        {
            "name": "email-validator",
            "specs": [
                [
                    "==",
                    "2.0.0.post2"
                ]
            ]
        },
        {
            "name": "frozendict",
            "specs": [
                [
                    "==",
                    "2.3.8"
                ]
            ]
        },
        {
            "name": "ibims",
            "specs": [
                [
                    "==",
                    "0.3.6"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.4"
                ]
            ]
        },
        {
            "name": "injector",
            "specs": [
                [
                    "==",
                    "0.21.0"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "10.5.0"
                ]
            ]
        },
        {
            "name": "networkx",
            "specs": [
                [
                    "==",
                    "3.1"
                ]
            ]
        },
        {
            "name": "pvframework",
            "specs": [
                [
                    "==",
                    "0.0.8"
                ]
            ]
        },
        {
            "name": "pycountry",
            "specs": [
                [
                    "==",
                    "22.3.5"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.9.2"
                ]
            ]
        },
        {
            "name": "pydantic-core",
            "specs": [
                [
                    "==",
                    "2.23.4"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.9.0.post0"
                ]
            ]
        },
        {
            "name": "python-generics",
            "specs": [
                [
                    "==",
                    "0.0.2"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2024.2"
                ]
            ]
        },
        {
            "name": "rstr",
            "specs": [
                [
                    "==",
                    "3.2.2"
                ]
            ]
        },
        {
            "name": "schwifty",
            "specs": [
                [
                    "==",
                    "2024.9.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.79363s