Skip to content

Commit

Permalink
bump versions of actions, add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
3ll3d00d committed Feb 11, 2024
1 parent 11d1b66 commit 111a6d6
Show file tree
Hide file tree
Showing 21 changed files with 246 additions and 44 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/create-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Poetry
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
needs: create_release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use node.js lts
uses: actions/setup-node@v3
with:
Expand All @@ -78,7 +78,7 @@ jobs:
run: |
echo ${{ steps.get_version.outputs.version-without-v }} > ezbeq/VERSION
- name: Set up Python 3.9
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Poetry
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
os: [ macos-latest, windows-latest ]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use node.js lts
uses: actions/setup-node@v3
with:
Expand All @@ -138,7 +138,7 @@ jobs:
run: |
echo ${{ steps.get_version.outputs.version-without-v }} > ezbeq/VERSION
- name: Set up Python 3.9
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Poetry
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Poetry
Expand Down
10 changes: 10 additions & 0 deletions examples/ezbeq_10x10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
cmdTimeout: 10
exe: minidsp
options: ''
type: minidsp
device_type: 10x10
port: 8080
28 changes: 28 additions & 0 deletions examples/ezbeq_10x10_custom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
cmdTimeout: 10
exe: minidsp
options: ''
type: minidsp
descriptor:
name: 10x10
fs: 48000
routes:
- side: input
channels:
- 0
- 1
- 2
- 3
biquads: 6
- side: output
channels:
- 0
biquads: 6
beq:
- 3
- 4
- 5
port: 8080
11 changes: 11 additions & 0 deletions examples/ezbeq_10x10_xo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
cmdTimeout: 10
exe: minidsp
options: ''
type: minidsp
device_type: 10x10
use_xo: true
port: 8080
27 changes: 27 additions & 0 deletions examples/ezbeq_2x4_custom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
cmdTimeout: 10
exe: minidsp
options: ''
type: minidsp
wsDeviceId: 1
descriptor:
name: 2x4
fs: 96000
routes:
- name: input
biquads: 10
channels: [0]
slots: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- name: crossover
biquads: 4
channels: [0, 1, 2, 3]
slots: []
groups: [0, 1]
- name: output
biquads: 10
channels: [0, 1, 2, 3]
slots: []
port: 8080
10 changes: 10 additions & 0 deletions examples/ezbeq_4x10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
cmdTimeout: 10
exe: minidsp
options: ''
type: minidsp
device_type: 4x10
port: 8080
10 changes: 10 additions & 0 deletions examples/ezbeq_cdsp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
channels:
- 0
ip: 127.0.0.1
port: 5432
type: camilladsp
port: 8080
10 changes: 10 additions & 0 deletions examples/ezbeq_ddrc24.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
cmdTimeout: 10
exe: minidsp
options: ''
type: minidsp
device_type: DDRC24
port: 8080
19 changes: 19 additions & 0 deletions examples/ezbeq_ddrc88.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
cmdTimeout: 10
exe: minidsp
options: ''
type: minidsp
device_type: DDRC88
sw_channels:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
port: 8080
11 changes: 11 additions & 0 deletions examples/ezbeq_htp1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
channels:
- sub1
- sub2
ip: 127.0.0.1:1880
type: htp1
autoclear: true
port: 8080
15 changes: 15 additions & 0 deletions examples/ezbeq_mc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
address: 127.0.0.29:63412
auth:
pass: mypass
user: myuser
block: 2
channels:
- SL
- SW
type: jriver
zone: Player
port: 8080
9 changes: 9 additions & 0 deletions examples/ezbeq_md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
cmdTimeout: 10
exe: minidsp
options: ''
type: minidsp
port: 8080
16 changes: 16 additions & 0 deletions examples/ezbeq_md2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
accessLogging: false
debugLogging: false
devices:
dsp1:
cmdTimeout: 10
exe: minidsp
options: '--tcp 127.0.0.1:5333'
type: minidsp
wsDeviceId: 0
dsp2:
cmdTimeout: 10
exe: minidsp
options: '--tcp 127.0.0.1:5334'
type: minidsp
wsDeviceId: 1
port: 8080
36 changes: 36 additions & 0 deletions examples/ezbeq_multi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
accessLogging: false
debugLogging: true
devices:
cinema:
address: 127.0.0.29:63412
auth:
pass: mypass
user: myuser
block: 2
channels:
- SL
- SW
type: jriver
zone: Films
games:
address: 127.0.0.17:52199
auth:
pass: mypass
user: myuser
block: 2
channels:
- SW
type: jriver
zone: Player
proc:
channels:
- sub1
- sub2
ip: 127.0.0.1:1880
type: htp1
tactile:
cmdTimeout: 10
exe: minidsp
options: ''
type: minidsp
port: 8080
15 changes: 15 additions & 0 deletions examples/ezbeq_qsys.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
ip: 127.0.0.17
port: 1710
content_info:
- BEQ_Text:
text.1: filters
text.2: title
text.3: overview
text.4: mv_adjust
type: qsys
zone: Player
port: 8080
10 changes: 10 additions & 0 deletions examples/ezbeq_shd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
accessLogging: false
debugLogging: true
devices:
dsp1:
cmdTimeout: 10
exe: minidsp
options: ''
type: minidsp
device_type: SHD
port: 8080
26 changes: 0 additions & 26 deletions ezbeq/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ def __init__(self, name, default_port=8080, beqcatalogue_url='https://raw.github
self._name = name
self.logger = logging.getLogger(name + '.config')
self.config = self.load_config()
self.icon_path = self.config.get('iconPath')
self.__hostname = self.config.get('host', self.default_hostname)
self.__port = self.config.get('port', default_port)
self.__enable_metrics = self.config.get('metrics', False)
self.__service_url = f"http://{self.hostname}:{self.port}"
self.__beqcatalogue_url = beqcatalogue_url
self.__catalogue_refresh_interval = self.config.get('catalogueRefreshSeconds', 300.0)
if 'catalogueUrl' in self.config:
Expand Down Expand Up @@ -52,11 +49,6 @@ def beqcatalogue_url(self) -> str:
def catalogue_refresh_interval(self) -> float:
return self.__catalogue_refresh_interval

@property
def default_hostname(self):
import socket
return socket.getfqdn()

@property
def is_debug_logging(self):
"""
Expand All @@ -71,27 +63,13 @@ def is_access_logging(self):
"""
return self.config.get('accessLogging', False)

@property
def hostname(self):
"""
:return: the host the device is running on, defaults to that found by a call to socket.getfqdn()
"""
return self.__hostname

@property
def port(self):
"""
:return: the port to listen on, defaults to 8080
"""
return self.__port

@property
def service_url(self):
"""
:return: the address on which this service is listening.
"""
return self.__service_url

@property
def ignore_retcode(self):
return self.config.get('ignoreRetcode', False)
Expand Down Expand Up @@ -138,14 +116,10 @@ def load_default_config(self):
Creates a default config bundle.
:return: the bundle.
"""
from pathlib import Path
return {
'debug': True,
'debugLogging': True,
'accessLogging': False,
'port': 8080,
'host': self.default_hostname,
'iconPath': str(Path.home()),
'devices': {
'master': {
'type': 'minidsp',
Expand Down
3 changes: 0 additions & 3 deletions ezbeq/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ def __init__(self):
else:
logger.error(f'No UI available in {uiRoot}')
self.metrics = None
self.icons = static.File(cfg.icon_path)
ws_server.factory.startFactory()
self.ws_resource = WebSocketResource(ws_server.factory)

Expand All @@ -156,8 +155,6 @@ def getChild(self, path, request):
return self.wsgi
elif path == b'static':
return self.static
elif path == b'icons':
return self.icons
elif path == b'metrics' and cfg.enable_metrics:
from prometheus_client.twisted import MetricsResource
if not self.metrics:
Expand Down
Loading

0 comments on commit 111a6d6

Please sign in to comment.