Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for DSS C-API 0.12.x #73

Merged
merged 4 commits into from
Jul 13, 2022
Merged

Updates for DSS C-API 0.12.x #73

merged 4 commits into from
Jul 13, 2022

Conversation

PMeira
Copy link
Member

@PMeira PMeira commented Feb 28, 2022

Main changes:

  • All help and description of comands/properties/options moved to a separate file (due to the i18n and better documentation effort)
  • Updated lib names
  • LoadShapes: migrate the spelling of SInterval C functions
  • In properties in general, DSS Objects are always lowercase now, since we don't keep copies of the original strings anymore in DSS C-API.
  • Some setters now throw instead of silently accepting invalid values.
  • Loads: ZipV is always 7 elements.
  • Transformers: Xhl/Xht/Xlt and R are (correctly) percent values now.
  • Monitors: Bytestream no longer contains header.
  • LineCodes: C1, C0 in nF.
  • Add support for ARM64/M1 on macOS.

The unit changes were fixes ported from the main OpenDSS, as well as the Bytestream change.

Main DSS C-API PR was at dss-extensions/dss_capi#109, and the announcement at https://github.com/dss-extensions/dss_capi/releases/tag/0.12.0

On the Julia side, this is a conservative update. I opened #81, #82 and #83 regarding new features.

@PMeira
Copy link
Member Author

PMeira commented Feb 28, 2022

Looks like there is an actual error on macOS related to meters (probably uninitialized memory), but the rest is a bunch of timeouts, e.g.

Cloning registry General from "https://github.com/JuliaRegistries/General.git"
25l    Fetching: [>                                        ]  0.0 %
    Fetching: [=======>                                 ]  16.2 %
    Fetching: [==================>                      ]  43.9 %
Error: The operation was canceled.

I'll try to fix the meter issue and rerun the tests later.

@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2022

Codecov Report

Merging #73 (05a3ec3) into master (589e9b1) will increase coverage by 0.04%.
The diff coverage is 81.81%.

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
+ Coverage   71.18%   71.23%   +0.04%     
==========================================
  Files          44       44              
  Lines        5810     5813       +3     
==========================================
+ Hits         4136     4141       +5     
+ Misses       1674     1672       -2     
Impacted Files Coverage Δ
src/pvsystems.jl 67.64% <ø> (ø)
src/ymatrix.jl 90.74% <33.33%> (-3.50%) ⬇️
src/OpenDSSDirect.jl 90.00% <100.00%> (+0.52%) ⬆️
src/lib.jl 59.96% <100.00%> (+0.10%) ⬆️
src/loadshape.jl 96.82% <100.00%> (ø)
src/swt_controls.jl 83.67% <100.00%> (+0.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 589e9b1...05a3ec3. Read the comment docs.

@PMeira
Copy link
Member Author

PMeira commented Apr 12, 2022

Some old functions were still not exposed, this could be a good time to do it. I noticed from a comment in the official forum that SwtControls_Get/Set_idx are not there.

PMeira added 3 commits July 13, 2022 02:40
- Update version, use DSS_CAPI_TAG = "0.12.0"
- Updated lib names
- LoadShapes: migrate the spelling of SInterval C functions
- Transformers: Xhl/Xht/Xlt and R are (correctly) percent values now.
- In properties in general, DSS Objects are always lowercase now, since we don't keep copies of the original strings anymore in DSS C-API.
- Monitors: Bytestream no longer contains header.
- Some setters now throw instead of silently accepting invalid values.
- LineCodes: C1, C0 in nF.
- Loads: ZipV is always 7 elements.
- tests/Executive: update number of commands - COMHelp was added in 0.12.0b4
- lib: Remove the old function aliases for LoadShapes
- YMatrix: update API (to simple pointer); add `SolveSystem()` without params
- tests/CktElement.AllVariableValues: make it a little lax (win32 failed)
- tests/meters: Run "AllocateLoads" to populate CalcCurrent and AllocFactors
- SwtControls: enable Idx getter and related tests
- Add support for ARM64/M1 on macOS. Tested with Julia 1.8rc, tests pass. Linux added too, but untested currently.
- deps: download help; use it (DSS_SetPropertiesMO)
@PMeira PMeira force-pushed the dss_capi-0.12.x branch from a43c3e7 to fa71941 Compare July 13, 2022 13:14
@PMeira PMeira marked this pull request as ready for review July 13, 2022 13:23
@PMeira PMeira requested a review from kdheepak July 13, 2022 13:25
@PMeira
Copy link
Member Author

PMeira commented Jul 13, 2022

I think we're safe to merge and release soon. I'll push another commit to set the version to 0.8.0

@kdheepak
Copy link
Member

Thanks for making these changes!

@PMeira PMeira merged commit d934bd2 into master Jul 13, 2022
@PMeira PMeira deleted the dss_capi-0.12.x branch July 13, 2022 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants