easy-utils-dev 2.129__py3-none-any.whl → 2.130__py3-none-any.whl

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.

Potentially problematic release.


This version of easy-utils-dev might be problematic. Click here for more details.

@@ -0,0 +1,82 @@
1
+ BEGIN;
2
+
3
+ -- 1) Mapping table: (shelfType, logicalSlot) -> physicalSlot
4
+ CREATE TABLE IF NOT EXISTS slot_mapping (
5
+ shelfType TEXT NOT NULL,
6
+ logicalSlot INTEGER NOT NULL,
7
+ physicalSlot INTEGER NOT NULL,
8
+ PRIMARY KEY (shelfType, logicalSlot)
9
+ );
10
+
11
+ -- Clean existing rows so script is idempotent without dialect-specific UPSERT
12
+ DELETE FROM slot_mapping;
13
+
14
+ -- PSS32 (32 slots)
15
+ INSERT INTO slot_mapping (shelfType, logicalSlot, physicalSlot) VALUES
16
+ ('PSS32',1,2),('PSS32',2,20),('PSS32',3,3),('PSS32',4,21),
17
+ ('PSS32',5,4),('PSS32',6,22),('PSS32',7,5),('PSS32',8,23),
18
+ ('PSS32',9,6),('PSS32',10,24),('PSS32',11,7),('PSS32',12,25),
19
+ ('PSS32',13,8),('PSS32',14,26),('PSS32',15,9),('PSS32',16,27),
20
+ ('PSS32',17,10),('PSS32',18,28),('PSS32',19,11),('PSS32',20,29),
21
+ ('PSS32',21,12),('PSS32',22,30),('PSS32',23,13),('PSS32',24,31),
22
+ ('PSS32',25,14),('PSS32',26,32),('PSS32',27,15),('PSS32',28,33),
23
+ ('PSS32',29,16),('PSS32',30,34),('PSS32',31,17),('PSS32',32,35);
24
+
25
+ -- PSS16II (16 slots)
26
+ INSERT INTO slot_mapping (shelfType, logicalSlot, physicalSlot) VALUES
27
+ ('PSS16II',1,3),('PSS16II',2,13),('PSS16II',3,4),('PSS16II',4,14),
28
+ ('PSS16II',5,5),('PSS16II',6,15),('PSS16II',7,6),('PSS16II',8,16),
29
+ ('PSS16II',9,7),('PSS16II',10,17),('PSS16II',11,8),('PSS16II',12,18),
30
+ ('PSS16II',13,9),('PSS16II',14,19),('PSS16II',15,10),('PSS16II',16,20);
31
+
32
+ -- PSS16 (same mapping as PSS16II)
33
+ INSERT INTO slot_mapping (shelfType, logicalSlot, physicalSlot) VALUES
34
+ ('PSS16',1,3),('PSS16',2,13),('PSS16',3,4),('PSS16',4,14),
35
+ ('PSS16',5,5),('PSS16',6,15),('PSS16',7,6),('PSS16',8,16),
36
+ ('PSS16',9,7),('PSS16',10,17),('PSS16',11,8),('PSS16',12,18),
37
+ ('PSS16',13,9),('PSS16',14,19),('PSS16',15,10),('PSS16',16,20);
38
+
39
+ -- PSS8 (8 slots)
40
+ INSERT INTO slot_mapping (shelfType, logicalSlot, physicalSlot) VALUES
41
+ ('PSS8',1,2),('PSS8',2,8),('PSS8',3,3),('PSS8',4,9),
42
+ ('PSS8',5,4),('PSS8',6,10),('PSS8',7,5),('PSS8',8,11);
43
+
44
+ -- 2) Helpful indexes
45
+ CREATE INDEX IF NOT EXISTS idx_circuitpack_parent ON circuitpack(parentId);
46
+ CREATE INDEX IF NOT EXISTS idx_circuitpack_wdmline ON circuitpack(wdmline);
47
+ CREATE INDEX IF NOT EXISTS idx_circuitpack_slotid ON circuitpack(slotid);
48
+ CREATE INDEX IF NOT EXISTS idx_shelf_id ON shelf(id);
49
+ CREATE INDEX IF NOT EXISTS idx_shelf_grandparent ON shelf(grandparentId);
50
+ CREATE INDEX IF NOT EXISTS idx_shelf_type ON shelf(type);
51
+ CREATE INDEX IF NOT EXISTS idx_line_id ON "line"(id);
52
+ CREATE INDEX IF NOT EXISTS idx_line_span ON "line"(span);
53
+ CREATE INDEX IF NOT EXISTS idx_site_id ON site(id);
54
+
55
+ -- 3) View that reproduces get_all_dirs()
56
+ DROP VIEW IF EXISTS v_dirs;
57
+ CREATE VIEW v_dirs AS
58
+ SELECT
59
+ src.name AS sourceNe,
60
+ dst.name AS destinationNe,
61
+ cp.type AS board,
62
+ sm.physicalSlot AS physicalslot,
63
+ (sh.number || '/' || sm.physicalSlot) AS slot,
64
+ sh.type AS shelfType,
65
+ cp.id AS circuitpack_id,
66
+ sh.id AS shelf_id,
67
+ l1.span AS span_id,
68
+ src.id AS source_site_id,
69
+ dst.id AS destination_site_id
70
+ FROM circuitpack cp
71
+ JOIN shelf sh ON sh.id = cp.parentId
72
+ JOIN site src ON src.id = sh.grandparentId
73
+ JOIN "line" l1 ON l1.id = cp.wdmline
74
+ JOIN "line" l2 ON l2.span = l1.span AND l2.grandparentId <> sh.grandparentId
75
+ JOIN site dst ON dst.id = l2.grandparentId
76
+ WHERE cp.packIDRef IS NOT NULL
77
+ AND cp.type IN (
78
+ SELECT packName FROM OAtype
79
+ WHERE packName IS NOT NULL OR packName != ''
80
+ );
81
+
82
+ COMMIT;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: easy-utils-dev
3
- Version: 2.129
3
+ Version: 2.130
4
4
  Keywords: python3
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Requires-Dist: psutil
@@ -29,7 +29,8 @@ easy_utils_dev/utils.py,sha256=BmVnbxc336c6WTeDFcEHN6Mavt7fJrIEyK4GXODV3gI,13345
29
29
  easy_utils_dev/winserviceapi.py,sha256=2ZP6jaSt1-5vEJYXqwBhwX-1-eQ3V3YzntsoOoko2cw,18804
30
30
  easy_utils_dev/wsnoclib.py,sha256=tC-RmjddaLpihPCRBLGC2RnRpFJqexhvExUr1KncoQM,29063
31
31
  easy_utils_dev/wsselib.py,sha256=YweScnoAAH_t29EeIjBpkQ6HtX0Rp9mQudRsRce2SE8,7920
32
- easy_utils_dev-2.129.dist-info/METADATA,sha256=jspK80iAmC6yufREJvJgBqJwQLDv-98H4RoL2TQoi8g,510
33
- easy_utils_dev-2.129.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
34
- easy_utils_dev-2.129.dist-info/top_level.txt,sha256=7vBsrpq7NmilkdU3YUvfd5iVDNBaT07u_-ut4F7zc7A,15
35
- easy_utils_dev-2.129.dist-info/RECORD,,
32
+ easy_utils_dev/ept_sql/create_dirs.sql,sha256=Tdd7eaZ1BmIe9DY4gnt2VQ0y_TSYWe9DxObfW2UbL-c,3510
33
+ easy_utils_dev-2.130.dist-info/METADATA,sha256=mgX9tbXKj4qsu2O4nWqTK6InvEKnyVrjoSLzdTMJMsA,510
34
+ easy_utils_dev-2.130.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
35
+ easy_utils_dev-2.130.dist-info/top_level.txt,sha256=7vBsrpq7NmilkdU3YUvfd5iVDNBaT07u_-ut4F7zc7A,15
36
+ easy_utils_dev-2.130.dist-info/RECORD,,