Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
17646ea
Merge pull request #9 from OpenLightingProject/master
peternewman Jul 18, 2018
95748d4
Autoupdated manufacturer data
peternewman Jun 23, 2026
89d50fa
Merge branch 'OpenLightingProject:master' into master
peternewman Jun 27, 2026
7279223
Update CI tasks in test.yml
peternewman Jun 27, 2026
9b793c0
Update test workflow to install nose conditionally
peternewman Jun 27, 2026
28a7dc5
Switch to pynose for more modern Python
peternewman Jun 27, 2026
6530b0b
Change nosetests dependency to pynose in workflow
peternewman Jun 27, 2026
5c14373
Merge branch 'nosetests' of https://github.com/peternewman/rdm-app in…
peternewman Jun 27, 2026
2178e13
Python 2 and 3 compatible version of execfile
peternewman Jun 27, 2026
cd8b781
Python 2 and 3 compatible URL checking
peternewman Jun 28, 2026
c45cebb
Update some manufacturer links
peternewman Jun 28, 2026
494c3c8
Add additional links to HTTP error handling test
peternewman Jun 28, 2026
e945c8c
Merge pull request #16 from peternewman/master
peternewman Jun 28, 2026
6445fec
Add NXP link to manufacturer test case
peternewman Jun 28, 2026
4db2ae3
Update manufacturer URLs for accuracy
peternewman Jun 28, 2026
67cce8c
Update a few more manufacturer websites
peternewman Jun 29, 2026
fc0aeda
Add new link to skip during manufacturer test
peternewman Jun 30, 2026
6a20f21
Autoupdated manufacturer data
peternewman Jul 4, 2026
29eb495
Change assertion to allow response codes of 200 or 202
peternewman Jul 5, 2026
8f723d7
Update test.yml to install lintian conditionally
peternewman Jul 5, 2026
3d7a58a
Merge branch 'manufacturer-updates' of https://github.com/peternewman…
peternewman Jul 5, 2026
0897b21
Fix a syntax error
peternewman Jul 5, 2026
dfc61fd
Skip another URL
peternewman Jul 5, 2026
eed3831
Skip https://www.adamhall.com/ URL
peternewman Jul 5, 2026
cb11fcf
https://www.productionwarehouse.co.za/ is a different type of timeout…
peternewman Jul 5, 2026
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
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ jobs:
strategy:
fail-fast: false
matrix:
task: [data-check, codespell]
#spellintian, nosetests, karma, lint, closure-compiler,
task: [nosetests, data-check, codespell]
#spellintian, karma, lint, closure-compiler,
steps:
- uses: actions/checkout@master
- name: Install dependencies
env:
TASK: ${{ matrix.task }}
run: |
sudo apt-get update
if [ "$TASK" = "nosetests" ]; then pip install pynose; fi
if [ "$TASK" = "nosetests" -o "$TASK" = "flake8" -o "$TASK" = "flake8-wip" ]; then pip install json-spec; fi
if [ "$TASK" = "karma" -o "$TASK" = "lint" -o "$TASK" = "closure-compiler" ]; then npm install -g grunt-cli; fi
if [ "$TASK" = "karma" -o "$TASK" = "lint" -o "$TASK" = "closure-compiler" ]; then npm install; fi
Expand All @@ -23,9 +25,9 @@ jobs:
if [ "$TASK" = "pychecker" -o "$TASK" = "pychecker-wip" ]; then pip install http://sourceforge.net/projects/pychecker/files/pychecker/0.8.19/pychecker-0.8.19.tar.gz/download; fi
if [ "$TASK" = "codespell" ]; then pip install git+https://github.com/codespell-project/codespell.git; fi
#if [ "$TASK" = "codespell" ]; then pip install codespell; fi
if [ "$TASK" = "spellintian" ]; then sudo apt-get install lintian; fi
sudo apt-get install xvfb
sudo apt-get install libhtml-parser-perl
sudo apt-get install lintian
sudo apt-get install moreutils
- uses: codespell-project/codespell-problem-matcher@v1
- name: Test
Expand Down
3 changes: 2 additions & 1 deletion data/controller_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class TestControllerData(unittest.TestCase):
def setUp(self):
globals = {}
locals = {}
execfile("data/controller_data.py", globals, locals)
# Python 2 and 3 compatible version of execfile

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need Python2-compatibility in 2026 any more?

exec(open("data/controller_data.py").read(), globals, locals)
self.data = locals['CONTROLLER_DATA']

def test_ControllerData(self):
Expand Down
3 changes: 3 additions & 0 deletions data/manufacturer_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@
(0x0638, "ROLITECH LIMITED"),
(0x063A, "AVM Belgium BVBA"),
(0x063C, "LaserNet"),
(0x0642, "RavLight"),
(0x0644, "COLEDER DISPLAY CO., LTD."),
(0x0645, "MATSUMURA ELECTRIC MFG. CO. , LTD."),
(0x064A, "RZ LIGHTING CO., LTD"),
Expand Down Expand Up @@ -570,6 +571,7 @@
(0x0766, "MR-Space LLC"),
(0x076A, "BeamZ (Tronios B.V.)"),
(0x076E, "DecoLed, LLC"),
(0x0770, "M-Live s.r.l."),
(0x0772, "SP-Quality"),
(0x0773, "Papouch s.r.o."),
(0x0774, "Guangzhou Hongcheng Stage Lighting Equipment Co., Ltd."),
Expand Down Expand Up @@ -910,6 +912,7 @@
(0x0921, "Guangzhou mengyi stage lighting equipment co., LTD."),
(0x0922, "von Gaisberg Engineering"),
(0x0923, "Hangzhou Roleds Lighting System Co., Ltd."),
(0x0924, "Guangzhou Crolighting CO., LTD"),
(0x0925, "Guangzhou Aiweidy Lighting Acoustics Equipment Co.,Ltd."),
(0x0926, "Elumeros Lighting Limited"),
(0x0927, "Guangzhou Mingying Electronic Technology Co., Ltd."),
Expand Down
26 changes: 13 additions & 13 deletions data/manufacturer_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
(0x00A2, "http://www.empdesigns.co.uk/"),
(0x00A7, "https://www.syncronorm.com/"),
(0x00A8, "https://www.eye.co.jp/"),
(0x00A9, "http://www.richter-lt.de"),
(0x00B0, "http://www.arenaluci.com/"),
(0x00B9, "http://en.gzsjlight.com/"),
(0x00A9, "http://www.richter-lt.de/"),
(0x00B0, "https://arenaluci.it/en/"),
# (0x00B9, "http://en.gzsjlight.com/"), # Website currently gone

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an automatic test for that? Or do you manually check them from time to time?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok, I see the Python script for that down below. Solved.

(0x0104, "https://www.blizzardpro.com/"),
(0x01CC, "https://portmanlights.com/"),
(0x01CD, "http://www.compulite.com/"),
Expand All @@ -52,7 +52,7 @@
(0x056B, "https://www.cosmolight.it/"),
(0x056C, "https://lumascape.com/"),
(0x05E0, "https://github.com/someweisguy/esp_dmx"),
(0x0609, "https://www.pierlite.com.au/diginet"),
(0x0609, "https://pierlite.com.au/our-brands/diginet"),
(0x06E4, "https://www.dydell.com/"),
(0x0710, "https://dts-lighting.it/"),
(0x074F, "https://www.panasonic.com/"),
Expand All @@ -70,7 +70,7 @@
(0x08A4, "https://www.adamhall.com/"),
(0x08A6, "https://impulswerk.de"),
(0x08EA, "https://www.cedarled.com/"),
(0x08C5, "https://ehrgeiz.glp.de/"),
# (0x08C5, "https://ehrgeiz.glp.de/"), # Now part of GLP
(0x0956, "https://www.expromo.eu/"),
(0x0957, "https://www.whitelight.ltd.uk/"),
(0x0960, "https://fineline.solutions/"),
Expand Down Expand Up @@ -134,17 +134,17 @@
(0x4C73, "http://www.lsclighting.com/"),
(0x4D41, "http://www.malighting.com/"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should be https as well? Or is it up to them to update their address to some DB that we just fetch from?

(0x4D44, "https://www.mdgfog.com/"),
(0x4D50, "http://www.martin.com/"),
(0x4D56, "http://www.avolites.com/"),
(0x4D50, "https://www.martin.com/"),
(0x4D56, "https://www.avolites.com/"),
(0x4F43, "https://www.offstagecontrols.com/"),
(0x5000, "http://www.orangepi-dmx.org"),
(0x5041, "http://www.lighting.philips.com/"),
(0x5075, "http://pulsarlight.com/"),
# (0x5075, "http://pulsarlight.com/"), # Website has gone
(0x5100, "https://www.luxibel.com/"),
(0x514D, "http://www.qmaxz.com/"),
(0x5168, "http://www.sunricher.com"),
# (0x514D, "http://www.qmaxz.com/"), # Website had gone
(0x5168, "https://www.sunricher.com"),
(0x5201, "https://www.crestron.com/"),
(0x5252, "http://www.rosco.com/"),
(0x5252, "https://www.rosco.com/"),
(0x5253, "https://www.robe.cz/"),
(0x5343, "https://www.oceaninsight.com/"),
(0x5344, "https://www.stardraw.com/"),
Expand All @@ -157,11 +157,11 @@
(0x544C, "http://tempest.biz/"),
(0x564C, "http://www.vari-lite.com/"),
(0x5753, "http://wirelessdmx.com"),
(0x5759, "https://www.wybron.com/"),
# (0x5759, "https://www.wybron.com/"), # Company, and website has gone
(0x586D, "http://www.doityourselfchristmas.com/"),
(0x6019, "https://artificers.co.uk/"),
(0x6205, "http://www.ltechonline.com/"),
(0x6364, "http://www.lanbox.com/"),
# (0x6364, "http://www.lanbox.com/"), # Website has gone
(0x646F, "https://www.eldoled.com/"),
(0x6555, "https://shanteacontrols.com/"),
(0x656C, "https://www.elclighting.com/"),
Expand Down
46 changes: 37 additions & 9 deletions data/manufacturer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,45 @@
# Copyright (C) 2015 Simon Newton

import unittest
import urllib2
import pprint
import sys
from socket import error as SocketError
from urllib2 import HTTPError
from urllib2 import URLError
from ssl import SSLError

if sys.version_info >= (3, 0):
try:
from urllib.request import build_opener
from urllib.request import HTTPCookieProcessor
from urllib.request import Request
from urllib.error import HTTPError
from urllib.error import URLError
except ImportError:
import urllib2
from urllib2 import build_opener
from urllib2 import HTTPCookieProcessor
from urllib2 import Request
from urllib2 import HTTPError
from urllib2 import URLError
else:
import urllib2
from urllib2 import build_opener
from urllib2 import HTTPCookieProcessor
from urllib2 import Request
from urllib2 import HTTPError
from urllib2 import URLError

class TestManufacturers(unittest.TestCase):
""" Test the manufacturer data files are valid."""
def setUp(self):
globals = {}
locals = {}
execfile("data/manufacturer_data.py", globals, locals)
# Python 2 and 3 compatible version of execfile
exec(open("data/manufacturer_data.py").read(), globals, locals)
self.data = locals['MANUFACTURER_DATA']
globals = {}
locals = {}
execfile("data/manufacturer_links.py", globals, locals)
# Python 2 and 3 compatible version of execfile
exec(open("data/manufacturer_links.py").read(), globals, locals)
self.links = locals['MANUFACTURER_LINKS']

def test_ManufacturerData(self):
Expand Down Expand Up @@ -64,7 +85,7 @@ def test_ManufacturerLinks(self):
esta_id, name = manufacturer_data
esta_ids.add(esta_id)

opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())
opener = build_opener(HTTPCookieProcessor())

for manufacturer_link in self.links:
self.assertEqual(tuple, type(manufacturer_link))
Expand All @@ -90,7 +111,7 @@ def test_ManufacturerLinks(self):
ua = {'User-Agent': 'Mozilla/5.0 (KHTML, like Gecko)',
'referer': 'http://example.com'}

request = urllib2.Request(link, headers=ua)
request = Request(link, headers=ua)
response = opener.open(request)
except URLError as e:
if hasattr(e, 'reason'):
Expand All @@ -108,7 +129,14 @@ def test_ManufacturerLinks(self):
(type(e) is HTTPError and
(link == 'http://www.compulite.com/' or
link == 'https://www.lutron.com/en-US/Pages/default.aspx' or
link == 'https://www.panasonic.com/'))):
link == 'https://www.panasonic.com/' or
link == 'https://www.acuitybrands.com/' or
link == 'https://www.nxp.com/' or
link == 'https://www.martin.com/' or
link == 'https://portmanlights.com/' or
link == 'https://www.adamhall.com/')) or
(type(e) is URLError and
(link == 'https://www.productionwarehouse.co.za/'))):
self.fail("Link %s failed due to %s, reason type: %s" % (link, e.reason, type(e)))
elif hasattr(e, 'code'):
self.fail("The server couldn't fulfill the request for %s. Error "
Expand All @@ -117,7 +145,7 @@ def test_ManufacturerLinks(self):
if hasattr(e, 'errno'):
self.fail("Link %s failed due to socket error %s" % (link, e.errno))
else:
self.assertEqual(response.code, 200,
self.assertTrue(((response.code == 200) or (response.code == 202)),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is an HTTP 307 also a success?

"Failed to fetch URL %s got status %d" %
(link, response.code))

Expand Down
3 changes: 2 additions & 1 deletion data/model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class TestDeviceModelData(unittest.TestCase):
def setUp(self):
globals = {}
locals = {}
execfile("data/model_data.py", globals, locals)
# Python 2 and 3 compatible version of execfile
exec(open("data/model_data.py").read(), globals, locals)
self.data = locals['DEVICE_MODEL_DATA']

def test_DeviceModelData(self):
Expand Down
3 changes: 2 additions & 1 deletion data/node_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class TestNodeData(unittest.TestCase):
def setUp(self):
globals = {}
locals = {}
execfile("data/node_data.py", globals, locals)
# Python 2 and 3 compatible version of execfile
exec(open("data/node_data.py").read(), globals, locals)
self.data = locals['NODE_DATA']

def test_NodeData(self):
Expand Down
3 changes: 2 additions & 1 deletion data/pid_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ class TestPidData(unittest.TestCase):
def setUp(self):
globals = {}
locals = {}
execfile("data/pid_data.py", globals, locals)
# Python 2 and 3 compatible version of execfile
exec(open("data/pid_data.py").read(), globals, locals)
self.manufacturer_pids = locals['MANUFACTURER_PIDS']
self.esta_pids = locals['ESTA_PIDS']
self.pid_validator = jsonspec.validators.load(PID_VALIDATOR)
Expand Down
3 changes: 2 additions & 1 deletion data/product_category_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class TestProductCategoryData(unittest.TestCase):
def setUp(self):
globals = {}
locals = {}
execfile("data/product_categories.py", globals, locals)
# Python 2 and 3 compatible version of execfile
exec(open("data/product_categories.py").read(), globals, locals)
self.data = locals['PRODUCT_CATEGORIES']

def test_ProductCategoryData(self):
Expand Down
3 changes: 2 additions & 1 deletion data/sensor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class TestSensorTypes(unittest.TestCase):
def setUp(self):
globals = {}
locals = {}
execfile("data/sensor_types.py", globals, locals)
# Python 2 and 3 compatible version of execfile
exec(open("data/sensor_types.py").read(), globals, locals)
self.data = locals['SENSOR_TYPES']

def test_SensorTypeData(self):
Expand Down
3 changes: 2 additions & 1 deletion data/software_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class TestSoftwareData(unittest.TestCase):
def setUp(self):
globals = {}
locals = {}
execfile("data/software_data.py", globals, locals)
# Python 2 and 3 compatible version of execfile
exec(open("data/software_data.py").read(), globals, locals)
self.data = locals['SOFTWARE_DATA']

def test_SoftwareData(self):
Expand Down
3 changes: 2 additions & 1 deletion data/splitter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class TestSplitterData(unittest.TestCase):
def setUp(self):
globals = {}
locals = {}
execfile("data/splitter_data.py", globals, locals)
# Python 2 and 3 compatible version of execfile
exec(open("data/splitter_data.py").read(), globals, locals)
self.data = locals['SPLITTER_DATA']

def test_SplitterData(self):
Expand Down
6 changes: 4 additions & 2 deletions tools/missing_manufacturer_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ def Footer():
if __name__ == '__main__':
globals = {}
locals = {}
execfile("data/manufacturer_data.py", globals, locals)
# Python 2 and 3 compatible version of execfile
exec(open("data/manufacturer_data.py").read(), globals, locals)
raw_manufacturers = locals['MANUFACTURER_DATA']
globals = {}
locals = {}
execfile("data/manufacturer_links.py", globals, locals)
# Python 2 and 3 compatible version of execfile
exec(open("data/manufacturer_links.py").read(), globals, locals)
raw_links = locals['MANUFACTURER_LINKS']

manufacturers = {}
Expand Down
Loading