DiTTo
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 DiTTo implements a many-to-one-to-many parsing framework which makes it modular and robust. The reader modules 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 instance. The writer modules 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.
Quick Start
Install DiTTo
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:
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:
pip install "ditto.py[all]"
which is the same as
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
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:
$ 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:
{
"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:
$ ditto-cli convert --from cyme --input ./config.json --to dss
Documentation on converting other formats can be found here.
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
Getting Help
If you are having issues using DiTTo, feel free to open an Issue on GitHub here
All contributions are welcome. For questions about collaboration please email Tarek Elgindy
Metadata
Release files for ditto.py 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ditto.py-0.2.4.tar.gz | 284.7 kB | Without provenance | Details for ditto.py-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ditto.py-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for ditto.py-0.2.4-py3-none-any.whl |
Total release size: 637.1 kB
Release files / ditto.py-0.2.4.tar.gz
| Download URL | ditto.py-0.2.4.tar.gz |
|---|---|
| Size | 284.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6228a3153eb4ab70034a062c8acea7cf781e227ec6b80a4daba006e8f6dccfb
|
|
BLAKE2b-256 checksum How to use checksums |
63444c651db42e533898217a31b030948a1b3655a1b071693d17d1df92f7ee67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / ditto.py-0.2.4-py3-none-any.whl
| Download URL | ditto.py-0.2.4-py3-none-any.whl |
|---|---|
| Size | 352.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6251aa2f0490381e3c2b099f48593086a52adbc3faa0f7efd83882985c04f86
|
|
BLAKE2b-256 checksum How to use checksums |
0af2006d24ab5ebd7b7c48554b09bc716dbc66b48b3486f691387cba049262bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for ditto.py 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.