Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
241 commits
Select commit Hold shift + click to select a range
53f8f90
villas: Use Python dictionaries for defining VILLASconfig files
stv0g Feb 14, 2024
48aeffe
villas: Use Python dictionaries for defining VILLASconfig files (#343)
stv0g Mar 27, 2025
5b8dd51
fix: Cleanup code-style of setup.py
stv0g Mar 25, 2025
7e7b7b6
fix: Cleanup code-style of setup.py (#336)
stv0g Mar 27, 2025
eb85b1b
fix(style): Remove duplicated typedef
stv0g Mar 25, 2025
89f0788
fix(style): Remove duplicated typedef (#339)
leonardocarreras Mar 28, 2025
700eaea
fix(docs): Fix typo and wrong diff
stv0g Mar 25, 2025
b802e41
fix(docs): Fix typo and wrong diff (#337)
leonardocarreras Mar 28, 2025
a6dc445
feat(cmake): Allow disable LTO builds
stv0g Mar 25, 2025
d68db55
fix(cmake): Add WITH_MARCH_NATIVE option to enable native host arch b…
stv0g Mar 25, 2025
1f28c57
fix(cmake): Disable WITH_LTO and WITH_MARCH_NATIVE options by default
stv0g Mar 25, 2025
6df1041
feat(cmake): Allow disable LTO builds (#341)
leonardocarreras Mar 28, 2025
eaebca7
fix(examples): Only build Fpga9BusHil example if build with CIMpp
stv0g Mar 25, 2025
e632d79
fix(cmake): Renamed CMake variable
stv0g Mar 25, 2025
15b1faf
fix(examples): Only build Fpga9BusHil example if build with CIMpp (#338)
leonardocarreras Mar 28, 2025
369fb7e
fix(mnasolver): wrap extern c in preprocessor condition
fwege Mar 31, 2025
f4885c9
fix: include paths of MNASolverPlugin examples
fwege Mar 31, 2025
2dee7a6
fix: library name of example plugin
fwege Mar 31, 2025
a4ce2a4
fix: MNASolverPlugins examples (#346)
n-eiling Mar 31, 2025
909b39b
fix(ci): Attempt to fix PyPi package publish
stv0g Apr 1, 2025
a703987
fix(ci): Attempt to fix PyPi package publish (#353)
leonardocarreras Apr 1, 2025
397acd9
fix(ci): Fix tag of pypa/gh-action-pypi-publish action
stv0g Apr 1, 2025
5103091
fix(ci): Upgrade version of setuptools for publishing packages to PyPi
stv0g Apr 1, 2025
0e28907
fix(ci): Fix tag of pypa/gh-action-pypi-publish action (#354)
stv0g Apr 1, 2025
1110dc6
Fix some capitalization
stv0g Feb 28, 2024
3140379
Fix some capitalization (#351)
stv0g Apr 1, 2025
4d81db1
Fixup whitespaces
stv0g Feb 28, 2024
3898c45
Fixup whitespaces (#350)
stv0g Apr 1, 2025
073c1e8
fix(ci): Fix Windows builds with newer CMake versions
stv0g Apr 1, 2025
f0d0892
fix: Builds on Clang due to -Wnan-infinity-disabled and -ffast-math
stv0g Apr 1, 2025
df04245
Fix Windows and Rocky/Clang builds (#360)
stv0g Apr 1, 2025
f9a9188
Move pytest.ini to pyproject.toml
stv0g Apr 1, 2025
892d74e
Move pytest.ini to pyproject.toml (#348)
stv0g Apr 2, 2025
7afceba
fix(deps): Add support for newer Spdlog versions
stv0g Mar 25, 2025
7dd5da6
fix: Add missing #pragma once
stv0g Apr 1, 2025
d5f33ca
fix: Use correct include for bundled fmt headers
stv0g Apr 1, 2025
3493f54
fix(deps): Add support for newer Spdlog versions (#340)
stv0g Apr 2, 2025
2646867
fix(cmake): Fix code-style
stv0g Mar 25, 2025
9e506d0
fix(cmake): Fix code-style (#356)
stv0g Apr 2, 2025
f0d35a3
python: Harmonize comment style
stv0g Feb 14, 2024
c9cf697
python: Harmonize comment style (#349)
stv0g Apr 2, 2025
fbeac10
Remove outdated and broken GitLab CI pipeline
stv0g Apr 1, 2025
977f44a
Remove outdated and broken GitLab CI pipeline (#347)
stv0g Apr 2, 2025
40df721
Add minimal pre-commit
stv0g Feb 14, 2024
e78bf0d
fix(style): Remove trailing whitespaces
stv0g Apr 2, 2025
2f6f490
Add pre-commit (#352)
stv0g Apr 2, 2025
50ad24c
feat(pre-commit): Enable end-of-file-fixer
stv0g Apr 2, 2025
a50b8b3
fix(style): Fix end of files to contain a single new line
stv0g Apr 2, 2025
8cf0dc7
Add pre-commit /2 (#361)
stv0g Apr 2, 2025
56b6fd6
fix(python): Fix build of manylinux Docker image with newer CMake ver…
stv0g Apr 1, 2025
7e2a004
fix(ci): Do not use deprecated option names for pypa/gh-action-pypi-p…
stv0g Apr 1, 2025
7158b6f
fix(ci): Update phased-out ubuntu-20.04 runners by ubuntu-24.04
stv0g Apr 1, 2025
6725054
fix(ci): Run PyPi packaging workflows also on pull requests
stv0g Apr 1, 2025
2c5d8e6
fix(ci): Also upgrade Python packaging package to resolve build errors
stv0g Apr 1, 2025
515baa6
fix(ci): Move upload to PyPi into separate job
stv0g Apr 1, 2025
5fbaba0
fix(ci): Simplify triggers for workflows
stv0g Apr 1, 2025
d0f4bc2
fix(python): Build with newer CMake versions
stv0g Apr 1, 2025
31b29a0
fix(ci): Update manylinux Docker image
stv0g Apr 2, 2025
ebf6e33
chore: Update VILLASnode version
stv0g Apr 3, 2025
9ea4994
Fix GitHub actions workflow for publishing to PyPi (#355)
stv0g Apr 3, 2025
472a303
feat(ci): Use trusted / OIDC publishing to PyPi.org
stv0g Apr 3, 2025
4f9536a
fix(ci): Only attempt to upload to PyPi for pushes to master and or tags
stv0g Apr 3, 2025
fc549b6
feat(ci): Use matrix build strategy for build Python wheels
stv0g Apr 3, 2025
9320c81
feat(ci): Use trusted / OIDC publishing to PyPi.org (#375)
stv0g Apr 3, 2025
d21c7c3
feat(pre-commit): Enable AST, XML, YAML, JSON and TOML checks
stv0g Apr 2, 2025
a63d00e
Add pre-commit /3 (#363)
stv0g Apr 3, 2025
566862d
chore(cmake): Remove deprecated options
stv0g Mar 25, 2025
498dbd8
chore(cmake): Remove deprecated options (#342)
stv0g Apr 4, 2025
a6ea39e
fix(cmake): Allow building without JSON library
stv0g Apr 2, 2025
839af1a
Allow builds without nlohmann/json library (#362)
stv0g Apr 4, 2025
e04be43
feat(pre-commit): Enable clang-format check
stv0g Apr 4, 2025
3ea97f5
fix(style): Reformat code-base using clang-format
stv0g Apr 4, 2025
b177a3d
Add pre-commit /4 (#377)
stv0g Apr 6, 2025
5f86a25
feat(cmake): Add install target
stv0g Mar 25, 2025
f7f6201
feat(cmake): Add install target (#381)
stv0g Apr 6, 2025
62ace29
feat(pre-commit): Enable pretty-format-json hook
stv0g Apr 6, 2025
a25427b
fix(style): Fix JSON formatting
stv0g Apr 6, 2025
04fde06
Add pre-commit /5 (#382)
stv0g Apr 7, 2025
745d553
feat(pre-commit): Enable black hook for formatting Python code
stv0g Apr 6, 2025
cc4b4ee
fix(style): Apply black formatting to all Python and Jupyter Notebook…
stv0g Apr 6, 2025
3c0a5c8
Add pre-commit /6 (#383)
stv0g Apr 7, 2025
d0487f6
consider load and extnet components in determineNodeBaseVoltages()
gnakti Jul 15, 2022
6cbf934
set initial power of loads and generators in pq, pv and vd nodes
gnakti Jul 19, 2022
3ab9cd0
change attribute to attributeTyped
gnakti Feb 2, 2023
7e3a483
fix small error in function determineNodeBaseVoltages of PFSolver
martinmoraga Apr 14, 2023
2e980c1
Minimize file changes
leonardocarreras Apr 7, 2025
d0d3bac
Fixes in PFSolver
leonardocarreras Apr 7, 2025
6db438a
Allow to initialize q_ing in extnet
leonardocarreras Apr 7, 2025
145f31d
Fix format of logs
leonardocarreras Apr 7, 2025
08264e4
Revision of power flow solver (#284)
leonardocarreras Apr 7, 2025
dcafb75
chore(cmake): Rename "KLU" dependency to name of actual library "Suit…
stv0g Mar 25, 2025
816f697
Add support for CMake `find package` and rename "KLU" dependency to n…
stv0g Apr 7, 2025
06337a0
fix(cmake): Fix typos and style
stv0g Apr 2, 2025
b5387a5
Fix CMake typos and style (#376)
stv0g Apr 8, 2025
cffd372
feat(pre-commit): Enable EditorConfig checker hook
stv0g Apr 8, 2025
2d12d9e
fix(style): Harmonize comments and indentation
stv0g Apr 8, 2025
ccd059a
fix(style): Remove tab indentation from C/C++ code and harmonize comm…
stv0g Apr 8, 2025
acbc5f2
Add pre-commit /7 (#385)
stv0g Apr 8, 2025
63a7543
fix(cmake): Show feature summary even if not Git info is available
stv0g Apr 6, 2025
9067c96
fix(cmake): Show feature summary even if not Git info is available (#…
stv0g Apr 8, 2025
ab5f508
fix(doc): Harmonize capitalization of Markdown filenames
stv0g Apr 8, 2025
f62afd2
feat(pre-commit): Add markdownlint hook
stv0g Apr 8, 2025
70ea0fb
fix(style): Fix markdownlint warnings
stv0g Apr 8, 2025
9e0af75
Add pre-commit /8 (#386)
stv0g Apr 14, 2025
5105f7f
Declare nominal/base voltages as Real instead of Attribute<Real>
georgii-tishenin Apr 16, 2025
00bd29e
PFSolver: get base voltages using getter functions
georgii-tishenin Apr 16, 2025
1d73803
Fix formatting to comply with clang-format
georgii-tishenin Apr 16, 2025
b8ac3db
Reduce attributes number (#388)
georgii-tishenin Apr 17, 2025
bdea128
feat(nix): Add Nix packaging
stv0g Apr 4, 2025
dba705e
feat(ci): Add GitHub CI workflow for building DPsim with Nix
stv0g Apr 8, 2025
1db38c5
feat(doc): Add documentation for using Nix package manager
stv0g Apr 8, 2025
0bbab86
Nix packaging (#357)
stv0g Apr 18, 2025
b48c3a1
remove commented out code in dpsim/
georgii-tishenin Apr 18, 2025
70de405
remove commented out code in dpsim-models/
georgii-tishenin Apr 18, 2025
1298e1b
Remove commented out code (#390)
stv0g Apr 19, 2025
2240d35
cppcheck: Catch exception in Timer destructor
leonardocarreras Apr 17, 2025
313afd8
cppcheck: Pass the new iterator when deleting the current component
leonardocarreras Apr 17, 2025
3ba7acf
Dockerfiles: Fedora v42 with metadata and villas updated
leonardocarreras Apr 17, 2025
6955238
Add a logger to the Timer
leonardocarreras Apr 17, 2025
d392934
Add libre to Dockerfile fix one of the real-time errors using villas
leonardocarreras Apr 20, 2025
72fec24
Fix KLU Adapter: varying entry index passed without checkend for empty
leonardocarreras Apr 20, 2025
d22dcea
Fix initialization of logger in Timer
leonardocarreras Apr 21, 2025
3cab0c2
Upgrade Fedora dockerfiles to v42 (#387)
stv0g Apr 21, 2025
c10572c
fix undeclared destructors
leonardocarreras May 11, 2025
87173ed
fix undeclared temporary variables (sonarcloud)
leonardocarreras May 11, 2025
a65ed48
fix fedora container error in mosquito install and update villas version
leonardocarreras May 11, 2025
49c8121
fix rocky container and update villas version
leonardocarreras May 11, 2025
9f6da1f
activate pybind in clang compilation using rocky
leonardocarreras May 11, 2025
3136b5a
pybind: Errors when compiling with clang (#334)
leonardocarreras May 19, 2025
412b488
Add coverage option to CMakeLists.txt
AnasBahr10 Jul 3, 2025
80aed44
Update yaml file for code coverage
AnasBahr10 Jul 3, 2025
ed6dd4a
Add codecove badge
Haifischbecken Jul 4, 2025
1a60014
Do not continue on error in "Run pytest" and "Generate lcov report" s…
georgii-tishenin Jul 7, 2025
e51bc4c
Add Code Coverage Report (#395)
georgii-tishenin Jul 7, 2025
73e20cb
Implement new Dockerfile for binder.
stv0g Aug 26, 2022
4d8c1af
Improvements to Index Notebook and binder Dockerfile.
pipeacosta Dec 22, 2024
24b45d7
Update binder badge in README and adapt Dockerfile for local Binder d…
pipeacosta Jan 31, 2025
8f8e6ef
Add job for building the binder Dockerfile.
pipeacosta Jul 4, 2025
9fbae04
Move Dockerfile to new .binder folder.
pipeacosta Jul 5, 2025
43b4363
Modify Binder badge to point to master branch.
pipeacosta Jul 7, 2025
81d8f49
Adapt DPsim to deploy it in Mybinder (#323)
leonardocarreras Jul 7, 2025
a4045a1
Fix the profiling workflow
leonardocarreras Aug 29, 2025
bb5397e
Fix the profiling workflow (#399)
leonardocarreras Aug 29, 2025
036745f
Fix the realtime datalogger
leonardocarreras Aug 29, 2025
6a59912
Add capability to create folders needed to set the file path
leonardocarreras Aug 29, 2025
6a11118
Add pybind bindings
leonardocarreras Aug 29, 2025
357ddae
Add example notebook for tests
leonardocarreras Aug 29, 2025
779885f
Toggle skip test to false in metadata
leonardocarreras Sep 2, 2025
6692025
Fix realtime datalogger (#400)
leonardocarreras Sep 2, 2025
84f19d5
chore(deps): Bump pypa/gh-action-pypi-publish in /.github/workflows
dependabot[bot] Sep 4, 2025
452323c
chore(deps): Bump pypa/gh-action-pypi-publish from 1.12.4 to 1.13.0 i…
leonardocarreras Oct 9, 2025
ad8f4fb
Bump villas and update cimpp installation method in containers
leonardocarreras Oct 7, 2025
261f2e4
Update cmake fetch and finding of libcimpp and fix dependent files an…
leonardocarreras Oct 7, 2025
81b5663
Update nix build and github actions container workflow
leonardocarreras Oct 7, 2025
1aead96
Implement suggestions regarding cmake, nix and dockerfiles
leonardocarreras Oct 14, 2025
a4fe209
chore (deps): update to CIMpp rpm/deb install + bump VILLAS (#404)
leonardocarreras Oct 17, 2025
8bfea73
Disable code coverage in linux-fedora-examples on workflow
leonardocarreras Oct 20, 2025
d0138c0
Disable code coverage in linux-fedora-examples on workflow (#412)
leonardocarreras Oct 20, 2025
d5d12fe
Updated loggers to use SPD_LOG_LOGGER macros
shikhindahikar Oct 18, 2025
52cd86b
Fixing format of the changes
shikhindahikar Oct 20, 2025
ff659ca
Adding correct logger usage (#411)
leonardocarreras Oct 28, 2025
407e37d
- issue with std::max in simulation.cpp: windows.h seems to be includ…
FGH-wirtz Oct 15, 2025
eefa437
changed from two spaces indentation to tab
FGH-wirtz Oct 29, 2025
b148118
fix std::max behaviour in simulation.cpp for windows build using CMak…
leonardocarreras Oct 29, 2025
86f17a6
Bump version of black & black jupyter to 25.11.0
leonardocarreras Nov 11, 2025
098c996
Apply changes in the format due to newer version
leonardocarreras Nov 11, 2025
e8d9a66
Bump version of black & black jupyter to 25.11.0 (#421)
leonardocarreras Nov 11, 2025
02633f2
Unified names for switch open/close state Attribute::Ptr in Base Phas…
shikhindahikar Nov 5, 2025
bc9d363
Fixing inconsistent switch attribute names in Base::Ph1::Switch and B…
leonardocarreras Nov 11, 2025
3daf3c6
Implement new component DecouplingLineEMT_Ph3 and test circuit.
pipeacosta Nov 16, 2025
f1caece
Add test for decoupling line Ph3 to Line.ipynb example.
pipeacosta Nov 20, 2025
4ab9b3a
Improve nine bus decoupling example with 3ph decoupling line.
pipeacosta Nov 20, 2025
7ff3cae
Clean code and remove redundant includes.
pipeacosta Nov 20, 2025
f6bd14f
Implement decoupling line emt ph3 (#422)
leonardocarreras Nov 21, 2025
02d1fac
Reorganize structure of module
leonardocarreras Aug 29, 2025
1cc846b
Add missing component EMT 3Ph ControlledCurrentSource to component list
leonardocarreras Aug 29, 2025
292d534
fix examples: clean imports and use the method for 3ph parameter crea…
leonardocarreras Aug 29, 2025
39fa8e1
Add suggestions
leonardocarreras Sep 1, 2025
5a44388
Add a way to search for all parts of villas library
leonardocarreras Sep 25, 2025
fe8d4b5
Move deprecated files using shared memory and fix changes
leonardocarreras Sep 25, 2025
7a01776
Fix imports and coding of current examples
leonardocarreras Sep 25, 2025
ee2a1a7
Fix and adapt cmakelists
leonardocarreras Sep 25, 2025
2a29363
Adapt files used in or with examples
leonardocarreras Sep 25, 2025
af6bb8e
Adapt files used in or with examples
leonardocarreras Sep 25, 2025
0b86a88
Fixes in examples for realtime and CIM usage
leonardocarreras Sep 25, 2025
e47d3bb
Fix ambiguous use of VoltageNorton->SetParameters
leonardocarreras Oct 15, 2025
8e7c447
Fix clang reported errors
leonardocarreras Oct 15, 2025
b51d3fb
Fix module dpsimvillas (#401)
leonardocarreras Nov 24, 2025
9193696
Changelog including older versions
leonardocarreras Nov 25, 2025
665ac60
Remove section maintenance, reassign the tasks to the sections in kee…
leonardocarreras Nov 25, 2025
379e89e
Changelog including older versions (#430)
leonardocarreras Nov 25, 2025
093c23d
Fix compilation issue when using dpsimpy on binder and a container th…
leonardocarreras Nov 27, 2025
a62f285
Fix compilation issue for binder (#434)
leonardocarreras Nov 27, 2025
9d80079
Fix workflow issue with sonar, bump to version v6
leonardocarreras Dec 4, 2025
d8c0a0e
Fix workflow issue with sonar (#439)
leonardocarreras Dec 5, 2025
9f882f0
Make dpsim to be linked to villas
leonardocarreras Dec 7, 2025
3706337
Make dpsim to be linked to villas (#447)
leonardocarreras Dec 8, 2025
ab40e7b
Add contributors file
leonardocarreras Dec 7, 2025
fc26c6d
Fix readme, add contributors info, change contacts
leonardocarreras Dec 7, 2025
6e83eeb
Update docu and contacts in packaging files
leonardocarreras Dec 7, 2025
7f318cc
Release: update contact info (#429)
stv0g Dec 8, 2025
af14d5e
Make fedora-release wait for dpsim-dev container
leonardocarreras Dec 7, 2025
fe21a73
Make fedora-release wait for dpsim-dev container (#446)
leonardocarreras Dec 9, 2025
b8a34c7
Create symlink in manylinux to install path of opendss c lib
leonardocarreras Dec 7, 2025
a6e6824
Create symlink in manylinux to install path of opendss c lib (#448)
leonardocarreras Dec 9, 2025
f426fd4
Add dpsimpyvillas and use correct python install deps
leonardocarreras Dec 7, 2025
7f455b0
Add dpsimpyvillas and use correct python install deps (#449)
leonardocarreras Dec 9, 2025
4940510
Reactivates villas in mybinder python packaging
leonardocarreras Dec 7, 2025
2d8e30f
Reactivates villas in mybinder python packaging (#450)
leonardocarreras Dec 9, 2025
dbb70fa
Uses dpsim manylinux container and skips rc versions in PyPI
leonardocarreras Dec 7, 2025
701c0d3
Uses dpsim manylinux container and skips rc versions in PyPI (#451)
leonardocarreras Dec 9, 2025
44df880
Adapt sonar to avoid deprecated checks for secrets, allow PRs scan
leonardocarreras Dec 8, 2025
b1e6c0c
Adapt sonar to avoid deprecated checks for secrets (#456)
leonardocarreras Dec 9, 2025
816d58c
Security fix for villas workflow
leonardocarreras Dec 8, 2025
89667ab
Security fix for villas workflow (#454)
leonardocarreras Dec 9, 2025
c3b0407
Security fix for profiling workflow
leonardocarreras Dec 8, 2025
c42c5c2
Security fix for profiling workflow (#455)
leonardocarreras Dec 9, 2025
761760b
Updates to the documentation: install and contribution
leonardocarreras Dec 10, 2025
a9e3997
Fixes to documentation and readme (#457)
leonardocarreras Dec 10, 2025
b6538b7
Last updates for release 1.2.0 in changelog
leonardocarreras Dec 10, 2025
0c5588b
Last updates for release 1.2.0 in changelog (#458)
leonardocarreras Dec 10, 2025
a3feda2
Update versions for publishing
leonardocarreras Dec 7, 2025
97b103e
Update publishing date
leonardocarreras Dec 10, 2025
6e88ef9
Update versions for publishing v1.2.0 (#453)
leonardocarreras Dec 10, 2025
5b321c8
Fix python publishing workflow
leonardocarreras Dec 10, 2025
40d7e19
Update versions for publishing and changelog
leonardocarreras Dec 10, 2025
2ff82a9
Fix python publishing workflow and prepare for patch v1.2.1 (#459)
leonardocarreras Dec 10, 2025
92c2153
Added trapezoidal discretization for state space matrices A, B
MarvinTollnitschRWTH Dec 12, 2025
1231409
Added SSN models: Ph1 serial RLC, & generalized two terminal SSN
MarvinTollnitschRWTH Dec 12, 2025
951e880
Made Ph1::SSN::RLC & general. two terminal SSN models usable in pybind
MarvinTollnitschRWTH Dec 12, 2025
2899c09
Added example circuits for new generalized two terminal SSN models
MarvinTollnitschRWTH Dec 12, 2025
ff0965c
Remove unnecessary use of mSLog->flush()
georgii-tishenin Dec 12, 2025
bafb741
Generalized linear two terminal State Space Nodal component models (#…
georgii-tishenin Dec 12, 2025
3ff63fd
- Base Switch components changed to mnaVarCompInterface
FGH-wirtz Nov 4, 2025
b57703f
Fix EMT 3Ph Switch behaviour for Matrix Recomputation (#419)
leonardocarreras Dec 13, 2025
75ae179
Added missing PiLine Models:
FGH-wirtz Dec 1, 2025
15b0ca1
DP_Ph3_PiLine, EMT_Ph1_PiLine and Ph3 diakoptics functionality (#436)
leonardocarreras Dec 16, 2025
d061ca6
Remove outdated roadmap
georgii-tishenin Dec 22, 2025
dd1d93d
Remove outdated roadmap (#463)
georgii-tishenin Dec 22, 2025
d3bdc42
implement functions for mapDisconnector and mapBreaker
charan-dande Mar 11, 2025
f742f63
fix: remove unused example and errorenous logs
fwege Feb 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 31 additions & 0 deletions .binder/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# sogno/dpsim:dev is built by dpsim-git/packaging/Docker/Dockerfile.dev
ARG BASE_IMAGE=sogno/dpsim:dev

FROM ${BASE_IMAGE}

ARG NotebookApp.default_url
ARG ip
ARG port
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER=${NB_USER}
ENV NB_UID=${NB_UID}
ENV HOME=/home/${NB_USER}

RUN adduser \
--comment "Default user" \
--uid ${NB_UID} \
${NB_USER}

COPY . ${HOME}/dpsim
ENV PATH="${HOME}/.local/bin:${PATH}"

RUN python3 -m pip install notebook jupyterlab jupyterhub
USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}
RUN rm -rf ${HOME}/dpsim/build && mkdir ${HOME}/dpsim/build
WORKDIR ${HOME}/dpsim

RUN python3 -m build --wheel
RUN python3 -m pip install ./dist/dpsim*
4 changes: 1 addition & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
---
BasedOnStyle: LLVM

# Increase ColumnLimit to avoid breaking SPDX headers
ColumnLimit: 200

ReflowComments: false
33 changes: 33 additions & 0 deletions .github/workflows/build_nix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build with Nix

on:
push:
branches:
- master
pull_request:

## Build ##

jobs:
build:
name: Build with Nix
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Setup Nix cache
uses: cachix/cachix-action@v14
with:
name: dpsim
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Build dpsim
run: nix build .#dpsim
60 changes: 39 additions & 21 deletions .github/workflows/build_test_linux_fedora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Build & Test Fedora

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

## Build ##

Expand All @@ -30,7 +31,7 @@ jobs:
- name: Configure CMake
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake -DCIM_VERSION=CGMES_2.4.15_16FEB2016 $GITHUB_WORKSPACE
run: cmake -DCIM_VERSION=CGMES_2.4.15_16FEB2016 -DCOVERAGE=ON $GITHUB_WORKSPACE

- name: Build dpsimpy and test examples
shell: bash
Expand Down Expand Up @@ -112,7 +113,7 @@ jobs:

- name: Install parallel testing
shell: bash
run: pip install pytest-xdist
run: pip install pytest pytest-xdist pytest-cov nbformat nbconvert

- name: Run pytest
shell: bash
Expand All @@ -121,14 +122,40 @@ jobs:
PYTHONPATH: "${{ github.workspace }}/build"
run: |
cp -r python/src/dpsim build/
pytest -v examples/Notebooks -n auto
pytest -n auto --cov --cov-branch --cov-report=xml examples/Notebooks/

- name: Archive notebook outputs
uses: actions/upload-artifact@v4
with:
name: pytest-output-${{ github.sha }}
path: outputs/

- name: Install lcov
run: sudo dnf install -y lcov

- name: Generate lcov report
run: |
lcov --capture --directory . --output-file coverage.info --rc lcov_branch_coverage=1 --ignore-errors mismatch
lcov --remove coverage.info '/usr/*' --output-file coverage.cleaned.info
lcov --list coverage.cleaned.info

- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-fedora--${{ github.sha }}
path: |
build/coverage.info
build/coverage_report/
build/**/*.gc*
${{ github.workspace }}/src/**/*.cpp


- name: Upload coverage report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: sogno-platform/dpsim

compare-notebook-results:
name: Compare Notebook results
runs-on: ubuntu-latest
Expand Down Expand Up @@ -286,50 +313,41 @@ jobs:
uses: ./.github/workflows/run_villas_example.yaml
with:
compose_file_path: examples/villas/docker-compose-tests
container_commands: |
docker exec dpsim-compose-dpsim-1 /bin/bash -c "pip install paho-mqtt"
docker exec dpsim-compose-mqtt-1 mosquitto_sub -t "/dpsim-mqtt" -u wildcard -v&
docker exec dpsim-compose-dpsim-1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-mqtt-producer.py"&
docker exec dpsim-compose-dpsim-1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-mqtt.py"
example_name: dpsim-mqtt
continue_on_error: true

test-villas-examples-2:
name: Run dpsim-mqtt-import-export VILLASnode example
needs: [linux-fedora-examples]
uses: ./.github/workflows/run_villas_example.yaml
with:
compose_file_path: examples/villas/docker-compose-tests
container_commands: |
docker exec dpsim-compose-mqtt-1 mosquitto_sub -t "#" -u wildcard -v&
docker exec dpsim-compose-dpsim-1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-mqtt-import-export.py"
example_name: dpsim-mqtt-import-export
continue_on_error: true

test-villas-examples-3:
name: Run dpsim-mqtt-import-export-MIMO VILLASnode example
needs: [linux-fedora-examples]
uses: ./.github/workflows/run_villas_example.yaml
with:
compose_file_path: examples/villas/docker-compose-tests
example_name: dpsim-mqtt-import-export-mimo
continue_on_error: true
container_commands: |
docker exec dpsim-compose-mqtt-1 mosquitto_sub -t "#" -u wildcard -v&
docker exec dpsim-compose-dpsim-1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-mqtt-import-export-MIMO.py"

test-villas-examples-4:
name: Run dpsim-file VILLASnode example
needs: [linux-fedora-examples]
uses: ./.github/workflows/run_villas_example.yaml
with:
compose_file_path: examples/villas/docker-compose-tests
example_name: dpsim-file
continue_on_error: true
container_commands: |
docker exec dpsim-compose-dpsim-1 /bin/bash -c "sleep 3 && tail -f /dpsim/logs/output.csv"&
docker exec dpsim-compose-dpsim-1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-file.py"

test-villas-examples-5:
name: Run mqtt-cigre-mv-pf-profiles VILLASnode example
needs: [linux-fedora-examples]
uses: ./.github/workflows/run_villas_example.yaml
with:
compose_file_path: examples/villas/docker-compose-tests
container_commands: |
docker exec dpsim-compose-mqtt-1 mosquitto_sub -t "#" -u wildcard -v&
docker exec dpsim-compose-dpsim-1 /bin/bash -c "cd /dpsim && python3 /dpsim/examples/villas/dpsim-mqtt-cigre-mv-pf-profiles.py"
example_name: mqtt-cigre-mv-pf-profiles
continue_on_error: true
3 changes: 2 additions & 1 deletion .github/workflows/build_test_linux_fedora_minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Build & Test Fedora Minimal

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

## Build ##

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build_test_linux_rocky.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Build & Test RockyLinux

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

## Build ##

Expand Down Expand Up @@ -59,9 +60,9 @@ jobs:
- name: Configure CMake
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DFETCH_SPDLOG=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DWITH_PYBIND=OFF
run: cmake $GITHUB_WORKSPACE -DFETCH_SPDLOG=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang

- name: Build every target
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake --build . --parallel $(nproc)
run: cmake --build . --parallel $(nproc)
70 changes: 33 additions & 37 deletions .github/workflows/build_test_linux_rocky_profiling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,68 +3,64 @@ name: Build & Profile RockyLinux
on:
workflow_dispatch:

## Build ##

jobs:
profiling:
name: Build with Profiling options
runs-on: ubuntu-latest
container: sogno/dpsim:dev-rocky
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Create Build Environment
run: mkdir build
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Cache build directory
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/build
key: build-cache-rocky-profiling-${{ github.ref }}
- name: Create Build Environment
run: mkdir build

- name: Configure CMake
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DWITH_PROFILING=ON -DWITH_ASAN=ON -DWITH_CUDA=OFF -DFETCH_SPDLOG=ON
- name: Cache build directory
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/build
key: build-cache-rocky-profiling-${{ github.ref }}

- name: Build every target
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake --build . --parallel $(nproc)
- name: Configure CMake
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DWITH_PROFILING=ON -DWITH_ASAN=ON -DWITH_CUDA=OFF -DFETCH_SPDLOG=ON

- name: Build every target
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake --build . --parallel $(nproc)

## Tests ##
test-examples-1:
name: Test Examples 1/4
name: Test Examples 1/4 - WSCC_9bus_mult_coupled
needs: [profiling]
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@${{github.ref}}
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@main
with:
path: ./build/dpsim/examples/cxx/WSCC_9bus_mult_decoupled
name: WSCC_9bus_mult_decoupled
path: ./build/dpsim/examples/cxx/WSCC_9bus_mult_coupled
name: WSCC_9bus_mult_coupled

test-examples-2:
name: Test Examples 2/4
name: Test Examples 2/4 - WSCC_9bus_mult_decoupled
needs: [profiling]
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@${{github.ref}}
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@main
with:
path: ./build/dpsim/examples/cxx/WSCC_9bus_mult_coupled
name: WSCC_9bus_mult_coupled
path: ./build/dpsim/examples/cxx/WSCC_9bus_mult_decoupled
name: WSCC_9bus_mult_decoupled

test-examples-3:
name: Test Examples 3/4
name: Test Examples 3/4 - EMT_WSCC_9bus_split_decoupled
needs: [profiling]
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@${{github.ref}}
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@main
with:
path: ./build/dpsim/examples/cxx/EMT_WSCC_9bus_split_decoupled
name: WSCC_9bus_split_decoupled
name: EMT_WSCC_9bus_split_decoupled

test-examples-4:
name: Test Examples 4/4
name: Test Examples 4/4 - DP_WSCC_9bus_split_decoupled
needs: [profiling]
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@${{github.ref}}
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@main
with:
path: ./build/dpsim/examples/cxx/DP_WSCC_9bus_split_decoupled
name: WSCC_9bus_split_decoupled
name: DP_WSCC_9bus_split_decoupled
6 changes: 4 additions & 2 deletions .github/workflows/build_test_windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Build & Test Windows

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

## Build ##

Expand Down Expand Up @@ -31,5 +32,6 @@ jobs:
cd ${{ github.workspace }}
cd build
git describe --tags --abbrev=0 --match "v*"
cmake -DWITH_PYBIND=OFF ..
# TODO: Remove '-DCMAKE_POLICY_VERSION_MINIMUM=3.5' once spdlog version has been bumped
cmake -DWITH_PYBIND=OFF -DCMAKE_POLICY_VERSION_MINIMUM="3.5" ..
cmake --build . --target dpsim --parallel
21 changes: 21 additions & 0 deletions .github/workflows/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
tags: sogno/dpsim:dev-rocky

create-docker-fedora-release:
needs: create-docker-fedora-dev
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -104,3 +105,23 @@ jobs:
push: true
tags: sogno/dpsim:manylinux

create-docker-binder:
needs: create-docker-fedora-dev
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_SECRET }}

- name: Build and push
id: docker_build_release
uses: docker/build-push-action@v5
with:
file: .binder/Dockerfile
push: true
tags: sogno/dpsim:binder
Loading
Loading