Skip to content

Commit db2361b

Browse files
authored
Merge pull request #11 from dss-extensions/ctx
Extensive updates to support multiple DSS instances, GR API, exception mapping and more!
2 parents 34cca84 + 5a42790 commit db2361b

File tree

17 files changed

+26813
-8495
lines changed

17 files changed

+26813
-8495
lines changed

.github/workflows/dotnet.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build package
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Adjust versions
15+
run: bash scripts/ci_update_versions.sh
16+
- name: Download DSS C-API binaries
17+
run: bash scripts/download_native_libs.sh
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v2
20+
with:
21+
dotnet-version: 6.0.x
22+
- name: Restore dependencies
23+
run: dotnet restore
24+
- name: Build
25+
run: dotnet build --no-restore -c Release
26+
- name: Pack
27+
run: dotnet pack -c Release
28+
# - name: Test --- TODO!
29+
# run: dotnet test --no-build --verbosity normal
30+
- name: 'Upload artifacts'
31+
uses: "actions/upload-artifact@v2"
32+
with:
33+
name: 'packages'
34+
path: '${{ github.workspace }}/bin/Release/*.nupkg'
35+

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
.vs
22
obj
3-
bin/
3+
bin/
4+
messages/
5+
runtimes/
6+
.vscode/

KLUSOLVE_LICENSE.txt

Lines changed: 504 additions & 0 deletions
Large diffs are not rendered by default.

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Copyright (c) 2008-2018, Electric Power Research Institute, Inc.
2-
Copyright (c) 2017-2018, Paulo Meira
1+
Copyright (c) 2016-2022 Paulo Meira
2+
Copyright (c) 2018-2022 DSS Extensions contributors
33
All rights reserved.
44

55
Redistribution and use in source and binary forms, with or without

OPENDSS_LICENSE

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
* Copyright (c) 2008-2021, Electric Power Research Institute, Inc.
2+
* All rights reserved.
3+
*
4+
* Redistribution and use in source and binary forms, with or without
5+
* modification, are permitted provided that the following conditions are met:
6+
* * Redistributions of source code must retain the above copyright
7+
* notice, this list of conditions and the following disclaimer.
8+
* * Redistributions in binary form must reproduce the above copyright
9+
* notice, this list of conditions and the following disclaimer in the
10+
* documentation and/or other materials provided with the distribution.
11+
* * Neither the name of the Electric Power Research Institute, Inc., nor
12+
* the names of its contributors may be used to endorse or promote
13+
* products derived from this software without specific prior written
14+
* permission.
15+
*
16+
* THIS SOFTWARE IS PROVIDED BY Electric Power Research Institute, Inc., "AS IS"
17+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
* DISCLAIMED. IN NO EVENT SHALL Electric Power Research Institute, Inc., BE
20+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26+
* POSSIBILITY OF SUCH DAMAGE.
27+

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1-
[![Build status](https://ci.appveyor.com/api/projects/status/n5q0ddql063r2fkx/branch/master?svg=true)](https://ci.appveyor.com/project/PMeira/dss-sharp-h8r36/branch/master)
1+
[![Build](https://github.com/dss-extensions/dss_sharp/actions/workflows/dotnet.yml/badge.svg)](https://github.com/dss-extensions/dss_sharp/actions/workflows/dotnet.yml)
22

33
# DSS Sharp
44

5-
This contain files for the C# bindings for dss_capi, an unofficial build with a custom C-API of EPRI's OpenDSS. With it, you can replace the COM module with very few code changes and reach multi-platform C# code easily!
5+
DSS Sharp is a C#/.NET wrapper library for DSS C-API, which is an open-source, multiplatform, multiarchitecture, extended alternative (unofficial, not provided by EPRI) OpenDSS engine, highly compatible with the official OpenDSS COM implementation and more.
6+
7+
DSS Sharp tries to mimic the organization of the official OpenDSS COM interfaces, plus several extensions (new properties and methods, and whole new classes). If you find conflicting behavior, feel free to report.
8+
9+
This projects exposes most of the funcionality implemented in DSS C-API, including performance benefits, ZIP file support, initial JSON exports, multi-platform (Linux, Windows, macOS) support, including Intel x86/x64 and ARM architectures. Contrary to the official implementation, DSS Sharp supports multiple OpenDSS instances ([`dss_sharp.DSS.NewContext()`](https://dss-extensions.org/dss_sharp/html/d0e4d400-3bd9-1244-3cac-8f1234cbad9f.htm)), effectively enabling user-controlled multi-threading applications. Most of the official [parallel-machine](https://dss-extensions.org/dss_sharp/html/f3440753-3e74-bdb2-81c6-9052f8742d7e.htm) functions are also available.
10+
11+
For a general introduction visit https://dss-extensions.org and follow the development of the general documentation at https://github.com/dss-extensions/dss-extensions
612

713
<p align="center">
8-
<img alt="Overview of related repositories" src="https://raw.githubusercontent.com/PMeira/dss_sharp/master/docs/images/repomap.svg?sanitize=true" width=600>
14+
<img alt="Overview of related repositories" src="https://raw.githubusercontent.com/dss-extensions/dss_capi/master/docs/images/repomap.png" width=600>
915
</p>
1016

11-
Previously, the source code here was hosted in https://github.com/PMeira/dss_capi/ itself.
17+
If you are looking for the bindings to other languages:
18+
19+
- [DSS C-API library](http://github.com/dss-extensions/dss_capi/): the base library that exposes a modified version of EPRI's OpenDSS through a more traditional C interface, built with the open-source Free Pascal compiler instead of Delphi. As of 2022, this base library includes several extensive changes, while retaining very good compatibility.
20+
- [DSS Python](http://github.com/dss-extensions/dss_python/) is a multi-platform Python module (Windows, Linux, MacOS) very compatible with the original COM DLL. See also [OpenDSSDirect.py](http://github.com/dss-extensions/OpenDSSDirect.py/) if you don't need COM compatibility, or just would like to check its extra functionalities (you can mix DSS Python and OpenDSSDirect.py). DSS Python includes preliminary plotting capabilites.
21+
[`opendssdirect.utils`](https://dss-extensions.org/OpenDSSDirect.py/opendssdirect.html#module-opendssdirect.utils) to generate some DataFrames.
22+
- [OpenDSSDirect.jl](http://github.com/dss-extensions/OpenDSSDirect.jl/): a Julia module, created by Tom Short (@tshort), recently migrated with the help of Dheepak Krishnamurthy (@kdheepak) to DSS C-API instead of the DDLL.
23+
- [DSS MATLAB](http://github.com/dss-extensions/dss_matlab/): presents multi-platform integration (Windows, Linux, MacOS) with DSS C-API and is also very compatible with the COM classes.
24+
25+
# Documentation
1226

13-
This code will be refactored and benchmarked, hence it's better to use a separate repository.
27+
We will grow general documentation at https://github.com/dss-extensions/dss-extensions
1428

29+
Currently, users can rely on the official OpenDSS COM documentation (as seen in the official installation and from the [SVN repo](https://sourceforge.net/p/electricdss/code/HEAD/tree/trunk/Version8/Distrib/Doc/)). We provide C#/.NET class library docs at https://dss-extensions.org/dss_sharp/

appveyor.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/images/dss_sharp.png

15.1 KB
Loading

0 commit comments

Comments
 (0)