Skip to content

Commit 58915e3

Browse files
refactor: address remaining Copilot review suggestions
- Remove duplicate concore.delay assignments (12 files) - Remove self-assignment no-ops: concore.inpath/outpath = concore.inpath/outpath (9 files) - Use float(concore.simtime) snapshot for old2/old_concore_simtime variables (7 files)
1 parent f8869e9 commit 58915e3

16 files changed

Lines changed: 7 additions & 36 deletions

0mq/comm_node.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import concore
22

3-
concore.delay = 0.07
43
concore.delay = 0.07
54
concore.simtime = 0
65
concore.default_maxtime(100)

0mq/funbody.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
u = u[1:]
5050
concore.write(concore.oport['U2'],"u",u)
5151
print(u)
52-
old2 = concore.simtime
52+
old2 = float(concore.simtime)
5353
while concore.unchanged() or concore.simtime <= old2:
5454
ym = concore.read(concore.iport['Y2'],"ym",init_simtime_ym)
5555
ym = [concore.simtime]+ym

0mq/funbody2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
paired_transmitter.start_background_sync()
2727

28-
concore.delay = 0.07
2928
concore.delay = 0.07
3029
concore.simtime = 0
3130
concore.default_maxtime(100)

0mq/funbody_distributed.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
# Standard concore initializations
1717
concore.delay = 0.07
18-
concore.delay = 0.07
1918
concore.simtime = 0
2019
concore.default_maxtime(100)
2120
init_simtime_u_str = "[0.0, 0.0, 0.0]"
@@ -47,7 +46,7 @@
4746
if 'U2' in concore.oport:
4847
concore.write(concore.oport['U2'], "u", u_data_values)
4948

50-
old_concore_simtime = concore.simtime
49+
old_concore_simtime = float(concore.simtime)
5150
while concore.unchanged() or concore.simtime <= old_concore_simtime:
5251
# Assuming concore.iport['Y2'] is a file port (e.g., from pmpymax.py)
5352
ym_data_values = concore.read(concore.iport['Y2'], "ym", init_simtime_ym_str)

0mq/funbody_zmq.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
# Standard concore initializations
1616
concore.delay = 0.07
17-
concore.delay = 0.07
18-
concore.inpath = concore.inpath
1917
concore.simtime = 0
2018
concore.default_maxtime(100)
2119
init_simtime_u_str = "[0.0, 0.0, 0.0]"

0mq/funbody_zmq2.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
# Standard concore initializations
1616
concore.delay = 0.07
17-
concore.inpath = concore.inpath
18-
concore.outpath = concore.outpath
1917
concore.simtime = 0
2018
concore.default_maxtime(100)
2119
init_simtime_u_str = "[0.0, 0.0, 0.0]"
@@ -47,7 +45,7 @@
4745
if 'U2' in concore.oport:
4846
concore.write(concore.oport['U2'], "u", u_data_values)
4947

50-
old_concore_simtime = concore.simtime
48+
old_concore_simtime = float(concore.simtime)
5149
while concore.unchanged() or concore.simtime <= old_concore_simtime:
5250
# Assuming concore.iport['Y2'] is a file port (e.g., from pmpymax.py)
5351
ym_data_values = concore.read(concore.iport['Y2'], "ym", init_simtime_ym_str)

0mq/funcall.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
print("funcall 0mq")
44

55
concore.delay = 0.07
6-
concore.delay = 0.07
7-
concore.inpath = concore.inpath
8-
concore.outpath = concore.outpath
96
concore.simtime = 0
107
concore.default_maxtime(100)
118
init_simtime_u = "[0.0, 0.0, 0.0]"

0mq/funcall_distributed.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
# Standard concore initializations
1616
concore.delay = 0.07
17-
concore.delay = 0.07
1817
concore.simtime = 0
1918
concore.default_maxtime(100)
2019
init_simtime_u_str = "[0.0, 0.0, 0.0]"

0mq/funcall_zmq.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
# Standard concore initializations
1616
concore.delay = 0.07
17-
concore.delay = 0.07
18-
concore.inpath = concore.inpath
19-
concore.outpath = concore.outpath
2017
concore.simtime = 0
2118
concore.default_maxtime(100)
2219
init_simtime_u_str = "[0.0, 0.0, 0.0]"

measurements/Latency/funbody_distributed.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515

1616
# Standard concore initializations
1717
concore.delay = 0.07
18-
concore.delay = 0.07
19-
concore.inpath = concore.inpath
20-
concore.outpath = concore.outpath
2118
concore.simtime = 0
2219
concore.default_maxtime(100)
2320
init_simtime_u_str = "[0.0, 0.0, 0.0]"
@@ -49,7 +46,7 @@
4946
if 'U2' in concore.oport:
5047
concore.write(concore.oport['U2'], "u", u_data_values)
5148

52-
old_concore_simtime = concore.simtime
49+
old_concore_simtime = float(concore.simtime)
5350
while concore.unchanged() or concore.simtime <= old_concore_simtime:
5451
# Assuming concore.iport['Y2'] is a file port (e.g., from pmpymax.py)
5552
ym_data_values = concore.read(concore.iport['Y2'], "ym", init_simtime_ym_str)

0 commit comments

Comments
 (0)