migmose


Namemigmose JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryTool to generate machine readable files from MIG documents
upload_time2024-05-20 08:31:21
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords automation bdew edi@energy mig
VCS
bugtrack_url
requirements annotated-types attrs click colorama loguru lxml marshmallow maus more-itertools packaging pydantic pydantic-core python-docx typing-extensions win32-setctime
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![migmose-logo](migmose-logo.jpeg)

# MIG_mose

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
![Python Versions (officially) supported](https://img.shields.io/pypi/pyversions/migmose.svg)
![Pypi status badge](https://img.shields.io/pypi/v/migmose)
![Unittests status badge](https://github.com/Hochfrequenz/migmose/workflows/Unittests/badge.svg)
![Coverage status badge](https://github.com/Hochfrequenz/migmose/workflows/Coverage/badge.svg)
![Linting status badge](https://github.com/Hochfrequenz/migmose/workflows/Linting/badge.svg)
![Black status badge](https://github.com/Hochfrequenz/migmose/workflows/Formatting/badge.svg)

MIG_mose generates machine-readable files from MIG documents ([edi-energy](https://www.edi-energy.de/index.php?id=38)).
MIG_mose is the sister of [kohlrahbi](https://github.com/Hochfrequenz/kohlrahbi).

## Tech-Stack
- MIG_mose is a Python(3.11,3.12) project.
- .docx files a processed by the [python-docx](https://python-docx.readthedocs.io/en/latest/) library.
- EdiFact formats are used as in [maus.edifact](https://github.com/Hochfrequenz/mig_ahb_utility_stack/blob/main/src/maus/edifact.py).

This is at the moment a MWE (Minimum Working Example) and will be extended in the future.
See below for an overview of its features.

## Installation
MIG_mose is a Python-based tool.
Therefore, you have to make sure, that Python is running on your machine.

We recommend using virtual environments to keep your system clean.

Create a new virtual environment with
```bash
python -m venv .venv
```

The activation of the virtual environment depends on your used OS.

**Windows**
```
.venv\Scripts\activate
```
**MacOS/Linux**
```
source .venv/bin/activate
```
Finally, install the package with

```bash
pip install migmose
```

## Features And How To Use Them

At this point, MIG_mose works as a command-line interface tool (CLI).
There are several flags available to provide a user-friendly way to interact with MIG_mose.
Below the available options are listed:

- **Input Directory (`-i`, `--input-dir`):**
    - Description: This option allows the user to specify the path to the directory containing the .docx files for the MIGs (Message Implementation Guides).
    - Example: `--input_dir /path/to/input_directory`

- **Message Format (`-mf`, `--message-format`):**
    - Description: This option defines the set of message formats to be parsed. Users can specify multiple message formats by providing multiple values. The formats are EdiFact formats (cf. [maus.edifact.EdifactFormat](https://github.com/Hochfrequenz/mig_ahb_utility_stack/blob/main/src/maus/edifact.py)). If no format is specified, all formats are parsed.
    - Example: `--message_format "UTILMD" --message_format "ORDCHG"`

- **Output Directory (`-o`, `--output-dir`):**
    - Description: This option allows the user to specify the path to the directory which should contain the output files generated by the tool. If the directory does not exist, it will be created automatically.
    - Example: `--output_dir /path/to/output_directory`
- **Output File Type (`-ft`, `--file-type`):**
    - Description: Defines the output format. Choose between csv for flat Nachrichtenstruktur tables and nested_json for json files of the nested Nachrichtenstruktur tables. Default is csv.
    - Example: `--file-type "csv"
### Usage Example

To use the CLI logic provided by this tool, follow the command syntax below:

```bash
migmose -i /path/to/input_directory -o /path/to/output_directory -mf "UTILMD" -mf "ORDCHG" -ft "csv"
```

## Development

### Setup

To set up the development environment, you have to install the dev dependencies.

```bash
tox -e dev
```

### Run all tests and linters

To run the tests, you can use tox.

```bash
tox
```
See our [Python Template Repository](https://github.com/Hochfrequenz/python_template_repository#how-to-use-this-repository-on-your-machine) for detailed explanations.

## Contribute

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

## Related Tools and Context

This repository is part of the [Hochfrequenz Libraries and Tools for a truly digitized market communication](https://github.com/Hochfrequenz/digital_market_communication/).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "migmose",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "automation, bdew, edi@energy, mig",
    "author": null,
    "author_email": "Kevin Krechan <kevin.krechan@hochfrequenz.de>",
    "download_url": "https://files.pythonhosted.org/packages/7e/bf/310df3080cb05ac8f45e2ea9a57086dc8d9afa8d4b68c10497eb2cf46420/migmose-0.1.0.tar.gz",
    "platform": null,
    "description": "![migmose-logo](migmose-logo.jpeg)\n\n# MIG_mose\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n![Python Versions (officially) supported](https://img.shields.io/pypi/pyversions/migmose.svg)\n![Pypi status badge](https://img.shields.io/pypi/v/migmose)\n![Unittests status badge](https://github.com/Hochfrequenz/migmose/workflows/Unittests/badge.svg)\n![Coverage status badge](https://github.com/Hochfrequenz/migmose/workflows/Coverage/badge.svg)\n![Linting status badge](https://github.com/Hochfrequenz/migmose/workflows/Linting/badge.svg)\n![Black status badge](https://github.com/Hochfrequenz/migmose/workflows/Formatting/badge.svg)\n\nMIG_mose generates machine-readable files from MIG documents ([edi-energy](https://www.edi-energy.de/index.php?id=38)).\nMIG_mose is the sister of [kohlrahbi](https://github.com/Hochfrequenz/kohlrahbi).\n\n## Tech-Stack\n- MIG_mose is a Python(3.11,3.12) project.\n- .docx files a processed by the [python-docx](https://python-docx.readthedocs.io/en/latest/) library.\n- EdiFact formats are used as in [maus.edifact](https://github.com/Hochfrequenz/mig_ahb_utility_stack/blob/main/src/maus/edifact.py).\n\nThis is at the moment a MWE (Minimum Working Example) and will be extended in the future.\nSee below for an overview of its features.\n\n## Installation\nMIG_mose is a Python-based tool.\nTherefore, you have to make sure, that Python is running on your machine.\n\nWe recommend using virtual environments to keep your system clean.\n\nCreate a new virtual environment with\n```bash\npython -m venv .venv\n```\n\nThe activation of the virtual environment depends on your used OS.\n\n**Windows**\n```\n.venv\\Scripts\\activate\n```\n**MacOS/Linux**\n```\nsource .venv/bin/activate\n```\nFinally, install the package with\n\n```bash\npip install migmose\n```\n\n## Features And How To Use Them\n\nAt this point, MIG_mose works as a command-line interface tool (CLI).\nThere are several flags available to provide a user-friendly way to interact with MIG_mose.\nBelow the available options are listed:\n\n- **Input Directory (`-i`, `--input-dir`):**\n    - Description: This option allows the user to specify the path to the directory containing the .docx files for the MIGs (Message Implementation Guides).\n    - Example: `--input_dir /path/to/input_directory`\n\n- **Message Format (`-mf`, `--message-format`):**\n    - Description: This option defines the set of message formats to be parsed. Users can specify multiple message formats by providing multiple values. The formats are EdiFact formats (cf. [maus.edifact.EdifactFormat](https://github.com/Hochfrequenz/mig_ahb_utility_stack/blob/main/src/maus/edifact.py)). If no format is specified, all formats are parsed.\n    - Example: `--message_format \"UTILMD\" --message_format \"ORDCHG\"`\n\n- **Output Directory (`-o`, `--output-dir`):**\n    - Description: This option allows the user to specify the path to the directory which should contain the output files generated by the tool. If the directory does not exist, it will be created automatically.\n    - Example: `--output_dir /path/to/output_directory`\n- **Output File Type (`-ft`, `--file-type`):**\n    - Description: Defines the output format. Choose between csv for flat Nachrichtenstruktur tables and nested_json for json files of the nested Nachrichtenstruktur tables. Default is csv.\n    - Example: `--file-type \"csv\"\n### Usage Example\n\nTo use the CLI logic provided by this tool, follow the command syntax below:\n\n```bash\nmigmose -i /path/to/input_directory -o /path/to/output_directory -mf \"UTILMD\" -mf \"ORDCHG\" -ft \"csv\"\n```\n\n## Development\n\n### Setup\n\nTo set up the development environment, you have to install the dev dependencies.\n\n```bash\ntox -e dev\n```\n\n### Run all tests and linters\n\nTo run the tests, you can use tox.\n\n```bash\ntox\n```\nSee our [Python Template Repository](https://github.com/Hochfrequenz/python_template_repository#how-to-use-this-repository-on-your-machine) for detailed explanations.\n\n## Contribute\n\nYou are very welcome to contribute to this template repository by opening a pull request against the main branch.\n\n## Related Tools and Context\n\nThis repository is part of the [Hochfrequenz Libraries and Tools for a truly digitized market communication](https://github.com/Hochfrequenz/digital_market_communication/).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Tool to generate machine readable files from MIG documents",
    "version": "0.1.0",
    "project_urls": {
        "Changelog": "https://github.com/Hochfrequenz/migmose/releases",
        "Homepage": "https://github.com/Hochfrequenz/migmose"
    },
    "split_keywords": [
        "automation",
        " bdew",
        " edi@energy",
        " mig"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d9f19071498109278a7a1f40564d8513778d64a123d91e3c325ac753b3c3dd1c",
                "md5": "2072b470f0a542bf8c4d6a136eee29f4",
                "sha256": "728dfa046c1c8713cad20edee73bfef7c01bcb904afe32d9aa9685ad838c895a"
            },
            "downloads": -1,
            "filename": "migmose-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2072b470f0a542bf8c4d6a136eee29f4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 13554,
            "upload_time": "2024-05-20T08:31:19",
            "upload_time_iso_8601": "2024-05-20T08:31:19.798182Z",
            "url": "https://files.pythonhosted.org/packages/d9/f1/9071498109278a7a1f40564d8513778d64a123d91e3c325ac753b3c3dd1c/migmose-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ebf310df3080cb05ac8f45e2ea9a57086dc8d9afa8d4b68c10497eb2cf46420",
                "md5": "7d88c0338b33b11378391ae91a6d9971",
                "sha256": "6f733df26454b637002ec5e83847853e84b6799c09bd65497d65b4de136c974d"
            },
            "downloads": -1,
            "filename": "migmose-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7d88c0338b33b11378391ae91a6d9971",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 395925,
            "upload_time": "2024-05-20T08:31:21",
            "upload_time_iso_8601": "2024-05-20T08:31:21.321338Z",
            "url": "https://files.pythonhosted.org/packages/7e/bf/310df3080cb05ac8f45e2ea9a57086dc8d9afa8d4b68c10497eb2cf46420/migmose-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-20 08:31:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Hochfrequenz",
    "github_project": "migmose",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "annotated-types",
            "specs": [
                [
                    "==",
                    "0.6.0"
                ]
            ]
        },
        {
            "name": "attrs",
            "specs": [
                [
                    "==",
                    "23.2.0"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.7"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    "==",
                    "0.4.6"
                ]
            ]
        },
        {
            "name": "loguru",
            "specs": [
                [
                    "==",
                    "0.7.2"
                ]
            ]
        },
        {
            "name": "lxml",
            "specs": [
                [
                    "==",
                    "5.2.2"
                ]
            ]
        },
        {
            "name": "marshmallow",
            "specs": [
                [
                    "==",
                    "3.21.2"
                ]
            ]
        },
        {
            "name": "maus",
            "specs": [
                [
                    "==",
                    "0.5.0"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "10.2.0"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "24.0"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.7.1"
                ]
            ]
        },
        {
            "name": "pydantic-core",
            "specs": [
                [
                    "==",
                    "2.18.2"
                ]
            ]
        },
        {
            "name": "python-docx",
            "specs": [
                [
                    "==",
                    "1.1.2"
                ]
            ]
        },
        {
            "name": "typing-extensions",
            "specs": [
                [
                    "==",
                    "4.11.0"
                ]
            ]
        },
        {
            "name": "win32-setctime",
            "specs": [
                [
                    "==",
                    "1.1.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "migmose"
}
        
Elapsed time: 0.31081s