Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sogno-platform/pintura
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: release-v0.4.14
Choose a base ref
...
head repository: sogno-platform/pintura
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Aug 2, 2022

  1. Implement file saving for multipart zip

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Aug 2, 2022

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Czaki Grzegorz Bokota
    Copy the full SHA
    3720a5a View commit details
  2. Update version to 0.4.15

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Aug 2, 2022

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Czaki Grzegorz Bokota
    Copy the full SHA
    abd1c7d View commit details

Commits on Aug 8, 2022

  1. Remove some unused templates and code

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Aug 8, 2022
    Copy the full SHA
    e44683f View commit details
  2. Add svg tooltips for grid components

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Aug 8, 2022
    Copy the full SHA
    098dff9 View commit details
  3. Show component type at top of attribute menu

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Aug 8, 2022
    Copy the full SHA
    802b26f View commit details
  4. Handle 'about' attributes properly when saving multipart zip

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Aug 8, 2022
    Copy the full SHA
    5110ec2 View commit details
  5. Update version to 0.4.16

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Aug 8, 2022
    Copy the full SHA
    a192d77 View commit details

Commits on Jan 13, 2023

  1. Update npm version to 8.19.2

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 13, 2023
    Copy the full SHA
    62cc137 View commit details
  2. Fix cimmenu component list update

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 13, 2023
    Copy the full SHA
    8f4170b View commit details
  3. Fix terminal not following component

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 13, 2023
    Copy the full SHA
    8265f89 View commit details
  4. Improved ghost mode

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 13, 2023
    Copy the full SHA
    a1c5d57 View commit details
  5. Improve terminal naming scheme

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 13, 2023
    Copy the full SHA
    7fe62e5 View commit details
  6. Remove package-lock

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 13, 2023
    Copy the full SHA
    b34aa82 View commit details
  7. Update version to 0.4.17

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 13, 2023
    Copy the full SHA
    842e3b8 View commit details
  8. Removed test/grid-data submodule

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 13, 2023
    Copy the full SHA
    361b19b View commit details
  9. Remove stray reference in Dockerfile.dev

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 13, 2023
    Copy the full SHA
    ea6eb21 View commit details

Commits on Jan 16, 2023

  1. Add gh_pages build workflow

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 16, 2023
    Copy the full SHA
    7a7471d View commit details
  2. Get small example working again and remove some unused code

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 16, 2023
    Copy the full SHA
    e256458 View commit details
  3. Update version to 0.4.18

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 16, 2023
    Copy the full SHA
    ee26593 View commit details

Commits on Jan 24, 2023

  1. Add the user manual

    Signed-off-by: Richard Marston <rmarston@eonerc.rwth-aachen.de>
    richardmarston committed Jan 24, 2023
    Copy the full SHA
    529ee69 View commit details

Commits on Jan 25, 2023

  1. Add reference paper

    Signed-off-by: Jan Dinkelbach <jdinkelbach@eonerc.rwth-aachen.de>
    dinkelbachjan committed Jan 25, 2023
    Copy the full SHA
    d71b7ce View commit details
  2. Merge pull request #57 from sogno-platform/update-docu

    Add reference paper
    dinkelbachjan authored Jan 25, 2023
    Copy the full SHA
    95e87dd View commit details

Commits on Apr 19, 2024

  1. update docker repo

    Signed-off-by: Markus Mirz <markus.mirz@rwth-aachen.de>
    m-mirz committed Apr 19, 2024
    Copy the full SHA
    ac4fafb View commit details
  2. Merge pull request #60 from sogno-platform/update-docker-repo

    This removes all references to the deprecated docker repo.
    m-mirz authored Apr 19, 2024
    Copy the full SHA
    61fb2a9 View commit details
Showing 614 changed files with 7,197 additions and 21,826 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*/node_modules
**/node_modules
node_modules
cimmenu/cgmes/cgmesIndex.js
35 changes: 35 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
push:
branches: [ master ]

env:
CARGO_TERM_COLOR: always

jobs:
build-website:

runs-on: ubuntu-latest
name: Build website
steps:
- name: git-checkout
uses: actions/checkout@v2

- name: Install npm packages
run: npm install

- name: Create libraries
run: npm run build

- name: Create website
run: |
mkdir html
cp -r index.html dist html
- name: Push
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: dist
FOLDER: html
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to get a token
MESSAGE: "Build gh pages website: ({sha}) {msg}"
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ jobs:
package:
strategy:
matrix:
node-version: [14.x]
node-version: [16.x]
runs-on: ubuntu-latest
name: A job to build the packages
steps:
@@ -80,7 +80,7 @@ jobs:
- name: Build Docker
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_HUB_NAME }}
password: ${{ secrets.DOCKER_HUB_PASS }}
repository: rwthacs/pintura
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_SECRET }}
repository: sogno/pintura
tags: latest, ${{ steps.version.outputs.VERSION }}
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variables:
DOCKER_TAG: ${CI_COMMIT_REF_NAME}
DOCKER_IMAGE: rwthacs/pintura
DOCKER_IMAGE: sogno/pintura

before_script:
- git submodule sync --recursive
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -5,13 +5,10 @@ COPY images /pintura/images
COPY test/ /pintura/test
COPY cimmenu /pintura/cimmenu
COPY cimsvg /pintura/cimsvg
COPY index.html Makefile package-lock.json package.json /pintura/
COPY index.html Makefile package.json /pintura/

WORKDIR /pintura
RUN rm -rf node_modules
RUN rm -rf cimsvg/node_modules
RUN rm -rf cimmenu/node_modules
RUN npm install -g npm@8.14.0
RUN npm install -g npm@8.19.2
RUN npm run build

FROM nginx
8 changes: 3 additions & 5 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -5,13 +5,10 @@ COPY images /pintura/images
COPY test/ /pintura/test
COPY cimmenu /pintura/cimmenu
COPY cimsvg /pintura/cimsvg
COPY index.html Makefile package-lock.json package.json /pintura/
COPY index.html Makefile package.json /pintura/

WORKDIR /pintura
RUN rm -rf node_modules
RUN rm -rf cimsvg/node_modules
RUN rm -rf cimmenu/node_modules
RUN npm install -g npm@8.14.0
RUN npm install -g npm@8.19.2
RUN npm run build-dev

FROM nginx
@@ -24,6 +21,7 @@ COPY --from=builder /pintura/dist /usr/share/nginx/html/dist/
COPY --from=builder /pintura/index.html /usr/share/nginx/html/

COPY example/example.zip /usr/share/nginx/html/example.zip
COPY example/index.html /usr/share/nginx/html/example.html

ARG GIT_COMMIT
LABEL \
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
#
###################################################################################

DOCKER_IMAGE=rwthacs/pintura
DOCKER_IMAGE=sogno/pintura
DOCKER_OPTS?=--rm

TEMPLATE_DIR=generated
@@ -33,6 +33,7 @@ dev: cimsvg cimmenu

docker: cimsvg cimmenu
docker build \
--no-cache \
--tag $(DOCKER_IMAGE) \
--iidfile $@ \
--build-arg GIT_COMMIT=git[${GIT_COMMIT}] \
70 changes: 49 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,63 @@
# Pintura

## Running in nginx server mode
## What does it do?

Pintura can make a graphical representation of CIM-formatted power grid models.
Creation, editing and exporting of the CIM files is possible.
Part of Pintura (libcimsvg) can be used as a standalone library to generate an SVG
representation of a CIM power network.

### Install Docker
## Will my data get uploaded somewhere?

```bash
$ sudo apt-get update
$ sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
$ sudo apt-get update
$ sudo apt-get install -y docker-ce
$ sudo usermod -aG docker $USER
$ exit # You have to log out and back in to apply the group change in the previous step
```
No. Pintura code only runs locally in the browser and data is all handled locally. You can save to an external
link, but then you will have to arrange access to a server to upload it to and actively cause it to happen.

### Build Docker image
## How can I use Pintura myself?

```bash
$ make
```
There is an online demo available here: https://sogno.energy/pintura

## How can I run it on my own computer?

### Start it up
#### This is easy if you have docker and make installed on your computer

```bash
$ make start
$ make && make start
```

## Developer notes
After the scripts have finished running, they will tell you the url from which you can access Pintura.

## How do I do anything with it?

The user manual is [here.](docs/Manual.md)

## How can I add support for a new component?

This process is fairly simple and is documented [here.](docs/AddingComponent.md)

## I just want to show the picture. How do I use libcimsvg without all the menus and stuff?

This is described in more detail [here.](docs/UsingLibcimsvg.md)

## How does it work?

There is information for developers [here.](docs/Development.md)

## Known problems

* Refreshing the browser loses your work
* There is no undo button
* If you change the unique identifier for a component, it will lose track of it
* It should be possible to specify a subclass as the value for an attribute. It would be possible
to select it, but there is no way to add the component.
* If you haven't added a diagram, you can't start adding components
* There's no way to remove a diagram once it has been added

## Publications

If you are using Pintura for your research, please cite the following paper in your publications:

Dinkelbach, J., Razik, L., Mirz, M., Benigni, A., Monti, A.: Template-based generation of programming language specific code for smart grid modelling compliant with CIM and CGMES.
J. Eng. 2023, 1–13 (2022). [https://doi.org/10.1049/tje2.12208](https://doi.org/10.1049/tje2.12208)

### Cimmenu

#### Cimgen

4 changes: 2 additions & 2 deletions cimmenu/cgmes/createCgmesIndex.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fg = require("fast-glob");
const path = require("path");
import fg from "fast-glob";
import path from "path";
const stream = fg.stream([ "./src/*.js" ]);
const entries = [];

25 changes: 24 additions & 1 deletion cimmenu/cgmes/src/ACDCConverter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import templates from "../../templates/index.js"
import ConductingEquipment from "./ConductingEquipment.js"
import common from "../../src/common.js"
import CGMESProfile from "./CGMESProfile.js"


class ACDCConverter extends ConductingEquipment {

@@ -369,6 +371,27 @@ class ACDCConverter extends ConductingEquipment {
return attributeEntries;
}

static possibleProfileList = {'class': [CGMESProfile.shortNames.EQ, CGMESProfile.shortNames.SSH, CGMESProfile.shortNames.SV, ],
'baseS': [CGMESProfile.shortNames.EQ, ],
'idleLoss': [CGMESProfile.shortNames.EQ, ],
'maxUdc': [CGMESProfile.shortNames.EQ, ],
'minUdc': [CGMESProfile.shortNames.EQ, ],
'numberOfValves': [CGMESProfile.shortNames.EQ, ],
'ratedUdc': [CGMESProfile.shortNames.EQ, ],
'resistiveLoss': [CGMESProfile.shortNames.EQ, ],
'switchingLoss': [CGMESProfile.shortNames.EQ, ],
'valveU0': [CGMESProfile.shortNames.EQ, ],
'PccTerminal': [CGMESProfile.shortNames.EQ, ],
'p': [CGMESProfile.shortNames.SSH, ],
'q': [CGMESProfile.shortNames.SSH, ],
'targetPpcc': [CGMESProfile.shortNames.SSH, ],
'targetUdc': [CGMESProfile.shortNames.SSH, ],
'idc': [CGMESProfile.shortNames.SV, ],
'poleLossP': [CGMESProfile.shortNames.SV, ],
'uc': [CGMESProfile.shortNames.SV, ],
'udc': [CGMESProfile.shortNames.SV, ],
}

static isMemberAttribute(attribute) {
let attributes = [
"cim:ACDCConverter.baseS",
@@ -406,7 +429,7 @@ class ACDCConverter extends ConductingEquipment {

static read(object) {
Object.keys(object).forEach((attribute) => {
if (!ACDCConverter.isMemberAttribute(attribute)) {
if (!ACDCConverter.isMemberAttribute(attribute) && !(attribute == "about")) {
console.error("Unexpected attribute for class ACDCConverter: ", attribute, " with value: ", object[attribute])
}
});
9 changes: 8 additions & 1 deletion cimmenu/cgmes/src/ACDCConverterDCTerminal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import templates from "../../templates/index.js"
import DCBaseTerminal from "./DCBaseTerminal.js"
import common from "../../src/common.js"
import CGMESProfile from "./CGMESProfile.js"


class ACDCConverterDCTerminal extends DCBaseTerminal {

@@ -49,6 +51,11 @@ class ACDCConverterDCTerminal extends DCBaseTerminal {
return attributeEntries;
}

static possibleProfileList = {'class': [CGMESProfile.shortNames.EQ, CGMESProfile.shortNames.SSH, CGMESProfile.shortNames.TP, ],
'DCConductingEquipment': [CGMESProfile.shortNames.EQ, ],
'polarity': [CGMESProfile.shortNames.EQ, ],
}

static isMemberAttribute(attribute) {
let attributes = [
"cim:ACDCConverterDCTerminal.DCConductingEquipment",
@@ -70,7 +77,7 @@ class ACDCConverterDCTerminal extends DCBaseTerminal {

static read(object) {
Object.keys(object).forEach((attribute) => {
if (!ACDCConverterDCTerminal.isMemberAttribute(attribute)) {
if (!ACDCConverterDCTerminal.isMemberAttribute(attribute) && !(attribute == "about")) {
console.error("Unexpected attribute for class ACDCConverterDCTerminal: ", attribute, " with value: ", object[attribute])
}
});
11 changes: 10 additions & 1 deletion cimmenu/cgmes/src/ACDCTerminal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import templates from "../../templates/index.js"
import IdentifiedObject from "./IdentifiedObject.js"
import common from "../../src/common.js"
import CGMESProfile from "./CGMESProfile.js"


class ACDCTerminal extends IdentifiedObject {

@@ -89,6 +91,13 @@ class ACDCTerminal extends IdentifiedObject {
return attributeEntries;
}

static possibleProfileList = {'class': [CGMESProfile.shortNames.EQ, CGMESProfile.shortNames.SSH, CGMESProfile.shortNames.SV, CGMESProfile.shortNames.DY, CGMESProfile.shortNames.TP, ],
'BusNameMarker': [CGMESProfile.shortNames.EQ, ],
'sequenceNumber': [CGMESProfile.shortNames.EQ, ],
'Measurements': [CGMESProfile.shortNames.EQ, ],
'connected': [CGMESProfile.shortNames.SSH, ],
}

static isMemberAttribute(attribute) {
let attributes = [
"cim:ACDCTerminal.BusNameMarker",
@@ -112,7 +121,7 @@ class ACDCTerminal extends IdentifiedObject {

static read(object) {
Object.keys(object).forEach((attribute) => {
if (!ACDCTerminal.isMemberAttribute(attribute)) {
if (!ACDCTerminal.isMemberAttribute(attribute) && !(attribute == "about")) {
console.error("Unexpected attribute for class ACDCTerminal: ", attribute, " with value: ", object[attribute])
}
});
16 changes: 15 additions & 1 deletion cimmenu/cgmes/src/ACLineSegment.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import templates from "../../templates/index.js"
import Conductor from "./Conductor.js"
import common from "../../src/common.js"
import CGMESProfile from "./CGMESProfile.js"


class ACLineSegment extends Conductor {

@@ -189,6 +191,18 @@ class ACLineSegment extends Conductor {
return attributeEntries;
}

static possibleProfileList = {'class': [CGMESProfile.shortNames.EQ, ],
'bch': [CGMESProfile.shortNames.EQ, ],
'gch': [CGMESProfile.shortNames.EQ, ],
'r': [CGMESProfile.shortNames.EQ, ],
'x': [CGMESProfile.shortNames.EQ, ],
'b0ch': [CGMESProfile.shortNames.EQ, ],
'g0ch': [CGMESProfile.shortNames.EQ, ],
'r0': [CGMESProfile.shortNames.EQ, ],
'shortCircuitEndTemperature': [CGMESProfile.shortNames.EQ, ],
'x0': [CGMESProfile.shortNames.EQ, ],
}

static isMemberAttribute(attribute) {
let attributes = [
"cim:ACLineSegment.bch",
@@ -217,7 +231,7 @@ class ACLineSegment extends Conductor {

static read(object) {
Object.keys(object).forEach((attribute) => {
if (!ACLineSegment.isMemberAttribute(attribute)) {
if (!ACLineSegment.isMemberAttribute(attribute) && !(attribute == "about")) {
console.error("Unexpected attribute for class ACLineSegment: ", attribute, " with value: ", object[attribute])
}
});
8 changes: 7 additions & 1 deletion cimmenu/cgmes/src/Accumulator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import templates from "../../templates/index.js"
import Measurement from "./Measurement.js"
import common from "../../src/common.js"
import CGMESProfile from "./CGMESProfile.js"


class Accumulator extends Measurement {

@@ -29,6 +31,10 @@ class Accumulator extends Measurement {
return attributeEntries;
}

static possibleProfileList = {'class': [CGMESProfile.shortNames.EQ, ],
'AccumulatorValues': [CGMESProfile.shortNames.EQ, ],
}

static isMemberAttribute(attribute) {
let attributes = [
"cim:Accumulator.AccumulatorValues",
@@ -49,7 +55,7 @@ class Accumulator extends Measurement {

static read(object) {
Object.keys(object).forEach((attribute) => {
if (!Accumulator.isMemberAttribute(attribute)) {
if (!Accumulator.isMemberAttribute(attribute) && !(attribute == "about")) {
console.error("Unexpected attribute for class Accumulator: ", attribute, " with value: ", object[attribute])
}
});
Loading