add tox env for obs example

add headamp script to poe tasks
This commit is contained in:
Onyx and Iris 2025-01-15 10:22:46 +00:00
parent 7ede9b1ef3
commit 1ada889135
2 changed files with 16 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "xair-api" name = "xair-api"
version = "2.4.0" version = "2.4.1"
description = "Remote control Behringer X-Air | Midas MR mixers through OSC" description = "Remote control Behringer X-Air | Midas MR mixers through OSC"
authors = ["onyx-and-iris <code@onyxandiris.online>"] authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT" license = "MIT"
@ -29,6 +29,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poe.tasks] [tool.poe.tasks]
obs.script = "scripts:ex_obs" obs.script = "scripts:ex_obs"
sends.script = "scripts:ex_sends" sends.script = "scripts:ex_sends"
headamp.script = "scripts:ex_headamp"
xair.script = "scripts:test_xair" xair.script = "scripts:test_xair"
x32.script = "scripts:test_x32" x32.script = "scripts:test_x32"
all.script = "scripts:test_all" all.script = "scripts:test_all"
@ -44,6 +45,14 @@ allowlist_externals = poetry
commands = commands =
poetry install -v poetry install -v
poetry run pytest tests/ poetry run pytest tests/
[testenv:obs]
setenv = VIRTUALENV_DISCOVERY=pyenv
allowlist_externals = poetry
deps = obsws-python
commands =
poetry install -v --without dev
poetry run python examples/xair_obs/
""" """
[tool.ruff] [tool.ruff]

View File

@ -4,8 +4,7 @@ from pathlib import Path
def ex_obs(): def ex_obs():
path = Path.cwd() / "examples" / "xair_obs" / "." subprocess.run(["tox", "r", "-e", "obs"])
subprocess.run([sys.executable, str(path)])
def ex_sends(): def ex_sends():
@ -13,6 +12,11 @@ def ex_sends():
subprocess.run([sys.executable, str(path)]) subprocess.run([sys.executable, str(path)])
def ex_headamp():
path = Path.cwd() / "examples" / "headamp" / "."
subprocess.run([sys.executable, str(path)])
def test_xair(): def test_xair():
path = Path.cwd() / "tests" / "xair" path = Path.cwd() / "tests" / "xair"
subprocess.run(["pytest", "-v", str(path)]) subprocess.run(["pytest", "-v", str(path)])