Skip to content

Commit 81778cf

Browse files
authored
Merge pull request #304 from EOMYS-Public/Slot
[NF] New Slot schematics and GUI improvements
2 parents fb74295 + 42dfaa6 commit 81778cf

File tree

651 files changed

+183574
-190175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

651 files changed

+183574
-190175
lines changed

Tests/GUI/DMachineSetup/test_DMachineSetup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
{"type": "DFIM", "index": 1, "name": "DFIM_001", "p": 2, "count": 13}
3838
)
3939
load_test.append( # 3
40-
{"type": "SyRM", "index": 2, "name": "SynRM_001", "p": 2, "count": 10}
40+
{"type": "SynRM", "index": 2, "name": "SynRM_001", "p": 2, "count": 10}
4141
)
4242
load_test.append( # 4
43-
{"type": "SIPMSM", "index": 3, "name": "SIPMSM_008", "p": 4, "count": 10}
43+
{"type": "SPMSM", "index": 3, "name": "SIPMSM_008", "p": 4, "count": 10}
4444
)
4545
load_test.append( # 5
4646
{"type": "IPMSM", "index": 4, "name": "machine_IPMSM_A", "p": 5, "count": 10}
@@ -120,14 +120,14 @@ def test_set_save_machine_type(self, setup):
120120
assert setup["widget"].w_step.c_type.currentText() == "DFIM"
121121
assert type(setup["widget"].machine) == MachineDFIM
122122
save_function(setup["widget"], "test_dfim_save")
123-
# SyRM
123+
# SynRM
124124
setup["widget"].w_step.c_type.setCurrentIndex(2)
125-
assert setup["widget"].w_step.c_type.currentText() == "SyRM"
125+
assert setup["widget"].w_step.c_type.currentText() == "SynRM"
126126
assert type(setup["widget"].machine) == MachineSyRM
127-
save_function(setup["widget"], "test_syrm_save")
127+
save_function(setup["widget"], "test_synrm_save")
128128
# SIPMSM
129129
setup["widget"].w_step.c_type.setCurrentIndex(3)
130-
assert setup["widget"].w_step.c_type.currentText() == "SIPMSM"
130+
assert setup["widget"].w_step.c_type.currentText() == "SPMSM"
131131
assert type(setup["widget"].machine) == MachineSIPMSM
132132
save_function(setup["widget"], "test_sipmsm_save")
133133
# IPMSM

Tests/GUI/DMachineSetup/test_PHoleM50.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def test_comp_output(self, setup):
249249

250250
# Nan are there because the value are not correct for the sin, cos and tan methods. But with true values, it works.
251251

252-
assert setup["widget"].out_slot_surface.text() == "Slot suface (2 part): nan "
253-
assert setup["widget"].out_magnet_surface.text() == "Magnet surface: 0.0608 "
254-
assert setup["widget"].out_alpha.text() == "alpha: nan rad (nan°)"
255-
assert setup["widget"].out_W5.text() == "W5: nan m"
252+
assert setup["widget"].out_slot_surface.text() == "Slot surface: nan [m²]"
253+
assert setup["widget"].out_magnet_surface.text() == "Magnet surf.: 0.0608 [m²]"
254+
assert setup["widget"].out_alpha.text() == "alpha: nan [rad] (nan°)"
255+
assert setup["widget"].out_W5.text() == "W5: nan [m]"

Tests/GUI/DMachineSetup/test_PWSlot10.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ def test_output_txt(self, setup):
138138
H0=0.005, H1=0.005, H2=0.02, W0=0.01, W1=0.02, W2=0.01, H1_is_rad=False
139139
)
140140
setup["widget"] = PWSlot10(setup["test_obj"])
141-
assert setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.03006 m"
141+
assert (
142+
setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.03006 [m]"
143+
)
142144

143145
def test_check(self, setup):
144146
"""Check that the check is working correctly"""

Tests/GUI/DMachineSetup/test_PWSlot11.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ def test_output_txt(self, setup):
170170
H1_is_rad=False,
171171
)
172172
setup["widget"] = PWSlot11(setup["test_obj"])
173-
assert setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.03006 m"
173+
assert (
174+
setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.03006 [m]"
175+
)
174176

175177
def test_check(self, setup):
176178
"""Check that the check is working correctly"""

Tests/GUI/DMachineSetup/test_PWSlot12.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def test_output_txt(self, setup):
8383
"""Check that the Output text is computed and correct"""
8484
setup["test_obj"].slot = SlotW12(H0=0.01, H1=0.02, R1=0.005, R2=0.005)
8585
setup["widget"] = PWSlot12(setup["test_obj"])
86-
assert setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.04506 m"
86+
assert (
87+
setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.04506 [m]"
88+
)
8789

8890
def test_check(self, setup):
8991
"""Check that the check is working correctly"""

Tests/GUI/DMachineSetup/test_PWSlot13.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ def test_output_txt(self, setup):
171171
H1_is_rad=False,
172172
)
173173
setup["widget"] = PWSlot13(setup["test_obj"])
174-
assert setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.03502 m"
174+
assert (
175+
setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.03502 [m]"
176+
)
175177

176178
def test_check(self, setup):
177179
"""Check that the check is working correctly"""

Tests/GUI/DMachineSetup/test_PWSlot14.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def test_output_txt(self, setup):
9393
"""Check that the Output text is computed and correct"""
9494
setup["test_obj"].slot = SlotW14(H0=0.005, H1=0.01, H3=0.025, W0=0.005, W3=0.02)
9595
setup["widget"] = PWSlot14(setup["test_obj"])
96-
assert setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.03987 m"
96+
assert (
97+
setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.03987 [m]"
98+
)
9799

98100
def test_check(self, setup):
99101
"""Check that the check is working correctly"""

Tests/GUI/DMachineSetup/test_PWSlot15.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_output_txt(self, setup):
117117
Zs=6, W0=10e-3, W3=30e-3, H0=5e-3, H1=20e-3, H2=50e-3, R1=15e-3, R2=10e-3
118118
)
119119
setup["widget"] = PWSlot15(setup["test_obj"])
120-
assert setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.075 m"
120+
assert setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.075 [m]"
121121

122122
def test_check(self, setup):
123123
"""Check that the check is working correctly"""

Tests/GUI/DMachineSetup/test_PWSlot16.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_output_txt(self, setup):
106106
Zs=6, W0=2 * pi / 60, W3=30e-3, H0=10e-3, H2=70e-3, R1=15e-3
107107
)
108108
setup["widget"] = PWSlot16(setup["test_obj"])
109-
assert setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.08 m"
109+
assert setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.08 [m]"
110110

111111
def test_check(self, setup):
112112
"""Check that the check is working correctly"""

Tests/GUI/DMachineSetup/test_PWSlot21.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def test_output_txt(self, setup):
156156
H1_is_rad=False,
157157
)
158158
setup["widget"] = PWSlot21(setup["test_obj"])
159-
assert setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.1504 m"
159+
assert setup["widget"].w_out.out_slot_height.text() == "Slot height: 0.1504 [m]"
160160

161161
def test_check(self, setup):
162162
"""Check that the check is working correctly"""

0 commit comments

Comments
 (0)