5 Commits

Author SHA1 Message Date
a8ef82166c upd publish action 2026-02-27 20:59:25 +00:00
79f06ecc79 add ruff+publish workflows 2026-02-27 20:57:54 +00:00
b291c3a477 minor version bump 2026-02-27 20:36:54 +00:00
c335d35b9f fix config extends section 2026-02-27 20:16:04 +00:00
911d2f64a6 import abc namespace 2026-02-08 09:09:59 +00:00
11 changed files with 98 additions and 19 deletions

53
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: Publish to PyPI
on:
release:
types: [published]
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Poetry
run: |
pip install poetry==2.3.1
poetry --version
- name: Build package
run: |
poetry install --only-root
poetry build
- uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist
pypi-publish:
needs: build
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/vban-cmd/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: ./dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./dist

19
.github/workflows/ruff.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Ruff
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/ruff-action@v3
with:
args: 'format --check --diff'

View File

@@ -11,6 +11,13 @@ Before any major/minor/patch bump all unit tests will be run to verify they pass
- [x] - [x]
## [2.6.0] - 2026-02-26
### Added
- support for packet with [ident:1](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/3be2c1c36563afbd6df3da8436406c77d2cc1f10/VoicemeeterRemote.h#L982) in VBAN TEXT subprotocol.
- This includes Strip 3D, PEQ, comp, gate, denoiser and pitch parameters.
## [2.5.2] - 2025-01-25 ## [2.5.2] - 2025-01-25
### Changed ### Changed

View File

@@ -421,8 +421,8 @@ You just need to define a key `extends` in the config TOML, that names the confi
Three example 'extender' configs are included with the repo. You may load them with: Three example 'extender' configs are included with the repo. You may load them with:
```python ```python
import voicemeeterlib import vban_cmd
with voicemeeterlib.api('banana') as vm: with vban_cmd.api('banana') as vm:
vm.apply_config('extender') vm.apply_config('extender')
``` ```

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "vban-cmd" name = "vban-cmd"
version = "2.5.2" version = "2.6.0"
description = "Python interface for the VBAN RT Packet Service (Sendtext)" description = "Python interface for the VBAN RT Packet Service (Sendtext)"
authors = [{ name = "Onyx and Iris", email = "code@onyxandiris.online" }] authors = [{ name = "Onyx and Iris", email = "code@onyxandiris.online" }]
license = { text = "MIT" } license = { text = "MIT" }

View File

@@ -1,5 +1,5 @@
import abc
import time import time
from abc import abstractmethod
from typing import Union from typing import Union
from .enums import NBS, BusModes from .enums import NBS, BusModes
@@ -14,7 +14,7 @@ class Bus(IRemote):
Defines concrete implementation for bus Defines concrete implementation for bus
""" """
@abstractmethod @abc.abstractmethod
def __str__(self): def __str__(self):
pass pass

View File

@@ -1,5 +1,5 @@
import abc
import logging import logging
from abc import abstractmethod
from enum import IntEnum from enum import IntEnum
from functools import cached_property from functools import cached_property
from typing import Iterable from typing import Iterable
@@ -115,7 +115,7 @@ class FactoryBase(VbanCmd):
) )
@property @property
@abstractmethod @abc.abstractmethod
def steps(self): def steps(self):
pass pass

View File

@@ -1,6 +1,6 @@
import abc
import logging import logging
import time import time
from abc import ABCMeta, abstractmethod
from dataclasses import dataclass from dataclasses import dataclass
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@@ -78,7 +78,7 @@ class Modes:
) )
class IRemote(metaclass=ABCMeta): class IRemote(abc.ABC):
""" """
Common interface between base class and extended (higher) classes Common interface between base class and extended (higher) classes
@@ -111,7 +111,7 @@ class IRemote(metaclass=ABCMeta):
return ''.join(cmd) return ''.join(cmd)
@property @property
@abstractmethod @abc.abstractmethod
def identifier(self): def identifier(self):
pass pass

View File

@@ -1,5 +1,5 @@
import abc
import time import time
from abc import abstractmethod
from typing import Union from typing import Union
from . import kinds from . import kinds
@@ -21,7 +21,7 @@ class Strip(IRemote):
Defines concrete implementation for strip Defines concrete implementation for strip
""" """
@abstractmethod @abc.abstractmethod
def __str__(self): def __str__(self):
pass pass

View File

@@ -1,4 +1,4 @@
from abc import abstractmethod import abc
from . import kinds from . import kinds
from .iremote import IRemote from .iremote import IRemote
@@ -11,7 +11,7 @@ class VbanStream(IRemote):
Defines concrete implementation for vban stream Defines concrete implementation for vban stream
""" """
@abstractmethod @abc.abstractmethod
def __str__(self): def __str__(self):
pass pass

View File

@@ -1,8 +1,8 @@
import abc
import logging import logging
import socket import socket
import threading import threading
import time import time
from abc import ABCMeta, abstractmethod
from pathlib import Path from pathlib import Path
from queue import Queue from queue import Queue
from typing import Iterable, Union from typing import Iterable, Union
@@ -18,8 +18,8 @@ from .worker import Producer, Subscriber, Updater
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class VbanCmd(metaclass=ABCMeta): class VbanCmd(abc.ABC):
"""Base class responsible for communicating with the VBAN RT Packet Service""" """Abstract Base Class for Voicemeeter VBAN Command Interfaces"""
DELAY = 0.001 DELAY = 0.001
# fmt: off # fmt: off
@@ -49,7 +49,7 @@ class VbanCmd(metaclass=ABCMeta):
self.stop_event = None self.stop_event = None
self.producer = None self.producer = None
@abstractmethod @abc.abstractmethod
def __str__(self): def __str__(self):
"""Ensure subclasses override str magic method""" """Ensure subclasses override str magic method"""
pass pass
@@ -58,7 +58,7 @@ class VbanCmd(metaclass=ABCMeta):
try: try:
import tomllib import tomllib
except ModuleNotFoundError: except ModuleNotFoundError:
import tomli as tomllib import tomli as tomllib # type: ignore[import]
def get_filepath(): def get_filepath():
for pn in ( for pn in (