refactor: remove constants and put in config file #24

Merged
8464960 merged 14 commits from refactor/config-file into dev 2025-11-19 16:31:52 +00:00
8464960 commented 2025-11-09 13:50:03 +00:00 (Migrated from git.science.uu.nl)

Description
removed all constants from all files and put them in src/control_backend/core/config.py
(also removed old mock agents that we don't use anymore)

For merge request review the following things

  • Check if all tests still run (see readme)
  • Check if in all the files in the project there are no magic numbers
  • Check if the changes to the tests that I made (using monkeymock) makes sense to you

ref: N25B-236

**Description** removed all constants from all files and put them in src/control_backend/core/config.py (also removed old mock agents that we don't use anymore) For merge request review the following things - [x] Check if all tests still run (see readme) - [x] Check if in all the files in the project there are no magic numbers - [x] Check if the changes to the tests that I made (using monkeymock) makes sense to you ref: N25B-236
8464960 commented 2025-11-09 13:50:03 +00:00 (Migrated from git.science.uu.nl)

assigned to @8464960

assigned to @8464960
0950726 commented 2025-11-18 08:07:47 +00:00 (Migrated from git.science.uu.nl)

Integration tests fail with "AttributeError: 'AgentSettings' object has no attribute 'behaviour_settings'"

                    await asyncio.sleep(settings.behaviour_settings.ping_sleep_s)
Integration tests fail with "AttributeError: 'AgentSettings' object has no attribute 'behaviour_settings'" ```suggestion:-0+0 await asyncio.sleep(settings.behaviour_settings.ping_sleep_s) ```
0950726 commented 2025-11-18 08:15:55 +00:00 (Migrated from git.science.uu.nl)

Runtime error (strange that this isn't caught by tests):

            max_concurrent_tasks = settings.behaviour_settings.transcription_max_concurrent_tasks
Runtime error (strange that this isn't caught by tests): ```suggestion:-0+0 max_concurrent_tasks = settings.behaviour_settings.transcription_max_concurrent_tasks ```
0950726 commented 2025-11-18 08:23:58 +00:00 (Migrated from git.science.uu.nl)

This was not meant to be configurable. This number needs to be as low as possible so that it clears the queue as soon as possible. I think a comment describing the behavior would fit better.

        # Poll for the shortest amount of time possible to clear the queue
        while await self.audio_in_poller.poll(1) is not None:
This was not meant to be configurable. This number needs to be as low as possible so that it clears the queue as soon as possible. I think a comment describing the behavior would fit better. ```suggestion:-1+0 # Poll for the shortest amount of time possible to clear the queue while await self.audio_in_poller.poll(1) is not None: ```
0950726 commented 2025-11-18 08:24:59 +00:00 (Migrated from git.science.uu.nl)

If my previous comment about the queue resetting timeout is approved, then this is no longer needed.

If my previous comment about the queue resetting timeout is approved, then this is no longer needed. ```suggestion:-0+0 ```
0950726 commented 2025-11-18 08:34:01 +00:00 (Migrated from git.science.uu.nl)

Docstring was removed?

async def simulate_streaming_with_probabilities(streaming, probabilities: list[float]):
    """
    Simulates a streaming scenario with given VAD model probabilities for testing purposes.

    :param streaming: The streaming component to be tested.
    :param probabilities: A list of probabilities representing the outputs of the VAD model.
    """
    model_item = MagicMock()
Docstring was removed? ```suggestion:-1+0 async def simulate_streaming_with_probabilities(streaming, probabilities: list[float]): """ Simulates a streaming scenario with given VAD model probabilities for testing purposes. :param streaming: The streaming component to be tested. :param probabilities: A list of probabilities representing the outputs of the VAD model. """ model_item = MagicMock() ```
0950726 commented 2025-11-18 08:39:19 +00:00 (Migrated from git.science.uu.nl)

Docstring gone here too

async def test_voice_activity_detected(audio_in_socket, audio_out_socket, streaming):
    """
    Test a scenario where there is voice activity detected between silences.
    """
    speech_chunk_count = 5
Docstring gone here too ```suggestion:-1+0 async def test_voice_activity_detected(audio_in_socket, audio_out_socket, streaming): """ Test a scenario where there is voice activity detected between silences. """ speech_chunk_count = 5 ```
0950726 commented 2025-11-18 08:40:30 +00:00 (Migrated from git.science.uu.nl)

Probably delete this file?

Probably delete this file?
0950726 commented 2025-11-18 08:40:54 +00:00 (Migrated from git.science.uu.nl)

marked the checklist item Check if the changes to the tests that I made (using monkeymock) makes sense to you as completed

marked the checklist item **Check if the changes to the tests that I made (using monkeymock) makes sense to you** as completed
0950726 commented 2025-11-18 08:44:03 +00:00 (Migrated from git.science.uu.nl)

marked the checklist item Check if in all the files in the project there are no magic numbers as completed

marked the checklist item **Check if in all the files in the project there are no magic numbers** as completed
8464960 commented 2025-11-19 11:48:05 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133790&start_sha=e1918325e200e3245a0c1580d343c8088ad2bfcf#0df364dcb30720c83c10dad3c7bae0c633022403_59_59)
8464960 commented 2025-11-19 11:48:05 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • d60df217 - Apply 1 suggestion(s) to 1 file(s)

Compare with previous version

added 1 commit <ul><li>d60df217 - Apply 1 suggestion(s) to 1 file(s)</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133790&start_sha=e1918325e200e3245a0c1580d343c8088ad2bfcf)
8464960 commented 2025-11-19 11:48:13 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133791&start_sha=d60df2174cbcabb510e621c581082350d58cbf03#162ee11400cb15ab4c74536eac1d8d1653cc629d_31_31)
8464960 commented 2025-11-19 11:48:14 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 7120a7a8 - Apply 1 suggestion(s) to 1 file(s)

Compare with previous version

added 1 commit <ul><li>7120a7a8 - Apply 1 suggestion(s) to 1 file(s)</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133791&start_sha=d60df2174cbcabb510e621c581082350d58cbf03)
8464960 commented 2025-11-19 11:48:32 +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-cb/-/merge_requests/24/diffs?diff_id=133792&start_sha=7120a7a8aa5a9c43cb2d0ee19fa6232d2fbd3eba#b057053c3771786eab8dc7e2da4608773ee5a46a_68_67)
8464960 commented 2025-11-19 11:48:33 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • f74efba5 - Apply 1 suggestion(s) to 1 file(s)

Compare with previous version

added 1 commit <ul><li>f74efba5 - Apply 1 suggestion(s) to 1 file(s)</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133792&start_sha=7120a7a8aa5a9c43cb2d0ee19fa6232d2fbd3eba)
8464960 commented 2025-11-19 11:48:51 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 5 of the diff

changed this line in [version 5 of the diff](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133793&start_sha=f74efba5119fb07b0487e31d974d1ddb9bd158a1#d42409aff0956018b2610536c113bdddb61764d7_41_41)
8464960 commented 2025-11-19 11:48:52 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 6436fc12 - Apply 1 suggestion(s) to 1 file(s)

Compare with previous version

added 1 commit <ul><li>6436fc12 - Apply 1 suggestion(s) to 1 file(s)</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133793&start_sha=f74efba5119fb07b0487e31d974d1ddb9bd158a1)
8464960 commented 2025-11-19 11:50:11 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 1372fe89 - Apply 1 suggestion(s) to 1 file(s)

Compare with previous version

added 1 commit <ul><li>1372fe89 - Apply 1 suggestion(s) to 1 file(s)</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133794&start_sha=6436fc12c8df9d491e422d0b200733397a8252e7)
8464960 commented 2025-11-19 11:50:20 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 98dd2637 - Apply 1 suggestion(s) to 1 file(s)

Compare with previous version

added 1 commit <ul><li>98dd2637 - Apply 1 suggestion(s) to 1 file(s)</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133795&start_sha=1372fe89f63b6c4d3a7aadd118d306cb37a2c83b)
8464960 commented 2025-11-19 12:05:59 +00:00 (Migrated from git.science.uu.nl)

changed this file in version 8 of the diff

changed this file in [version 8 of the diff](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133798&start_sha=98dd2637c0b867e08d04ffef821cb57a05151b4d#bac8d13864dce207be3f68b57ce9082d12e53a19)
8464960 commented 2025-11-19 12:05:59 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 93b8db03 - fix: delete personal git history file

Compare with previous version

added 1 commit <ul><li>93b8db03 - fix: delete personal git history file</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133798&start_sha=98dd2637c0b867e08d04ffef821cb57a05151b4d)
8464960 commented 2025-11-19 12:06:33 +00:00 (Migrated from git.science.uu.nl)

resolved all threads

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

changed this line in version 9 of the diff

changed this line in [version 9 of the diff](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133857&start_sha=93b8db03e76c864012a6d226fc5c2a970f9c48a5#b0514a55af27ad386d5e1f57d2372dd19bb2bf7d_62_0)
0950726 commented 2025-11-19 16:31:13 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 9 of the diff

changed this line in [version 9 of the diff](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133857&start_sha=93b8db03e76c864012a6d226fc5c2a970f9c48a5#b0514a55af27ad386d5e1f57d2372dd19bb2bf7d_80_0)
0950726 commented 2025-11-19 16:31:13 +00:00 (Migrated from git.science.uu.nl)

added 37 commits

  • 93b8db03...99631342 - 36 commits from branch dev
  • 64db25c9 - Merge remote-tracking branch 'origin/dev' into refactor/config-file

Compare with previous version

added 37 commits <ul><li>93b8db03...99631342 - 36 commits from branch <code>dev</code></li><li>64db25c9 - Merge remote-tracking branch &#39;origin/dev&#39; into refactor/config-file</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-cb/-/merge_requests/24/diffs?diff_id=133857&start_sha=93b8db03e76c864012a6d226fc5c2a970f9c48a5)
0950726 commented 2025-11-19 16:31:31 +00:00 (Migrated from git.science.uu.nl)

marked the checklist item Check if all tests still run (see readme) as completed

marked the checklist item **Check if all tests still run (see readme)** as completed
2584433 commented 2025-11-19 16:31:48 +00:00 (Migrated from git.science.uu.nl)

approved this merge request

approved this merge request
0950726 commented 2025-11-19 16:31:52 +00:00 (Migrated from git.science.uu.nl)

mentioned in commit 884e03bc44

mentioned in commit 884e03bc44397177befaea07c60f33bf7b0ba9cd
0950726 (Migrated from git.science.uu.nl) merged commit 884e03bc44 into dev 2025-11-19 16:31:52 +00:00
2584433 (Migrated from git.science.uu.nl) approved these changes 2026-02-02 13:29:06 +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-cb#24