ditto.py


Nameditto.py JSON
Version 0.2.4 PyPI version JSON
download
home_pagehttps://github.com/NREL/ditto
SummaryDistribution Feeder Conversion Tool
upload_time2023-12-04 21:48:11
maintainer
docs_urlNone
authorTarek Elgindy
requires_python
licenseBSD license
keywords ditto
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            DiTTo
=====

|image1| |image2| |image3| |codecov|

DiTTo is the *Distribution Transformation Tool*. It is an open source
tool to convert and modify electrical distribution system models. The
most common domain of electrical distribution systems is from
substations to customers.

How it Works
------------

Flexible representations for power system components are defined in the
ditto models defined
`here <https://github.com/NREL/ditto/tree/master/ditto/models>`__ DiTTo
implements a *many-to-one-to-many* parsing framework which makes it
modular and robust. The `reader
modules <https://github.com/NREL/ditto/tree/master/ditto/readers>`__
parse data files of distribution system format (e.g. OpenDSS) and create
an object for each electrical component. These objects are stored in a
`Store <https://github.com/NREL/ditto/blob/master/ditto/store.py>`__
instance. The `writer
modules <https://github.com/NREL/ditto/tree/master/ditto/writers>`__ are
then used to export the data stored in memory to a selected output
distribution system format (e.g. Gridlab-D) which are written to disk.

Additional functionality can be found in the documentation
`here <https://nrel.github.io/ditto>`__.

Quick Start
-----------

Install DiTTo
~~~~~~~~~~~~~

.. code:: bash

   pip install ditto.py

This will install the basic version of ditto with limited dependencies.
Because ditto supports conversion between many multiple formats,
dependencies can be specified during installation For example:

.. code:: bash

   pip install "ditto.py[extras,opendss,gridlabd]"

will install the required dependencies to convert between opendss and
gridlab-d

To install the full dependency list run:

.. code:: bash

   pip install "ditto.py[all]"

which is the same as

.. code:: bash

   pip install "ditto.py[extras,opendss,cyme,dew,ephasor,synergi,gridlabd]" # same as `pip install "ditto.py[all]"`

Basic Usage
~~~~~~~~~~~

The most basic capability of DiTTo is the conversion of a distribution
system from one format to another. To convert a cyme model represented
in ASCII format with network.txt, equipment.txt and load.txt files, the
following python script can be run to perform the conversion

.. code:: python

   from ditto.store import Store
   from ditto.readers.cyme.read import Reader
   from ditto.writers.opendss.write import Writer

   store = Store()
   reader = Reader(data_folder_path = '.', network_file='network.txt',equipment_file = 'equipment.txt', load_file = 'load.txt')
   reader.parse(store)
   writer = Writer(output_path='.')
   writer.write(store)

The required input files for each reader format are defined in the
folder of each reader

Command Line Interface
~~~~~~~~~~~~~~~~~~~~~~

Ditto can also be run as a command line tool to perform basic
conversion. The CLI accepts only one input file whatever the format. If
we have a gridlabd model entirely stored in a file called model.glm we
can use:

.. code:: bash

   $ ditto-cli convert --from glm --input ./model.glm --to cyme

For formats like CYME where multiple input files are needed, a simple
JSON configuration file is supplied:

.. code:: json

   {
       "data_folder_path": ".",
       "network_filename": "network.txt",
       "equipment_filename": "equipment.txt",
       "load_filename": "load.txt"
   }

A default configuration file is found each reader folder. So to convert
the cyme files described in the python program above, the following
command would be used:

.. code:: bash

   $ ditto-cli convert --from cyme --input ./config.json --to dss

Documentation on converting other formats can be found
`here <https://nrel.github.io/ditto/cli-examples>`__.

Contributing
------------

DiTTo is an open source project and contributions are welcome! Either
for a simple typo, a bugfix, or a new parser you want to integrate, feel
free to contribute.

To contribute to Ditto in 3 steps: - Fork the repository (button in the
upper right corner of the DiTTo GitHub page). - Create a feature branch
on your local fork and implement your modifications there. - Once your
work is ready to be shared, submit a Pull Request on the DiTTo GitHub
page. See the official GitHub documentation on how to do that
`here <https://help.github.com/articles/creating-a-pull-request-from-a-fork/>`__

Getting Help
------------

If you are having issues using DiTTo, feel free to open an Issue on
GitHub `here <https://github.com/NREL/ditto/issues/new>`__

All contributions are welcome. For questions about collaboration please
email `Tarek Elgindy <mailto:tarek.elgindy@nrel.gov>`__

.. |image1| image:: https://travis-ci.org/NREL/ditto.svg?branch=master
   :target: https://travis-ci.org/NREL/ditto
.. |image2| image:: https://badges.gitter.im/NREL/ditto.png
   :target: https://gitter.im/NREL/ditto
.. |image3| image:: https://img.shields.io/badge/docs-ready-blue.svg
   :target: https://nrel.github.io/ditto
.. |codecov| image:: https://codecov.io/gh/NREL/ditto/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/NREL/ditto



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/NREL/ditto",
    "name": "ditto.py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "ditto",
    "author": "Tarek Elgindy",
    "author_email": "tarek.elgindy@nrel.gov",
    "download_url": "https://files.pythonhosted.org/packages/63/44/4c651db42e533898217a31b030948a1b3655a1b071693d17d1df92f7ee67/ditto.py-0.2.4.tar.gz",
    "platform": null,
    "description": "DiTTo\n=====\n\n|image1| |image2| |image3| |codecov|\n\nDiTTo is the *Distribution Transformation Tool*. It is an open source\ntool to convert and modify electrical distribution system models. The\nmost common domain of electrical distribution systems is from\nsubstations to customers.\n\nHow it Works\n------------\n\nFlexible representations for power system components are defined in the\nditto models defined\n`here <https://github.com/NREL/ditto/tree/master/ditto/models>`__ DiTTo\nimplements a *many-to-one-to-many* parsing framework which makes it\nmodular and robust. The `reader\nmodules <https://github.com/NREL/ditto/tree/master/ditto/readers>`__\nparse data files of distribution system format (e.g.\u00a0OpenDSS) and create\nan object for each electrical component. These objects are stored in a\n`Store <https://github.com/NREL/ditto/blob/master/ditto/store.py>`__\ninstance. The `writer\nmodules <https://github.com/NREL/ditto/tree/master/ditto/writers>`__ are\nthen used to export the data stored in memory to a selected output\ndistribution system format (e.g.\u00a0Gridlab-D) which are written to disk.\n\nAdditional functionality can be found in the documentation\n`here <https://nrel.github.io/ditto>`__.\n\nQuick Start\n-----------\n\nInstall DiTTo\n~~~~~~~~~~~~~\n\n.. code:: bash\n\n   pip install ditto.py\n\nThis will install the basic version of ditto with limited dependencies.\nBecause ditto supports conversion between many multiple formats,\ndependencies can be specified during installation For example:\n\n.. code:: bash\n\n   pip install \"ditto.py[extras,opendss,gridlabd]\"\n\nwill install the required dependencies to convert between opendss and\ngridlab-d\n\nTo install the full dependency list run:\n\n.. code:: bash\n\n   pip install \"ditto.py[all]\"\n\nwhich is the same as\n\n.. code:: bash\n\n   pip install \"ditto.py[extras,opendss,cyme,dew,ephasor,synergi,gridlabd]\" # same as `pip install \"ditto.py[all]\"`\n\nBasic Usage\n~~~~~~~~~~~\n\nThe most basic capability of DiTTo is the conversion of a distribution\nsystem from one format to another. To convert a cyme model represented\nin ASCII format with network.txt, equipment.txt and load.txt files, the\nfollowing python script can be run to perform the conversion\n\n.. code:: python\n\n   from ditto.store import Store\n   from ditto.readers.cyme.read import Reader\n   from ditto.writers.opendss.write import Writer\n\n   store = Store()\n   reader = Reader(data_folder_path = '.', network_file='network.txt',equipment_file = 'equipment.txt', load_file = 'load.txt')\n   reader.parse(store)\n   writer = Writer(output_path='.')\n   writer.write(store)\n\nThe required input files for each reader format are defined in the\nfolder of each reader\n\nCommand Line Interface\n~~~~~~~~~~~~~~~~~~~~~~\n\nDitto can also be run as a command line tool to perform basic\nconversion. The CLI accepts only one input file whatever the format. If\nwe have a gridlabd model entirely stored in a file called model.glm we\ncan use:\n\n.. code:: bash\n\n   $ ditto-cli convert --from glm --input ./model.glm --to cyme\n\nFor formats like CYME where multiple input files are needed, a simple\nJSON configuration file is supplied:\n\n.. code:: json\n\n   {\n       \"data_folder_path\": \".\",\n       \"network_filename\": \"network.txt\",\n       \"equipment_filename\": \"equipment.txt\",\n       \"load_filename\": \"load.txt\"\n   }\n\nA default configuration file is found each reader folder. So to convert\nthe cyme files described in the python program above, the following\ncommand would be used:\n\n.. code:: bash\n\n   $ ditto-cli convert --from cyme --input ./config.json --to dss\n\nDocumentation on converting other formats can be found\n`here <https://nrel.github.io/ditto/cli-examples>`__.\n\nContributing\n------------\n\nDiTTo is an open source project and contributions are welcome! Either\nfor a simple typo, a bugfix, or a new parser you want to integrate, feel\nfree to contribute.\n\nTo contribute to Ditto in 3 steps: - Fork the repository (button in the\nupper right corner of the DiTTo GitHub page). - Create a feature branch\non your local fork and implement your modifications there. - Once your\nwork is ready to be shared, submit a Pull Request on the DiTTo GitHub\npage. See the official GitHub documentation on how to do that\n`here <https://help.github.com/articles/creating-a-pull-request-from-a-fork/>`__\n\nGetting Help\n------------\n\nIf you are having issues using DiTTo, feel free to open an Issue on\nGitHub `here <https://github.com/NREL/ditto/issues/new>`__\n\nAll contributions are welcome. For questions about collaboration please\nemail `Tarek Elgindy <mailto:tarek.elgindy@nrel.gov>`__\n\n.. |image1| image:: https://travis-ci.org/NREL/ditto.svg?branch=master\n   :target: https://travis-ci.org/NREL/ditto\n.. |image2| image:: https://badges.gitter.im/NREL/ditto.png\n   :target: https://gitter.im/NREL/ditto\n.. |image3| image:: https://img.shields.io/badge/docs-ready-blue.svg\n   :target: https://nrel.github.io/ditto\n.. |codecov| image:: https://codecov.io/gh/NREL/ditto/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/NREL/ditto\n\n\n",
    "bugtrack_url": null,
    "license": "BSD license",
    "summary": "Distribution Feeder Conversion Tool",
    "version": "0.2.4",
    "project_urls": {
        "Homepage": "https://github.com/NREL/ditto"
    },
    "split_keywords": [
        "ditto"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0af2006d24ab5ebd7b7c48554b09bc716dbc66b48b3486f691387cba049262bb",
                "md5": "152e87a470fdfa347de0eb4853080094",
                "sha256": "b6251aa2f0490381e3c2b099f48593086a52adbc3faa0f7efd83882985c04f86"
            },
            "downloads": -1,
            "filename": "ditto.py-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "152e87a470fdfa347de0eb4853080094",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 352413,
            "upload_time": "2023-12-04T21:48:09",
            "upload_time_iso_8601": "2023-12-04T21:48:09.973859Z",
            "url": "https://files.pythonhosted.org/packages/0a/f2/006d24ab5ebd7b7c48554b09bc716dbc66b48b3486f691387cba049262bb/ditto.py-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63444c651db42e533898217a31b030948a1b3655a1b071693d17d1df92f7ee67",
                "md5": "cf4a12439b2802ad4e83a234726794c2",
                "sha256": "e6228a3153eb4ab70034a062c8acea7cf781e227ec6b80a4daba006e8f6dccfb"
            },
            "downloads": -1,
            "filename": "ditto.py-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "cf4a12439b2802ad4e83a234726794c2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 284668,
            "upload_time": "2023-12-04T21:48:11",
            "upload_time_iso_8601": "2023-12-04T21:48:11.400352Z",
            "url": "https://files.pythonhosted.org/packages/63/44/4c651db42e533898217a31b030948a1b3655a1b071693d17d1df92f7ee67/ditto.py-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-04 21:48:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NREL",
    "github_project": "ditto",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ditto.py"
}
        
Elapsed time: 0.15171s