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

Sync DSS C-API (v0.12.1 main) header, update deps #84

Merged
merged 4 commits into from
Jul 24, 2022
Merged

Conversation

PMeira
Copy link
Member

@PMeira PMeira commented Jul 17, 2022

  • sync header
  • complement existing modules
  • create missing modules
  • fix error checking in CktElement.Variablei
  • fix Fuses_Reset args

Closes #83

Handles part of #78, but the official API is too limited and #82 will be required to actually access everything easily. Should handle part of #77.

@codecov-commenter
Copy link

codecov-commenter commented Jul 17, 2022

Codecov Report

Merging #84 (537675d) into master (d934bd2) will decrease coverage by 12.21%.
The diff coverage is 1.28%.

@@             Coverage Diff             @@
##           master      #84       +/-   ##
===========================================
- Coverage   71.23%   59.02%   -12.22%     
===========================================
  Files          44       55       +11     
  Lines        5813     7046     +1233     
===========================================
+ Hits         4141     4159       +18     
- Misses       1672     2887     +1215     
Impacted Files Coverage Δ
src/OpenDSSDirect.jl 90.00% <ø> (ø)
src/activeclass.jl 90.00% <0.00%> (-10.00%) ⬇️
src/basic.jl 3.57% <0.00%> (-1.43%) ⬇️
src/bus.jl 88.88% <0.00%> (-5.85%) ⬇️
src/cap_controls.jl 92.00% <ø> (ø)
src/circuit.jl 90.52% <0.00%> (-7.21%) ⬇️
src/cndata.jl 0.00% <0.00%> (ø)
src/ctrl_queue.jl 0.00% <0.00%> (ø)
src/element.jl 75.00% <0.00%> (-25.00%) ⬇️
src/error.jl 66.66% <0.00%> (-33.34%) ⬇️
... and 30 more

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 d934bd2...537675d. Read the comment docs.

@PMeira
Copy link
Member Author

PMeira commented Jul 17, 2022

Oh... there is much more missing than I expected. The bulk are API extensions/extras (CNData, LineGeometries, LineSpacings, Reactors, TSData, WireData), but there are a couple from the official too.

I'll try to automate most of these some other day.

  • ActiveClass_ToJSON
  • Bus_Get_Next
  • Bus_Get_ZSC012Matrix
  • CNData:
    • CNData_Get_AllNames
    • CNData_Get_Count
    • CNData_Get_DiaCable
    • CNData_Get_DiaIns
    • CNData_Get_DiaStrand
    • CNData_Get_Diameter
    • CNData_Get_EmergAmps
    • CNData_Get_EpsR
    • CNData_Get_First
    • CNData_Get_GMRUnits
    • CNData_Get_GMRac
    • CNData_Get_GmrStrand
    • CNData_Get_InsLayer
    • CNData_Get_Name
    • CNData_Get_Next
    • CNData_Get_NormAmps
    • CNData_Get_RStrand
    • CNData_Get_Rac
    • CNData_Get_Radius
    • CNData_Get_RadiusUnits
    • CNData_Get_Rdc
    • CNData_Get_ResistanceUnits
    • CNData_Get_idx
    • CNData_Get_k
    • CNData_Set_DiaCable
    • CNData_Set_DiaIns
    • CNData_Set_DiaStrand
    • CNData_Set_Diameter
    • CNData_Set_EmergAmps
    • CNData_Set_EpsR
    • CNData_Set_GMRUnits
    • CNData_Set_GMRac
    • CNData_Set_GmrStrand
    • CNData_Set_InsLayer
    • CNData_Set_Name
    • CNData_Set_NormAmps
    • CNData_Set_RStrand
    • CNData_Set_Rac
    • CNData_Set_Radius
    • CNData_Set_RadiusUnits
    • CNData_Set_Rdc
    • CNData_Set_ResistanceUnits
    • CNData_Set_idx
    • CNData_Set_k
  • Circuit_Get_ElementLosses
  • Circuit_SetCktElementIndex
  • Circuit_SetCktElementName
  • CktElement_Get_IsIsolated
  • CktElement_Get_NodeRef
  • CktElement_Set_Variable
  • CktElement_Set_Variablei
  • CtrlQueue_Push
  • DSSElement_ToJSON
  • DSS_Get_AllowChangeDir
  • DSS_Get_AllowDOScmd
  • DSS_Get_AllowEditor
  • DSS_Get_COMErrorResults
  • DSS_Set_AllowChangeDir
  • DSS_Set_AllowDOScmd
  • DSS_Set_AllowEditor
  • DSS_Set_COMErrorResults
  • Error_Get_EarlyAbort
  • Error_Set_EarlyAbort
  • Fuses_Get_NormalState
  • Fuses_Get_State
  • Fuses_Reset
  • Fuses_Set_NormalState
  • Fuses_Set_State
  • GICSources
    • GICSources_Get_AllNames
    • GICSources_Get_Bus1
    • GICSources_Get_Bus2
    • GICSources_Get_Count
    • GICSources_Get_EE
    • GICSources_Get_EN
    • GICSources_Get_First
    • GICSources_Get_Lat1
    • GICSources_Get_Lat2
    • GICSources_Get_Lon1
    • GICSources_Get_Lon2
    • GICSources_Get_Name
    • GICSources_Get_Next
    • GICSources_Get_Phases
    • GICSources_Get_Volts
    • GICSources_Get_idx
    • GICSources_Set_EE
    • GICSources_Set_EN
    • GICSources_Set_Lat1
    • GICSources_Set_Lat2
    • GICSources_Set_Lon1
    • GICSources_Set_Lon2
    • GICSources_Set_Name
    • GICSources_Set_Phases
    • GICSources_Set_Volts
    • GICSources_Set_idx
  • LineGeometries:
    • LineGeometries_Get_AllNames
    • LineGeometries_Get_Cmatrix
    • LineGeometries_Get_Conductors
    • LineGeometries_Get_Count
    • LineGeometries_Get_EmergAmps
    • LineGeometries_Get_First
    • LineGeometries_Get_Name
    • LineGeometries_Get_Nconds
    • LineGeometries_Get_Next
    • LineGeometries_Get_NormAmps
    • LineGeometries_Get_Phases
    • LineGeometries_Get_Reduce
    • LineGeometries_Get_RhoEarth
    • LineGeometries_Get_Rmatrix
    • LineGeometries_Get_Units
    • LineGeometries_Get_Xcoords
    • LineGeometries_Get_Xmatrix
    • LineGeometries_Get_Ycoords
    • LineGeometries_Get_Zmatrix
    • LineGeometries_Get_idx
    • LineGeometries_Set_EmergAmps
    • LineGeometries_Set_Name
    • LineGeometries_Set_Nconds
    • LineGeometries_Set_NormAmps
    • LineGeometries_Set_Phases
    • LineGeometries_Set_Reduce
    • LineGeometries_Set_RhoEarth
    • LineGeometries_Set_Units
    • LineGeometries_Set_Xcoords
    • LineGeometries_Set_Ycoords
    • LineGeometries_Set_idx
  • LineSpacings:
    • LineSpacings_Get_AllNames
    • LineSpacings_Get_Count
    • LineSpacings_Get_First
    • LineSpacings_Get_Name
    • LineSpacings_Get_Nconds
    • LineSpacings_Get_Next
    • LineSpacings_Get_Phases
    • LineSpacings_Get_Units
    • LineSpacings_Get_Xcoords
    • LineSpacings_Get_Ycoords
    • LineSpacings_Get_idx
    • LineSpacings_Set_Name
    • LineSpacings_Set_Nconds
    • LineSpacings_Set_Phases
    • LineSpacings_Set_Units
    • LineSpacings_Set_Xcoords
    • LineSpacings_Set_Ycoords
    • LineSpacings_Set_idx
  • Lines_Get_IsSwitch
  • Lines_Get_SeasonRating
  • Lines_Set_IsSwitch
  • LoadShapes_Get_MaxP
  • LoadShapes_Get_MaxQ
  • LoadShapes_Set_MaxP
  • LoadShapes_Set_MaxQ
  • Loads_Get_Phases
  • Loads_Get_Sensor
  • Loads_Set_Phases
  • PVSystems_Get_Sensor
  • PVSystems_Get_yearly
  • PVSystems_Set_yearly
  • Reactors:
    • Reactors_Get_AllNames
    • Reactors_Get_Bus1
    • Reactors_Get_Bus2
    • Reactors_Get_Count
    • Reactors_Get_First
    • Reactors_Get_IsDelta
    • Reactors_Get_LCurve
    • Reactors_Get_LmH
    • Reactors_Get_Name
    • Reactors_Get_Next
    • Reactors_Get_Parallel
    • Reactors_Get_Phases
    • Reactors_Get_R
    • Reactors_Get_RCurve
    • Reactors_Get_Rmatrix
    • Reactors_Get_Rp
    • Reactors_Get_SpecType
    • Reactors_Get_X
    • Reactors_Get_Xmatrix
    • Reactors_Get_Z
    • Reactors_Get_Z0
    • Reactors_Get_Z1
    • Reactors_Get_Z2
    • Reactors_Get_idx
    • Reactors_Get_kV
    • Reactors_Get_kvar
    • Reactors_Set_Bus1
    • Reactors_Set_Bus2
    • Reactors_Set_IsDelta
    • Reactors_Set_LCurve
    • Reactors_Set_LmH
    • Reactors_Set_Name
    • Reactors_Set_Parallel
    • Reactors_Set_Phases
    • Reactors_Set_R
    • Reactors_Set_RCurve
    • Reactors_Set_Rmatrix
    • Reactors_Set_Rp
    • Reactors_Set_X
    • Reactors_Set_Xmatrix
    • Reactors_Set_Z
    • Reactors_Set_Z0
    • Reactors_Set_Z1
    • Reactors_Set_Z2
    • Reactors_Set_idx
    • Reactors_Set_kV
    • Reactors_Set_kvar
  • Reclosers:
    • Reclosers_Get_NormalState
    • Reclosers_Get_State
    • Reclosers_Reset
    • Reclosers_Set_NormalState
    • Reclosers_Set_State
  • ReduceCkt
    • ReduceCkt_Do1phLaterals
    • ReduceCkt_DoBranchRemove
    • ReduceCkt_DoDangling
    • ReduceCkt_DoDefault
    • ReduceCkt_DoLoopBreak
    • ReduceCkt_DoParallelLines
    • ReduceCkt_DoShortLines
    • ReduceCkt_DoSwitches
    • ReduceCkt_Get_EditString
    • ReduceCkt_Get_EnergyMeter
    • ReduceCkt_Get_KeepLoad
    • ReduceCkt_Get_StartPDElement
    • ReduceCkt_Get_Zmag
    • ReduceCkt_SaveCircuit
    • ReduceCkt_Set_EditString
    • ReduceCkt_Set_EnergyMeter
    • ReduceCkt_Set_KeepLoad
    • ReduceCkt_Set_StartPDElement
    • ReduceCkt_Set_Zmag
  • Relays:
    • Relays_Close
    • Relays_Get_NormalState
    • Relays_Get_State
    • Relays_Open
    • Relays_Reset
    • Relays_Set_NormalState
    • Relays_Set_State
  • Sensors_Get_AllocationFactor
  • Settings_Get_IterateDisabled
  • Settings_Set_IterateDisabled
  • Solution:
    • Solution_Get_BusLevels
    • Solution_Get_IncMatrix
    • Solution_Get_IncMatrixCols
    • Solution_Get_IncMatrixRows
    • Solution_Get_Laplacian
    • Solution_SolveAll
  • TSData:
    • TSData_Get_AllNames
    • TSData_Get_Count
    • TSData_Get_DiaCable
    • TSData_Get_DiaIns
    • TSData_Get_DiaShield
    • TSData_Get_Diameter
    • TSData_Get_EmergAmps
    • TSData_Get_EpsR
    • TSData_Get_First
    • TSData_Get_GMRUnits
    • TSData_Get_GMRac
    • TSData_Get_InsLayer
    • TSData_Get_Name
    • TSData_Get_Next
    • TSData_Get_NormAmps
    • TSData_Get_Rac
    • TSData_Get_Radius
    • TSData_Get_RadiusUnits
    • TSData_Get_Rdc
    • TSData_Get_ResistanceUnits
    • TSData_Get_TapeLap
    • TSData_Get_TapeLayer
    • TSData_Get_idx
    • TSData_Set_DiaCable
    • TSData_Set_DiaIns
    • TSData_Set_DiaShield
    • TSData_Set_Diameter
    • TSData_Set_EmergAmps
    • TSData_Set_EpsR
    • TSData_Set_GMRUnits
    • TSData_Set_GMRac
    • TSData_Set_InsLayer
    • TSData_Set_Name
    • TSData_Set_NormAmps
    • TSData_Set_Rac
    • TSData_Set_Radius
    • TSData_Set_RadiusUnits
    • TSData_Set_Rdc
    • TSData_Set_ResistanceUnits
    • TSData_Set_TapeLap
    • TSData_Set_TapeLayer
    • TSData_Set_idx
  • Text_CommandArray
  • Text_CommandBlock
  • Transformers:
    • Transformers_Get_AllLossesByType
    • Transformers_Get_CoreType
    • Transformers_Get_LossesByType
    • Transformers_Get_RdcOhms
    • Transformers_Get_WdgCurrents
    • Transformers_Get_WdgVoltages
    • Transformers_Get_strWdgCurrents
    • Transformers_Set_CoreType
    • Transformers_Set_RdcOhms
  • WireData:
    • WireData_Get_AllNames
    • WireData_Get_CapRadius
    • WireData_Get_Count
    • WireData_Get_Diameter
    • WireData_Get_EmergAmps
    • WireData_Get_First
    • WireData_Get_GMRUnits
    • WireData_Get_GMRac
    • WireData_Get_Name
    • WireData_Get_Next
    • WireData_Get_NormAmps
    • WireData_Get_Rac
    • WireData_Get_Radius
    • WireData_Get_RadiusUnits
    • WireData_Get_Rdc
    • WireData_Get_ResistanceUnits
    • WireData_Get_idx
    • WireData_Set_CapRadius
    • WireData_Set_Diameter
    • WireData_Set_EmergAmps
    • WireData_Set_GMRUnits
    • WireData_Set_GMRac
    • WireData_Set_Name
    • WireData_Set_NormAmps
    • WireData_Set_Rac
    • WireData_Set_Radius
    • WireData_Set_RadiusUnits
    • WireData_Set_Rdc
    • WireData_Set_ResistanceUnits
    • WireData_Set_idx
  • XYCurves_Get_AllNames
  • YMatrix:
    • YMatrix_CheckConvergence
    • YMatrix_Get_Handle
    • YMatrix_Get_Iteration
    • YMatrix_Get_LoadsNeedUpdating
    • YMatrix_Get_SolutionInitialized
    • YMatrix_Get_SolverOptions
    • YMatrix_SetGeneratordQdV
    • YMatrix_Set_Iteration
    • YMatrix_Set_LoadsNeedUpdating
    • YMatrix_Set_SolutionInitialized
    • YMatrix_Set_SolverOptions

@PMeira PMeira mentioned this pull request Jul 18, 2022
PMeira added 2 commits July 17, 2022 21:53
- Changes in utils.jl mostly to clean-up repeated code. We could refactor or regenerate most of the trivial code someday.
- Fix error checking in CktElement.Variablei and CktElement.Variable
- A few tests updated/corrected to reflect the changes
@PMeira PMeira marked this pull request as ready for review July 18, 2022 02:05
@PMeira
Copy link
Member Author

PMeira commented Jul 18, 2022

I'll try to add some tests, but if I don't have time by tomorrow, it's a good idea to release this since there are a couple of fixes.

@PMeira PMeira merged commit 339df8c into master Jul 24, 2022
@PMeira PMeira deleted the api-sync branch July 24, 2022 14:22
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.

Sync to the current API
2 participants