-
Notifications
You must be signed in to change notification settings - Fork 40
Labels
featureNew feature or requestNew feature or request
Description
This is the parent issue for the Hackathons planned for the 2025-05-21 PGM meet-up.
Please register via the event page if you are interested in joining. While most of the hackathon topics will be in-person only, we will facilitate some topics that can be attended remotely.
Contribution to PGM
Prerequisites
- A GitHub account
- Git with the correct username and e-mail set up (see also https://docs.github.com/en/get-started/git-basics/setting-your-username-in-git#setting-your-git-username-for-every-repository-on-your-computer)
Setup
- Create a personal fork of the power-grid-model
- Select one person who will create the fork with a GitHub account
- Go to the repository home page
- Create the fork using the
Fork
button.
- Go to the fork you just created and clone/checkout the repository in your development environment (see also https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).
- Create a development branch in your own development environment and open the project in your favorite IDE. We recommend a branch name like
hackathon-2025/your-hackathon-topic
- If you use Visual Studio Code, you may want to install the recommended extensions for an optimal experience.*
- Recommended: try to set-up
pre-commit
and install it usingpre-commit --install
in your local git repository. This will help you pass CI by doing things like formatting for you.
C++ topics
Prerequisites
Please try to set this up before the meet-up starts. If you encounter any issues: no worries, please comment on this issue and we can try to resolve it remotely. Otherwise, we can see what we can do during the meet-up.
- Basic C++ knowledge
- A laptop (or other development environment) with sufficient permissions and/or admin rights with a supported architecture. An example setup is available for Windows, Ubuntu/Debian or macOS (see below).
- A working and recent version of one of the major compilers (GCC, Clang, MSVC, Clang-CL or XCode/Apple Clang; see also the compiler support documentation for supported versions)
- A recent CMake version (
>= 3.23
) and Ninja- Visual Studio / Visual Studio Build Tools users can also install these using the Visual Studio installer.
- The C++ build dependencies
- It is recommended to follow the example set-ups for Ubuntu, Windows or macOS, respectively.
- Otherwise, please try to set up the C++ build dependencies yourself.
Setup
- Build the CMake project and run the tests (see below for tips where needed)
- Select a build preset of your choice (please note that you use a preset for your selected compiler).
- Configure, build and install.
- Run CTest.
- If all tests pass, you are now completely set up! 🚀
Python API topics
Prerequisites
- Python
- Basic Python knowledge
Setup
- Prerequisites for C++ topics is needed for windows systems. (It can be bypassed by a way mentioned below.)
- Navigate to the repository directory, create a virtual environment, and activate it, install package in development mode and run pytest to verify:
cd path/to/power-grid-model
python -m venv .venv
.venv\Scripts\activate # source ./.venv/bin/activate
pip install -e .[dev]
pytest
Development with python API without building C++ core.
Following is a way to provide PGM core manually instead of building it locally while installing python package in editable mode.
- Install package using
POWER_GRID_MODEL_NO_BINARY_BUILD=1
with this extra environment variable. Rest all commands stay the same. Hence for windows,
set POWER_GRID_MODEL_NO_BINARY_BUILD=1
pip install -e .[dev]
and for WSL/Linux/mac:
POWER_GRID_MODEL_NO_BINARY_BUILD=1 pip install -e .[dev]
- Download relevant wheel file from https://github.com/PowerGridModel/power-grid-model/releases. Make sure to only use one from trusted place like the official release via PGM's github.
- Extract the PGM core and copy it to the relevant directory, you can use python to do it
python -m zipfile --extract "path_to_wheel_file\pgm_wheel_file_name.whl" "directory\to\extract"
- Copy (
\_core\_power_grid_core.so
for WSL/linux/mac and\_core\_power_grid_core.dll
for windows) from the extracted wheel file intosrc/power_grid_model/_core
.
Sub-issues
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or request
Type
Projects
Status
Q2 2025