Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ test:python:
script:
- cd python
- pytest --verbose .
- black --extend-exclude=".*(\\.pyi|_pb2.py)$" --check .
- flake8 --extend-exclude="*.pyi,*_pb2.py" .
- black --line-length=90 --extend-exclude=".*(\\.pyi|_pb2.py)$" --check .
- flake8 --max-line-length=90 --extend-exclude="*.pyi,*_pb2.py" .
- mypy .
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
needs:
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ repos:
hooks:
- id: black-jupyter
exclude: .*_pb2.pyi?$
args:
- --line-length=90

- repo: https://github.com/pycqa/flake8
rev: "7.3.0"
hooks:
- id: flake8
exclude: .*_pb2.pyi?$
args:
- --max-line-length=90

- repo: https://github.com/markdownlint/markdownlint
rev: "v0.13.0"
Expand Down
11 changes: 9 additions & 2 deletions clients/python/client.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# -*- coding: utf-8 -*-
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of
# Complex Power Systems, RWTH Aachen University
# SPDX-License-Identifier: Apache-2.0

import villas_pb2
import time, socket, errno, sys, os, signal
import time
import socket
import errno
import sys
import os
import signal

layer = sys.argv[1] if len(sys.argv) == 2 else "udp"

Expand Down Expand Up @@ -50,6 +56,7 @@

# Gracefully shutdown
def sighandler(signum, frame):
global running
running = False


Expand Down
10 changes: 5 additions & 5 deletions etc/examples/nodes/opal_orchestra.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nodes = {
domain1 = {
type = "opal.orchestra"

# Path to the OPAL-RT Orchestra Data Defintion XML file (DDF).
# Path to the OPAL-RT Orchestra Data Definition XML file (DDF).
ddf = "orchestra.xml"

# Enable to overwrite the DDF file.
Expand Down Expand Up @@ -45,12 +45,12 @@ nodes = {

# For 'local'
extcomm = "udp";
addr_framework = "10.168.13.5";
addr_framework = "127.0.0.1";
port_framework = 10000
core_framework = 0
core_client = 0
nic_framework = "eno2"
nic_client = "eno1"
nic_framework = "eth0"
nic_client = "eth0"

# For 'remote'
card = "test"
Expand Down Expand Up @@ -92,7 +92,7 @@ nodes = {

out = {
signals = (
{ name="pub_signal_float", init = 1.2, orchestra_name = "sub_signal_float", type = "float" }
{ name="sub_signal_float", init = 1.2, orchestra_name = "sub_signal_float", type = "float" }
)
}
}
Expand Down
8 changes: 6 additions & 2 deletions etc/python/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
villas node <(python3 etc/python/example.py)

Author: Steffen Vogel <post@steffenvogel.de>
SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
SPDX-FileCopyrightText: 2014-2023 Institute for Automation of
Complex Power Systems, RWTH Aachen University
SPDX-License-Identifier: Apache-2.0
"""

Expand Down Expand Up @@ -38,7 +39,10 @@
"type": "socket",
"layer": "udp",
"format": "protobuf",
"in": {"address": "*:12000", "signals": [{"name": "in", "type": "float"}]},
"in": {
"address": "*:12000",
"signals": [{"name": "in", "type": "float"}],
},
"out": {"address": f"5.6.7.8:{port}"},
}

Expand Down
14 changes: 11 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,13 @@

# Cross-compiled packages

villas-node-x86_64-linux = if pkgs.system == "x86_64-linux" then pkgs.villas-node else pkgs.pkgsCross.x86_64-linux.villas-node;
villas-node-aarch64-linux = if pkgs.system == "aarch64-linux" then pkgs.villas-node else pkgs.pkgsCross.aarch64-multiplatform.villas-node;
villas-node-x86_64-linux =
if pkgs.system == "x86_64-linux" then pkgs.villas-node else pkgs.pkgsCross.x86_64-linux.villas-node;
villas-node-aarch64-linux =
if pkgs.system == "aarch64-linux" then
pkgs.villas-node
else
pkgs.pkgsCross.aarch64-multiplatform.villas-node;

dockerImage-x86_64-linux = pkgs.dockerTools.buildLayeredImage {
name = "villas-node";
Expand Down Expand Up @@ -206,7 +211,10 @@

villas = {
imports = [ (nixDir + "/module.nix") ];
nixpkgs.overlays = [ self.overlays.default self.overlays.patches ];
nixpkgs.overlays = [
self.overlays.default
self.overlays.patches
];
};
};
};
Expand Down
77 changes: 0 additions & 77 deletions include/villas/nodes/example.hpp

This file was deleted.

Loading