cuemsutils 0.0.8__tar.gz → 0.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cuemsutils
3
- Version: 0.0.8
3
+ Version: 0.0.9
4
4
  Summary: Reusable classes and methods for CueMS system
5
5
  Project-URL: Documentation, https://github.com/stagesoft/cuems-utils#readme
6
6
  Project-URL: Issues, https://github.com/stagesoft/cuems-utils/issues
@@ -27,6 +27,8 @@ Requires-Dist: pynng==0.8.1
27
27
  Requires-Dist: timecode
28
28
  Requires-Dist: websockets==14.1
29
29
  Requires-Dist: xmlschema==3.4.3
30
+ Provides-Extra: systemd
31
+ Requires-Dist: systemd==235; extra == 'systemd'
30
32
  Description-Content-Type: text/markdown
31
33
 
32
34
  # cuems-utils
@@ -51,6 +53,16 @@ pip install cuemsutils
51
53
 
52
54
  ## Release notes
53
55
 
56
+ ### v0.0.9
57
+ - New `HubServices` for multiple dialers communication
58
+ - Extended `Settings` parameters class
59
+ - New `tools` submodule for clarity with documentation
60
+ - Added class `SignalEngine` and `run_daemon` method for running daemons
61
+ - Improved `ProjectMappings` and `NetworkMap` content processing
62
+ - Added class `Timeoutloop` for running methods with timeout
63
+ - `get_media` methods return extended information
64
+ - Conditional load of xml files at `ConfigManager` initialization, all class methods made public
65
+
54
66
  ### v0.0.8
55
67
  - `Settings` class added to xml module. Allows for easy access to configuration files.
56
68
  - Child classes `NetworkMap` and `ProjectMappings` inherit from `Settings` class.
@@ -20,6 +20,16 @@ pip install cuemsutils
20
20
 
21
21
  ## Release notes
22
22
 
23
+ ### v0.0.9
24
+ - New `HubServices` for multiple dialers communication
25
+ - Extended `Settings` parameters class
26
+ - New `tools` submodule for clarity with documentation
27
+ - Added class `SignalEngine` and `run_daemon` method for running daemons
28
+ - Improved `ProjectMappings` and `NetworkMap` content processing
29
+ - Added class `Timeoutloop` for running methods with timeout
30
+ - `get_media` methods return extended information
31
+ - Conditional load of xml files at `ConfigManager` initialization, all class methods made public
32
+
23
33
  ### v0.0.8
24
34
  - `Settings` class added to xml module. Allows for easy access to configuration files.
25
35
  - Child classes `NetworkMap` and `ProjectMappings` inherit from `Settings` class.
@@ -34,8 +34,12 @@ dependencies = [
34
34
  "xmlschema==3.4.3",
35
35
  "websockets==14.1",
36
36
  "peewee==3.17.8",
37
- "aiofiles==24.1.0"
37
+ "aiofiles==24.1.0",
38
+ ]
38
39
 
40
+ [project.optional-dependencies]
41
+ systemd = [
42
+ "systemd==235",
39
43
  ]
40
44
 
41
45
  [project.urls]
@@ -52,6 +56,9 @@ include = ["src/cuemsutils/xml/schemas"]
52
56
  [tool.hatch.build.targets.wheel]
53
57
  packages = ["src/cuemsutils"]
54
58
 
59
+ [tool.hatch.metadata]
60
+ allow-direct-references = true
61
+
55
62
  [[tool.hatch.envs.hatch-test.matrix]]
56
63
  python = ["3.11"]
57
64
 
@@ -60,7 +67,7 @@ dependencies = [
60
67
  "pytest",
61
68
  "pytest-cov",
62
69
  "pytest-mock",
63
- "coverage[toml]"
70
+ "coverage[toml]",
64
71
  ]
65
72
 
66
73
  [tool.coverage.run]
@@ -22,10 +22,18 @@
22
22
  <xs:element name="name" minOccurs="1" maxOccurs="1" type="cms:NonEmptyString"/>
23
23
  <xs:element name="node_type" minOccurs="1" maxOccurs="1" type="cms:NonEmptyString"/>
24
24
  <xs:element name="ip" minOccurs="1" maxOccurs="1" type="cms:NonEmptyString"/>
25
- <xs:element name="port" minOccurs="1" maxOccurs="1" type="cms:NonEmptyString"/>
25
+ <xs:element name="port" minOccurs="1" maxOccurs="1" type="cms:NonPrivilegedPort"/>
26
+ <xs:element name="online" minOccurs="1" maxOccurs="1" type="cms:BoolType"/>
26
27
  </xs:sequence>
27
28
  </xs:complexType>
28
29
 
30
+ <xs:simpleType name="BoolType">
31
+ <xs:restriction base="xs:string">
32
+ <xs:enumeration value="True" />
33
+ <xs:enumeration value="False" />
34
+ </xs:restriction>
35
+ </xs:simpleType>
36
+
29
37
  <xs:complexType name="PutType">
30
38
  <xs:sequence>
31
39
  <xs:element name="name" minOccurs="1" maxOccurs="1" type="cms:NonEmptyString"></xs:element>
@@ -45,4 +53,11 @@
45
53
  <xs:pattern value=".*[^\s].*" />
46
54
  </xs:restriction>
47
55
  </xs:simpleType>
56
+
57
+ <xs:simpleType name="NonPrivilegedPort">
58
+ <xs:restriction base="xs:int">
59
+ <xs:minInclusive value="1024" />
60
+ <xs:maxInclusive value="65535" />
61
+ </xs:restriction>
62
+ </xs:simpleType>
48
63
  </xs:schema>
@@ -272,10 +272,9 @@
272
272
  <xs:complexContent>
273
273
  <xs:extension base="cms:CueType">
274
274
  <xs:sequence>
275
- <!-- A dmx media file path which can be none -->
276
- <xs:element name="Media" type="cms:MediaType" />
277
- <xs:element name="fadein_time" type="xs:integer" />
278
- <xs:element name="fadeout_time" type="xs:integer" />
275
+ <xs:element name="fadein_time" type="xs:float" />
276
+ <xs:element name="fadeout_time" type="xs:float" />
277
+ <xs:element name="DmxScene" type="cms:DmxSceneType" />
279
278
  </xs:sequence>
280
279
  </xs:extension>
281
280
  </xs:complexContent>
@@ -283,10 +282,8 @@
283
282
 
284
283
  <!-- Dmx scene type -->
285
284
  <xs:complexType name="DmxSceneType">
286
- <xs:sequence>
287
- <xs:element name="uuid" type="xs:string" />
288
- <xs:element name="name" type="cms:NameStringType" />
289
- <xs:element name="description" type="cms:DescriptionStringType" />
285
+ <xs:all>
286
+ <xs:element name="id" type="xs:string" />
290
287
  <!-- We allow a max of 10 universes un a scene by now -->
291
288
  <xs:element name="DmxUniverse" type="cms:DmxUniverseType">
292
289
  <!-- They must be unique id's specs for the channels -->
@@ -295,38 +292,37 @@
295
292
  <xs:field xpath="@id" />
296
293
  </xs:unique>
297
294
  </xs:element>
298
- </xs:sequence>
295
+ </xs:all>
299
296
  </xs:complexType>
300
297
 
301
298
  <!-- Dmx universe type -->
302
299
  <xs:complexType name="DmxUniverseType">
303
300
  <xs:sequence>
304
- <xs:element name="id" type="xs:positiveInteger"></xs:element>
305
301
  <!-- List contents (to make it a list in python) -->
306
302
  <xs:element name="dmx_channels" type="cms:DmxUniverseContentsType">
307
303
  <xs:unique name="unique_channel_number">
308
304
  <xs:selector xpath="dmx_channel" />
309
- <xs:field xpath="@id" />
305
+ <xs:field xpath="@universe_num" />
310
306
  </xs:unique>
311
307
  </xs:element>
308
+ <xs:element name="universe_num" type="xs:nonNegativeInteger"></xs:element>
312
309
  </xs:sequence>
313
- <xs:attribute name="id" type="xs:byte" />
310
+ <xs:attribute name="universe_num" type="xs:byte" />
314
311
  </xs:complexType>
315
312
 
316
313
  <!-- DMX allows a max of 512 different channels in a universe -->
317
314
  <xs:complexType name="DmxUniverseContentsType">
318
315
  <xs:sequence>
319
- <xs:element name="dmx_channel" type="cms:DmxChannelType" minOccurs="0" maxOccurs="512" />
316
+ <xs:element name="DmxChannel" type="cms:DmxChannelType" minOccurs="0" maxOccurs="512" />
320
317
  </xs:sequence>
321
318
  </xs:complexType>
322
319
 
323
320
  <!-- Dmx basic channel type -->
324
321
  <xs:complexType name="DmxChannelType">
325
- <xs:simpleContent>
326
- <xs:extension base="xs:unsignedByte">
327
- <xs:attribute name="id" type="cms:ChannelNumberType" />
328
- </xs:extension>
329
- </xs:simpleContent>
322
+ <xs:sequence>
323
+ <xs:element name="channel" type="cms:ChannelNumberType" />
324
+ <xs:element name="value" type="cms:ChannelValueType" />
325
+ </xs:sequence>
330
326
  </xs:complexType>
331
327
 
332
328
  <!-- SIMPLE DATA TYPES -->
@@ -338,12 +334,19 @@
338
334
  </xs:simpleType>
339
335
 
340
336
  <xs:simpleType name="ChannelNumberType">
341
- <xs:restriction base="xs:integer">
337
+ <xs:restriction base="xs:nonNegativeInteger">
342
338
  <xs:minInclusive value="0" />
343
339
  <xs:maxInclusive value="511" />
344
340
  </xs:restriction>
345
341
  </xs:simpleType>
346
342
 
343
+ <xs:simpleType name="ChannelValueType">
344
+ <xs:restriction base="xs:nonNegativeInteger">
345
+ <xs:minInclusive value="0" />
346
+ <xs:maxInclusive value="255" />
347
+ </xs:restriction>
348
+ </xs:simpleType>
349
+
347
350
  <xs:simpleType name="DateType">
348
351
  <xs:restriction base="xs:dateTime">
349
352
  <xs:minInclusive value="2020-01-01T00:00:00"></xs:minInclusive>
@@ -6,10 +6,17 @@
6
6
  <xs:element name="Settings">
7
7
  <xs:complexType>
8
8
  <xs:sequence>
9
+ <xs:element name="conf_path" type="xs:string" minOccurs="1" maxOccurs="1" />
9
10
  <xs:element name="library_path" type="xs:string" minOccurs="1" maxOccurs="1" />
10
11
  <xs:element name="tmp_path" type="xs:string" minOccurs="1" maxOccurs="1" />
11
12
  <xs:element name="database_name" type="xs:string" minOccurs="1" maxOccurs="1" />
12
13
  <xs:element name="show_lock_file" type="xs:string" minOccurs="1" maxOccurs="1" />
14
+ <xs:element name="editor_url" type="xs:string" minOccurs="1" maxOccurs="1" />
15
+ <xs:element name="controller_url" type="xs:string" minOccurs="1" maxOccurs="1" />
16
+ <xs:element name="templates_path" type="xs:string" minOccurs="1" maxOccurs="1" />
17
+ <xs:element name="controller_interfaces_template" type="xs:string" minOccurs="1" maxOccurs="1" />
18
+ <xs:element name="node_interfaces_template" type="xs:string" minOccurs="1" maxOccurs="1" />
19
+ <xs:element name="controller_lock_file" type="xs:string" minOccurs="1" maxOccurs="1" />
13
20
  <!-- Node settings -->
14
21
  <xs:element name="node" type="cms:NodeConfType" minOccurs="1" maxOccurs="1"></xs:element>
15
22
  </xs:sequence>
@@ -26,14 +33,14 @@
26
33
  <xs:element name="uuid" type="cms:NonEmptyString" />
27
34
  <xs:element name="mac" type="cms:NonEmptyString" />
28
35
  <xs:element name="osc_dest_host" type="cms:NonEmptyString" />
29
- <xs:element name="oscquery_ws_port" type="xs:positiveInteger" />
30
- <xs:element name="oscquery_osc_port" type="xs:positiveInteger" />
31
- <xs:element name="websocket_port" type="xs:positiveInteger" />
36
+ <xs:element name="oscquery_ws_port" type="cms:NonPrivilegedPort" />
37
+ <xs:element name="oscquery_osc_port" type="cms:NonPrivilegedPort" />
38
+ <xs:element name="websocket_port" type="cms:NonPrivilegedPort" />
32
39
  <xs:element name="load_timeout" type="xs:positiveInteger" />
33
40
  <xs:element name="nodeconf_timeout" type="xs:positiveInteger" />
34
41
  <xs:element name="discovery_timeout" type="xs:positiveInteger" />
35
42
  <xs:element name="mtc_port" type="xs:string" />
36
- <xs:element name="osc_in_port_base" type="xs:positiveInteger" />
43
+ <xs:element name="osc_in_port_base" type="cms:NonPrivilegedPort" />
37
44
  <xs:element name="videoplayer" type="cms:VideoPlayerType" minOccurs="0" maxOccurs="1" />
38
45
  <xs:element name="audioplayer" type="cms:AudioPlayerType" minOccurs="0" maxOccurs="1" />
39
46
  <xs:element name="dmxplayer" type="cms:DmxPlayerType" minOccurs="0" maxOccurs="1" />
@@ -110,4 +117,10 @@
110
117
  </xs:restriction>
111
118
  </xs:simpleType>
112
119
 
120
+ <xs:simpleType name="NonPrivilegedPort">
121
+ <xs:restriction base="xs:int">
122
+ <xs:minInclusive value="1024" />
123
+ <xs:maxInclusive value="65535" />
124
+ </xs:restriction>
125
+ </xs:simpleType>
113
126
  </xs:schema>
File without changes
File without changes