Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
harryajc authored Dec 26, 2024
2 parents 7a4b03c + f9ac1a8 commit a7111c3
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 10 deletions.
25 changes: 25 additions & 0 deletions device-types/Netgear/GS305E.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
manufacturer: Netgear
model: GS305E
slug: netgear-gs305e
u_height: 0.0
is_full_depth: false
airflow: passive
comments: '[300 Series SOHO Plus (GS305E)](https://www.netgear.com/business/wired/switches/plus/gs305e/)'
weight: 0.26
weight_unit: kg
power-ports:
- name: PS
type: dc-terminal
maximum_draw: 3
interfaces:
- name: GigabitEthernet/1
type: 1000base-t
- name: GigabitEthernet/2
type: 1000base-t
- name: GigabitEthernet/3
type: 1000base-t
- name: GigabitEthernet/4
type: 1000base-t
- name: GigabitEthernet/5
type: 1000base-t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
manufacturer: Schweitzer Engineering Laboratories
model: SEL-2245-221 Low-Voltage (LEA) Monitoring Module
description: The SEL-2245-221 module provides four inputs for voltage or current monitoring applications. With four low-voltage input channels, this module
can monitor a 0.05-22.0 Vrms ac voltage inputs or +-30 V peak dc voltage measurements. This module supports custom per-channel calibration to monitor
can monitor a 0.05-22.0 Vrms ac voltage inputs or 30 V peak dc voltage measurements. This module supports custom per-channel calibration to monitor
current measurement from external current transformers (e.g., split-core CT). In dc mode, it can also capture and record measurements from vital components
in the substation (e.g., trip coil currents during breaker operations). Additionally, the module records waveform oscillography up to 24 kHz and generates IEEE
C37.118 synchrophasors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
manufacturer: Schweitzer Engineering Laboratories
model: SEL-2244-5 Fast High-Current Digital Output Module
description: The SEL-2244-5 module includes ten control outputs with LED indication that have high current tripping capacity (10 A) and fast output rise
time (<16 us at 125 V). Up to nine modules may be used in a node
time (<16 at 125 V). Up to nine modules may be used in a node
interfaces:
- name: Digital-output terminal
type: other
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
manufacturer: Schweitzer Engineering Laboratories
model: SEL-2245-2 DC Analog Input Module
description: The SEL-2245-2 module includes 16 inputs that are software-selectable for input ranges of +-20 mA, +-2 mA, or +10 V. Up to 9 modules may be
used in a node, and a maximum of 16 analog modules may be used in one Axion system.
description: The SEL-2245-2 module includes 16 inputs that are software-selectable for input ranges of 20 mA, 2 mA, or +10 V. Up to 9 modules may be used
in a node, and a maximum of 16 analog modules may be used in one Axion system.
interfaces:
- name: Analog-input terminal
type: other
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jsonschema==4.23.0
jsondiff==2.2.1
pre-commit==4.0.1
pytest==8.3.3
pytest==8.3.4
PyYAML==6.0.2
yamllint==1.35.1
gitpython==3.1.43
Expand Down
9 changes: 4 additions & 5 deletions tests/definitions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def iterlist(var):
# Check for images if front_image or rear_image is True
if (definition.get('front_image') or definition.get('rear_image')):
# Find images for given manufacturer, with matching device slug (exact match including case)
manufacturer_images = [image[1] for image in image_files if image[0] == file_path.split('/')[1] and os.path.basename(image[1]).split('.')[0] == this_device.get_slug()]
manufacturer_images = [image[1] for image in image_files if image[0] == file_path.split(os.path.sep)[1] and os.path.basename(image[1]).split('.')[0] == this_device.get_slug()]
if not manufacturer_images:
pytest.fail(f'{file_path} has Front or Rear Image set to True but no images found for manufacturer/device (slug={this_device.get_slug()})', False)
elif len(manufacturer_images)>2:
Expand All @@ -232,13 +232,12 @@ def iterlist(var):
front_image = [image_path.split('/')[2] for image_path in manufacturer_images if os.path.basename(image_path).split('.')[1] == 'front']

if not front_image:
pytest.fail(f'{file_path} has front_image set to True but no matching image found for device ({manufacturer_images})', False)
pytest.fail(f'{file_path} has front_image set to True but no matching image found (looking for \'elevation-images{os.path.sep}{file_path.split(os.path.sep)[1]}{os.path.sep}{this_device.get_slug()}.front.ext\' but only found {manufacturer_images})', False)

# If rear_image is True, verify that a front image exists
# If rear_image is True, verify that a rear image exists
if(definition.get('rear_image')):
rear_image = [image_path.split('/')[2] for image_path in manufacturer_images if os.path.basename(image_path).split('.')[1] == 'rear']

if not rear_image:
pytest.fail(f'{file_path} has rear_image set to True but no images found for device', False)

pytest.fail(f'{file_path} has rear_image set to True but no matching image found (looking for \'elevation-images{os.path.sep}{file_path.split(os.path.sep)[1]}{os.path.sep}{this_device.get_slug()}.rear.ext\' but only found {manufacturer_images})', False)
iterdict(definition)
Binary file modified tests/known-modules.pickle
Binary file not shown.
Binary file modified tests/known-slugs.pickle
Binary file not shown.

0 comments on commit a7111c3

Please sign in to comment.