refactor: added config file and moved constants #9

Merged
8464960 merged 5 commits from refactor/config-file into dev 2025-11-14 14:15:07 +00:00
8464960 commented 2025-11-09 15:05:43 +00:00 (Migrated from git.science.uu.nl)

Description
Moved hardcoded configuration constants to a dedicated config.py file.

Before accepting merge request please check the following points:

  • All tests pass and code runs as expected
  • All hard coded constants (magic numbers) are moved to the config file (src/robot_interface/core/config.py)
  • You think the way the constants are written in the config file makes sense (is different than in cb, because we use python 2.7 here)

ref: N25B-236

**Description** Moved hardcoded configuration constants to a dedicated config.py file. Before accepting merge request please check the following points: - [x] All tests pass and code runs as expected - [x] All hard coded constants (magic numbers) are moved to the config file (src/robot_interface/core/config.py) - [x] You think the way the constants are written in the config file makes sense (is different than in cb, because we use python 2.7 here) ref: N25B-236
8464960 commented 2025-11-09 15:10:18 +00:00 (Migrated from git.science.uu.nl)

assigned to @8464960

assigned to @8464960
0950726 commented 2025-11-14 11:35:02 +00:00 (Migrated from git.science.uu.nl)

requested review from @0950726

requested review from @0950726
0950726 commented 2025-11-14 12:09:14 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 03519e2a - test: fix microphone interactive test

Compare with previous version

added 1 commit <ul><li>03519e2a - test: fix microphone interactive test</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133614&start_sha=643d7b919c6dfd1c15068f90ed715893106ddbc4)
0950726 commented 2025-11-14 13:35:50 +00:00 (Migrated from git.science.uu.nl)

(there's a blank first line)


(there's a blank first line) ```suggestion:-0+0 ```
0950726 commented 2025-11-14 13:36:05 +00:00 (Migrated from git.science.uu.nl)

Not used


Not used ```suggestion:-0+0 ```
0950726 commented 2025-11-14 13:36:32 +00:00 (Migrated from git.science.uu.nl)

Style says we need two lines between classes and functions.

Here I suggest replacing the single blank line with two blank lines, but the GitLab preview is not showing it correctly. If you accept this change, make sure it actually becomes two blank lines instead of zero.



Style says we need two lines between classes and functions. Here I suggest replacing the single blank line with two blank lines, but the GitLab preview is not showing it correctly. If you accept this change, make sure it actually becomes two blank lines instead of zero. ```suggestion:-0+0 ```
0950726 commented 2025-11-14 13:36:47 +00:00 (Migrated from git.science.uu.nl)


```suggestion:-0+0 ```
0950726 commented 2025-11-14 13:36:55 +00:00 (Migrated from git.science.uu.nl)


```suggestion:-0+0 ```
0950726 commented 2025-11-14 13:37:02 +00:00 (Migrated from git.science.uu.nl)


```suggestion:-0+0 ```
2584433 commented 2025-11-14 13:50:52 +00:00 (Migrated from git.science.uu.nl)

marked the checklist item All tests pass and code runs as expected as completed

marked the checklist item **All tests pass and code runs as expected** as completed
0950726 commented 2025-11-14 13:51:02 +00:00 (Migrated from git.science.uu.nl)

Line too long

    def __init__(
        self, 
        actuating_receiver_port=5557, 
        main_receiver_port=5555,
        video_sender_port=5556, 
        audio_sender_port=5558,
    ):
Line too long ```suggestion:-0+0 def __init__( self, actuating_receiver_port=5557, main_receiver_port=5555, video_sender_port=5556, audio_sender_port=5558, ): ```
0950726 commented 2025-11-14 13:51:29 +00:00 (Migrated from git.science.uu.nl)
    def __init__(
        self,
        camera_index=0,
        resolution=2,
        color_space=11,
        fps=15,
        stream_name="Pepper Video",
        image_buffer=6,
    ):
```suggestion:-0+0 def __init__( self, camera_index=0, resolution=2, color_space=11, fps=15, stream_name="Pepper Video", image_buffer=6, ): ```
0950726 commented 2025-11-14 13:52:24 +00:00 (Migrated from git.science.uu.nl)
    def __init__(self, zmq_context, port=settings.agent_settings.actuating_receiver_port):
```suggestion:-0+0 def __init__(self, zmq_context, port=settings.agent_settings.actuating_receiver_port): ```
0950726 commented 2025-11-14 13:52:34 +00:00 (Migrated from git.science.uu.nl)
    def __init__(self, zmq_context, port=settings.agent_settings.audio_sender_port):
```suggestion:-0+0 def __init__(self, zmq_context, port=settings.agent_settings.audio_sender_port): ```
0950726 commented 2025-11-14 13:52:46 +00:00 (Migrated from git.science.uu.nl)
    def __init__(self, zmq_context, port=settings.agent_settings.main_receiver_port):
```suggestion:-0+0 def __init__(self, zmq_context, port=settings.agent_settings.main_receiver_port): ```
2584433 commented 2025-11-14 13:56:05 +00:00 (Migrated from git.science.uu.nl)

marked the checklist item All hard coded constants (magic numbers) are moved to the config file (src/robot_interface/core/config.py) as completed

marked the checklist item **All hard coded constants (magic numbers) are moved to the config file (src/robot_interface/core/config.py)** as completed
0950726 commented 2025-11-14 14:01:51 +00:00 (Migrated from git.science.uu.nl)

marked the checklist item You think the way the constants are written in the config file makes sense (is different than in cb, because we use python 2.7 here) as completed

marked the checklist item **You think the way the constants are written in the config file makes sense (is different than in cb, because we use python 2.7 here)** as completed
2584433 commented 2025-11-14 14:10:05 +00:00 (Migrated from git.science.uu.nl)

approved this merge request

approved this merge request
8464960 commented 2025-11-14 14:12:15 +00:00 (Migrated from git.science.uu.nl)

resolved all threads

resolved all threads
8464960 commented 2025-11-14 14:12:16 +00:00 (Migrated from git.science.uu.nl)

resolved all threads

resolved all threads
8464960 commented 2025-11-14 14:12:19 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d#84d1152ca66f4bc53f52182150359a8b4e719172_1_1)
8464960 commented 2025-11-14 14:12:22 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d#84d1152ca66f4bc53f52182150359a8b4e719172_4_3)
8464960 commented 2025-11-14 14:12:23 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d#84d1152ca66f4bc53f52182150359a8b4e719172_13_17)
8464960 commented 2025-11-14 14:12:24 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d#84d1152ca66f4bc53f52182150359a8b4e719172_23_34)
8464960 commented 2025-11-14 14:12:25 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d#84d1152ca66f4bc53f52182150359a8b4e719172_30_40)
8464960 commented 2025-11-14 14:12:26 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d#84d1152ca66f4bc53f52182150359a8b4e719172_36_45)
8464960 commented 2025-11-14 14:12:27 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d#84d1152ca66f4bc53f52182150359a8b4e719172_8_6)
8464960 commented 2025-11-14 14:12:28 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d#84d1152ca66f4bc53f52182150359a8b4e719172_16_19)
8464960 commented 2025-11-14 14:12:29 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d#de437161b76ff5e501950e208fff18a8e8803bb0_13_13)
8464960 commented 2025-11-14 14:12:30 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d#62f83f5613d0d6aa71039b65c7f98b8585580506_17_17)
8464960 commented 2025-11-14 14:12:31 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d#517a095016d1196a725610822967c8adfb8d603a_9_9)
8464960 commented 2025-11-14 14:12:32 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 16b64e41 - style: applied style suggestions

Compare with previous version

added 1 commit <ul><li>16b64e41 - style: applied style suggestions</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133625&start_sha=03519e2a1604c3d904834e51fded14aa84763f1d)
0950726 commented 2025-11-14 14:13:51 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • c691e279 - style: two lines between top level declarations

Compare with previous version

added 1 commit <ul><li>c691e279 - style: two lines between top level declarations</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ri/-/merge_requests/9/diffs?diff_id=133627&start_sha=16b64e41c86ac141c7c17e0239893f62ea92ba1c)
0950726 commented 2025-11-14 14:15:00 +00:00 (Migrated from git.science.uu.nl)

approved this merge request

approved this merge request
0950726 commented 2025-11-14 14:15:07 +00:00 (Migrated from git.science.uu.nl)

mentioned in commit b05aa5e834

mentioned in commit b05aa5e834018c10bd9c4b8f0737ff7a16b90854
0950726 (Migrated from git.science.uu.nl) merged commit b05aa5e834 into dev 2025-11-14 14:15:07 +00:00
2584433 (Migrated from git.science.uu.nl) approved these changes 2026-02-02 13:26:45 +00:00
0950726 (Migrated from git.science.uu.nl) approved these changes 2026-02-02 13:26:45 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: pepperplus/pepperplus-ri#9