Repository: s4005236/wave
Pull request #16: feat: cicd actions
Author: login: s4005236
Labels: name: enhancement
description: New feature or request
name: DevOps
description: Label for DevOps tasks
Created: 2025-05-09T09:07:47Z | Merged: 2025-05-14T07:35:54Z

This PR includes changes in order to implement GitHub Actions and local pre-commit hooks correctly.

---

To get these functions to work, a restructure of the project was necessary. This however shouldn't change the preexisting workflow too much.

pre-commit hooks:
- black (code formatter)

GitHub Actions:
- pylint (checks code in comparison to the PEP 8 standard, fails if codebase has lower quality than 8.0/10 points)

Note: To get the functions to work, some testing was necessary. This also included committing and pushing to the repo. That's why the number of commits is that high. :)


Diff:
diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml
index 45dccb4..b28b926 100644
--- a/.github/workflows/pylint.yml
+++ b/.github/workflows/pylint.yml
@@ -1,9 +1,12 @@
 name: Pylint
 
-on: [push]
+on:
+  pull_request:
+    branches:
+      - main
 
 jobs:
-  build:
+  pylint:
     runs-on: ubuntu-latest
     strategy:
       matrix:
@@ -18,7 +21,8 @@ jobs:
       run: |
         python -m pip install --upgrade pip
         pip install poetry
-        poetry update
-    - name: Analysing the code with pylint
+        poetry install --no-root
+    - name: Run pylint
       run: |
-        pylint $(git ls-files '*.py')
+        poetry run pylint --rcfile=.pylintrc $(git ls-files '*.py')
+#       continue-on-error: true
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 61a2b94..fc0773c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,17 +1,8 @@
 repos:
--   repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v3.2.0
+  - repo: https://github.com/psf/black
+    rev: 24.4.0
     hooks:
-    -   id: trailing-whitespace
-    -   id: end-of-file-fixer
-    -   id: check-yaml
-    -   id: check-added-large-files
--   repo: https://github.com/psf/black
-    rev: v25.1.0
-    hooks:
-    -   id: black
-        language_version: python3.12
--   repo: https://gitlab.com/pycqa/flake8
-    rev: v7.1.2
-    hooks:
-    - id: flake8
+      - id: black
+        args: [--color, --verbose]
+        pass_filenames: true
+        language_version: python3.12
\ No newline at end of file
diff --git a/.pylintrc b/.pylintrc
index bd9397b..8a787ff 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -39,7 +39,7 @@ extension-pkg-whitelist=
 fail-on=
 
 # Specify a score threshold under which the program will exit with error.
-fail-under=10
+fail-under=8.0
 
 # Interpret the stdin as a python script, whose filename needs to be passed as
 # the module_or_package argument.
@@ -119,7 +119,7 @@ unsafe-load-any-extension=no
 [BASIC]
 
 # Naming style matching correct argument names.
-argument-naming-style=camelCase
+argument-naming-style=snake_case
 
 # Regular expression matching correct argument names. Overrides argument-
 # naming-style. If left empty, argument names will be checked with the set
@@ -127,7 +127,7 @@ argument-naming-style=camelCase
 #argument-rgx=
 
 # Naming style matching correct attribute names.
-attr-naming-style=camelCase
+attr-naming-style=snake_case
 
 # Regular expression matching correct attribute names. Overrides attr-naming-
 # style. If left empty, attribute names will be checked with the set naming
@@ -147,7 +147,7 @@ bad-names=foo,
 bad-names-rgxs=
 
 # Naming style matching correct class attribute names.
-class-attribute-naming-style=any
+class-attribute-naming-style=snake_case
 
 # Regular expression matching correct class attribute names. Overrides class-
 # attribute-naming-style. If left empty, class attribute names will be checked
@@ -182,7 +182,7 @@ const-naming-style=UPPER_CASE
 docstring-min-length=-1
 
 # Naming style matching correct function names.
-function-naming-style=camelCase
+function-naming-style=snake_case
 
 # Regular expression matching correct function names. Overrides function-
 # naming-style. If left empty, function names will be checked with the set
@@ -205,7 +205,7 @@ good-names-rgxs=
 include-naming-hint=no
 
 # Naming style matching correct inline iteration names.
-inlinevar-naming-style=any
+inlinevar-naming-style=snake_case
 
 # Regular expression matching correct inline iteration names. Overrides
 # inlinevar-naming-style. If left empty, inline iteration names will be checked
@@ -213,14 +213,14 @@ inlinevar-naming-style=any
 #inlinevar-rgx=
 
 # Naming style matching correct method names.
-method-naming-style=camelCase
+method-naming-style=snake_case
 
 # Regular expression matching correct method names. Overrides method-naming-
 # style. If left empty, method names will be checked with the set naming style.
 #method-rgx=
 
 # Naming style matching correct module names.
-module-naming-style=camelCase
+module-naming-style=snake_case
 
 # Regular expression matching correct module names. Overrides module-naming-
 # style. If left empty, module names will be checked with the set naming style.
@@ -248,7 +248,7 @@ property-classes=abc.abstractproperty
 #typevar-rgx=
 
 # Naming style matching correct variable names.
-variable-naming-style=camelCase
+variable-naming-style=snake_case
 
 # Regular expression matching correct variable names. Overrides variable-
 # naming-style. If left empty, variable names will be checked with the set
@@ -345,7 +345,7 @@ indent-after-paren=4
 indent-string='    '
 
 # Maximum number of characters on a single line.
-max-line-length=100
+max-line-length=79
 
 # Maximum number of lines in a module.
 max-module-lines=1000
diff --git a/README.md b/README.md
index d14a450..d44943b 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,10 @@
-# Open Gangster
+# Wave
+
+## Quick Dev Setup
+At _root_ or in a submodule (at `core`, `image`, `device` or `ui`):
+
+__Step 1:__ Create a Virtual environment `.venv`.
+
+__Step 2:__ Run setup script: `python setup_dev.py`
+
+__All done!__ For further information view [DevOps docs](./docs/DevOps/DEPENDENCIES.md).
diff --git a/docs/DevOps/CODE_STYLING.md b/docs/DevOps/CODE_STYLING.md
new file mode 100644
index 0000000..ab722b1
--- /dev/null
+++ b/docs/DevOps/CODE_STYLING.md
@@ -0,0 +1,14 @@
+# Code Styling
+
+## Coding Standards
+This project follows the [PEP8](https://peps.python.org/pep-0008/) style code for Python code. Please ensure that your contributions adhere to this standard.
+
+## Tools
+To ensure compliance with this standard, the following tools are used in this project:
+
+### Locally (pre-commit)
+- **Black**: A code formatter for Python that enforces PEP8 by automatically reformatting code. If formatting issues are found, Black modifies the affected files. The commit fails, and you must stage the changes and retry the commit.
+- **(TODO) isort**: //
+
+### CI/CD
+- **Pylint**: Runs as a GitHub Action and rates the code from 0 to 10. A score of 10 means the code fully follows the style rules. The pipeline fails if the score is below 8.0.
diff --git a/docs/DevOps/DEPENDENCIES.md b/docs/DevOps/DEPENDENCIES.md
index 27b2155..5c8199d 100644
--- a/docs/DevOps/DEPENDENCIES.md
+++ b/docs/DevOps/DEPENDENCIES.md
@@ -5,24 +5,42 @@ Dependencies refer to all the external libraries, packages, or modules that the
 The goal is to give each module its specific dependencies, while still making it easy to install the requirements of the entire system without too much hassle.
 
 ## Structure
-This project uses [_poetry_](https://python-poetry.org/) for python packaging and dependency management. The pyproject.toml files are used to maintain global dependencies as well as local ones in the specific submodules. When setting up globally, all the local dependencies get merged by the pyproject.toml at root, so there is no need to setup all the modules manually.
+This project uses [_poetry_](https://python-poetry.org/) for python packaging and dependency management. The _pyproject.toml_ files are used to maintain global dependencies as well as local ones in the specific submodules. When setting up globally, all the local dependencies get merged by the _pyproject.toml_ at root, so there is no need to setup all the modules manually.
+Additionally, the project uses pre-commit hooks for different tasks. These need to be activated in order to benefit from the functions.
 
 ## Dev Dependency Setup
 > The steps below apply to both global and local submodule setups.
 
 At the project root or in one of the submodules ```src/<module-name>```:
 
-Preferably create a virtual environment  ```.venv``` in your chosen directory.
+__Step 1:__ Create a virtual environment  ```.venv``` in your chosen directory.
 
-Then run:
+__Step 2:__ Then you can run:
+```
+python setup_dev.py
+```
+This will call the setup script which does the following commands for you and sets up the project automatically.
+
+You're all set now!
+
+---
+
+__Alternatively:__ When setting up manually, instead of Step 2 you should run:
 ```
 pip install poetry
 poetry update
+pre-commit install
 ```
-This will install all packages currently specified in the pyproject.toml via _poetry_.
+This will install all packages currently specified in the pyproject.toml via _poetry_
+and also install all pre-commit hooks.
 
 ---
 
+## Useful poetry commands
+- To update all dependencies, run:
+```
+poetry update
+```
 - To add a new package, run:
 ```
 poetry add <package-name>
diff --git a/pyproject.toml b/pyproject.toml
index bb2815a..d4afc5f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,33 +1,20 @@
-[project]
-name = "open-gangster"
+[tool.poetry]
+name = "wave"
 version = "0.0.1"
 description = ""
 license = "GPLv3"
+readme = "README.md"
 authors = [
-    {name = "Raziel Kretschmer",email = "s4005251@ba-sachsen.de"},
-    {name = "Alexander Jahn",email = "s4005236@ba-sachsen.de"},
-    {name = "Maximilian Unger",email = "s4005395@ba-sachsen.de"},
-    {name = "Dustin Kowarsch",email = "s4005362@ba-sachsen.de"}
-]
-
-packages = [
-    { path = "core"},
-    { path = "device"},
-    { path = "image"},
-    { path = "ui"}
+    "Raziel Kretschmer <s4005251@edu.dhsn.de>",
+    "Alexander Jahn <s4005236@edu.dhsn.de>",
+    "Maximilian Unger <s4005395@edu.dhsn.de>",
+    "Jaden Dustin Kowarsch <s4005362@edu.dhsn.de>"
 ]
 
-readme = "README.md"
-
-[build-system]
-requires = ["poetry-core"]
-build-backend = "poetry.core.masonry.api"
-
 [tool.poetry.group.dev.dependencies]
-pre-commit = "4.1.0"
-pylint = "3.3.4"
-black = "25.1.0"
-flake8 = "7.1.2"
+pylint = "^3.3.7"
+pre-commit = "^4.2.0"
+black = "^25.1.0"
 
 [tool.poetry.dependencies]
 python = ">=3.12,<3.13"
@@ -37,9 +24,14 @@ device = { path = "./src/device" }
 image = { path = "./src/image" }
 ui = { path = "./src/ui" }
 
+[build-system]
+requires = ["poetry-core"]
+build-backend = "poetry.core.masonry.api"
+
 [tool.black]
 line-length = 79
-include = '\.pyi?$'
+target-version = ['py312']          # targets Python Version 3.12
+include = '\.pyi?$'                 #includes .py- and .pyi- files
 exclude = '''
 /(
     \.git
@@ -52,7 +44,7 @@ exclude = '''
   | build
   | dist
 )/
-'''
+'''                                 # standard excludes
 
 [tool.flake8]
 ignore = ["E203", "E266", "E501", "W503", "F403", "F401"]
diff --git a/setup_dev.py b/setup_dev.py
new file mode 100644
index 0000000..6293f7b
--- /dev/null
+++ b/setup_dev.py
@@ -0,0 +1,46 @@
+"""
+This script sets up the project by
+installing dependencies and setting up pre-commit hooks.
+"""
+
+import subprocess
+import sys
+import os
+
+
+def run(cmd: str):
+    """
+    Run a shell command and exit if it fails.
+
+    Args
+        - cmd (str): The command to run.
+
+    """
+    print(f"→ {cmd}")
+    result = subprocess.run(cmd, shell=True, check=False)
+    if result.returncode != 0:
+        sys.exit(result.returncode)
+
+
+def main():
+    """
+    Defines the commands to setup the project.
+    workload:
+        - Upgrade pip
+        - Install pip and poetry
+        - Install dependencies using poetry
+        - Install pre-commit hooks
+    """
+
+    if os.path.exists(".venv"):
+        print("Virtual environment found. Proceeding with setup.")
+        run("pip install --upgrade pip")
+        run("pip install poetry")
+        run("poetry update")
+        run("pre-commit install")
+    else:
+        print("WARNING: No virtual environment '.venv'. Canceling auto-setup.")
+
+
+if __name__ == "__main__":
+    main()
diff --git a/src/core/pyproject.toml b/src/core/pyproject.toml
index e3562eb..8f8008b 100644
--- a/src/core/pyproject.toml
+++ b/src/core/pyproject.toml
@@ -7,3 +7,7 @@ requires-python = ">=3.12"
 
 [tool.poetry.dependencies]
 pyyaml = "^6.0.2"
+
+[tool.poetry.group.dev.dependencies]
+pre-commit = "^4.2.0"
+
diff --git a/src/core/setup_dev.py b/src/core/setup_dev.py
new file mode 100644
index 0000000..6293f7b
--- /dev/null
+++ b/src/core/setup_dev.py
@@ -0,0 +1,46 @@
+"""
+This script sets up the project by
+installing dependencies and setting up pre-commit hooks.
+"""
+
+import subprocess
+import sys
+import os
+
+
+def run(cmd: str):
+    """
+    Run a shell command and exit if it fails.
+
+    Args
+        - cmd (str): The command to run.
+
+    """
+    print(f"→ {cmd}")
+    result = subprocess.run(cmd, shell=True, check=False)
+    if result.returncode != 0:
+        sys.exit(result.returncode)
+
+
+def main():
+    """
+    Defines the commands to setup the project.
+    workload:
+        - Upgrade pip
+        - Install pip and poetry
+        - Install dependencies using poetry
+        - Install pre-commit hooks
+    """
+
+    if os.path.exists(".venv"):
+        print("Virtual environment found. Proceeding with setup.")
+        run("pip install --upgrade pip")
+        run("pip install poetry")
+        run("poetry update")
+        run("pre-commit install")
+    else:
+        print("WARNING: No virtual environment '.venv'. Canceling auto-setup.")
+
+
+if __name__ == "__main__":
+    main()
diff --git a/src/core/core.py b/src/core/src/core.py
similarity index 65%
rename from src/core/core.py
rename to src/core/src/core.py
index d06c071..b4c7a4d 100644
--- a/src/core/core.py
+++ b/src/core/src/core.py
@@ -1,13 +1,13 @@
 import yaml
-from .gesture import Gesture
-from ..enums.gesture_types import GestureTypes
-from ..enums.bodyparts import Fingers
 import logging
+from src.core.src.gesture import Gesture
+from src.enums.gesture_types import GestureTypes
+from src.enums.bodyparts import Fingers
 
 log = logging.getLogger(__name__)
 
 
-class Core():
+class Core:
     """
     The core module of this project.
     Handles the config and communication between the other modules.
@@ -31,14 +31,18 @@ def reload_config(self, file: str = "config.yml") -> None:
                 continue
             else:
                 self._gesture_ids.append(gesture_id)
-                self.gestures.append(Gesture(
-                    gesture_id, gesture["name"],
-                    type=GestureTypes(gesture["type"].lower()),
-                    power=int(gesture["power"]),
-                    events=gesture["events"],
-                    components=[Fingers(finger.lower())
-                                for finger in gesture["components"]]
-                )
+                self.gestures.append(
+                    Gesture(
+                        gesture_id,
+                        gesture["name"],
+                        type=GestureTypes(gesture["type"].lower()),
+                        power=int(gesture["power"]),
+                        events=gesture["events"],
+                        components=[
+                            Fingers(finger.lower())
+                            for finger in gesture["components"]
+                        ],
+                    )
                 )
 
     def start(self) -> None:
diff --git a/src/core/gesture.py b/src/core/src/gesture.py
similarity index 80%
rename from src/core/gesture.py
rename to src/core/src/gesture.py
index 46b0e57..56cd00d 100644
--- a/src/core/gesture.py
+++ b/src/core/src/gesture.py
@@ -1,12 +1,13 @@
 from dataclasses import dataclass, field
-from ..enums.gesture_types import GestureTypes
-from ..enums.bodyparts import Fingers
 from uuid import UUID, uuid4
+from src.enums.gesture_types import GestureTypes
+from src.enums.bodyparts import Fingers
 
 
 @dataclass
-class Gesture():
+class Gesture:
     """A base class representing a gesture."""
+
     id: str
     name: str
     type: GestureTypes
diff --git a/src/device/__init__.py b/src/device/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/src/device/setup_dev.py b/src/device/setup_dev.py
new file mode 100644
index 0000000..6293f7b
--- /dev/null
+++ b/src/device/setup_dev.py
@@ -0,0 +1,46 @@
+"""
+This script sets up the project by
+installing dependencies and setting up pre-commit hooks.
+"""
+
+import subprocess
+import sys
+import os
+
+
+def run(cmd: str):
+    """
+    Run a shell command and exit if it fails.
+
+    Args
+        - cmd (str): The command to run.
+
+    """
+    print(f"→ {cmd}")
+    result = subprocess.run(cmd, shell=True, check=False)
+    if result.returncode != 0:
+        sys.exit(result.returncode)
+
+
+def main():
+    """
+    Defines the commands to setup the project.
+    workload:
+        - Upgrade pip
+        - Install pip and poetry
+        - Install dependencies using poetry
+        - Install pre-commit hooks
+    """
+
+    if os.path.exists(".venv"):
+        print("Virtual environment found. Proceeding with setup.")
+        run("pip install --upgrade pip")
+        run("pip install poetry")
+        run("poetry update")
+        run("pre-commit install")
+    else:
+        print("WARNING: No virtual environment '.venv'. Canceling auto-setup.")
+
+
+if __name__ == "__main__":
+    main()
diff --git a/src/enums/bodyparts.py b/src/enums/bodyparts.py
index 694ce31..2f828da 100644
--- a/src/enums/bodyparts.py
+++ b/src/enums/bodyparts.py
@@ -1,5 +1,6 @@
 from enum import StrEnum, auto
 
+
 class Fingers(StrEnum):
     LTHUMB = auto()
     LINDEX = auto()
diff --git a/src/image/__init__.py b/src/image/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/src/image/setup_dev.py b/src/image/setup_dev.py
new file mode 100644
index 0000000..6293f7b
--- /dev/null
+++ b/src/image/setup_dev.py
@@ -0,0 +1,46 @@
+"""
+This script sets up the project by
+installing dependencies and setting up pre-commit hooks.
+"""
+
+import subprocess
+import sys
+import os
+
+
+def run(cmd: str):
+    """
+    Run a shell command and exit if it fails.
+
+    Args
+        - cmd (str): The command to run.
+
+    """
+    print(f"→ {cmd}")
+    result = subprocess.run(cmd, shell=True, check=False)
+    if result.returncode != 0:
+        sys.exit(result.returncode)
+
+
+def main():
+    """
+    Defines the commands to setup the project.
+    workload:
+        - Upgrade pip
+        - Install pip and poetry
+        - Install dependencies using poetry
+        - Install pre-commit hooks
+    """
+
+    if os.path.exists(".venv"):
+        print("Virtual environment found. Proceeding with setup.")
+        run("pip install --upgrade pip")
+        run("pip install poetry")
+        run("poetry update")
+        run("pre-commit install")
+    else:
+        print("WARNING: No virtual environment '.venv'. Canceling auto-setup.")
+
+
+if __name__ == "__main__":
+    main()
diff --git a/src/ui/__init__.py b/src/ui/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/src/ui/setup_dev.py b/src/ui/setup_dev.py
new file mode 100644
index 0000000..6293f7b
--- /dev/null
+++ b/src/ui/setup_dev.py
@@ -0,0 +1,46 @@
+"""
+This script sets up the project by
+installing dependencies and setting up pre-commit hooks.
+"""
+
+import subprocess
+import sys
+import os
+
+
+def run(cmd: str):
+    """
+    Run a shell command and exit if it fails.
+
+    Args
+        - cmd (str): The command to run.
+
+    """
+    print(f"→ {cmd}")
+    result = subprocess.run(cmd, shell=True, check=False)
+    if result.returncode != 0:
+        sys.exit(result.returncode)
+
+
+def main():
+    """
+    Defines the commands to setup the project.
+    workload:
+        - Upgrade pip
+        - Install pip and poetry
+        - Install dependencies using poetry
+        - Install pre-commit hooks
+    """
+
+    if os.path.exists(".venv"):
+        print("Virtual environment found. Proceeding with setup.")
+        run("pip install --upgrade pip")
+        run("pip install poetry")
+        run("poetry update")
+        run("pre-commit install")
+    else:
+        print("WARNING: No virtual environment '.venv'. Canceling auto-setup.")
+
+
+if __name__ == "__main__":
+    main()


Reviews:
user: login: Duspli
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-09T11:06:40Z
user: login: Duspli
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-09T11:28:29Z
user: login: FGBxRamel
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-09T20:57:04Z
user: login: FGBxRamel
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-09T20:58:12Z
user: login: FGBxRamel
body: Good work on the config files. 

*Please merge less commits!*. Please use [tools for rewriting git history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History) and [force push](https://git-scm.com/docs/git-push#Documentation/git-push.txt---force) to cleanup the commits.
state: CHANGES_REQUESTED
author_association: COLLABORATOR
submitted_at: 2025-05-09T21:33:27Z
user: login: FGBxRamel
body: Changes lgtm; still open question: Why do we have 4 setups files?
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-12T07:56:27Z
user: login: FGBxRamel
body: Lgtm
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-12T08:10:28Z
user: login: FGBxRamel
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-12T08:11:53Z
user: login: s4005236
state: COMMENTED
author_association: OWNER
submitted_at: 2025-05-12T09:28:17Z
user: login: s4005236
state: COMMENTED
author_association: OWNER
submitted_at: 2025-05-12T09:43:35Z
user: login: s4005236
state: COMMENTED
author_association: OWNER
submitted_at: 2025-05-12T09:52:43Z
user: login: s4005395
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T11:35:28Z
user: login: Duspli
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-14T06:43:02Z
user: login: FGBxRamel
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-14T07:04:14Z
user: login: s4005236
state: COMMENTED
author_association: OWNER
submitted_at: 2025-05-14T07:09:55Z
user: login: FGBxRamel
body: Lgtm, nice work
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-14T07:33:17Z

Review comments:
diff_hunk: @@ -119,15 +119,15 @@ unsafe-load-any-extension=no
 [BASIC]
 
 # Naming style matching correct argument names.
-argument-naming-style=camelCase
+argument-naming-style=snake_case
path: .pylintrc
user: login: Duspli
body: Why are we using snake_case and not camelCase? Did this decision happen in accordance to all team members? 

created_at: 2025-05-09T10:32:12Z
author_association: COLLABORATOR
diff_hunk: @@ -1,13 +1,13 @@
 import yaml
-from .gesture import Gesture
-from ..enums.gesture_types import GestureTypes
-from ..enums.bodyparts import Fingers
 import logging
+from src.core.src.gesture import Gesture
path: src/core/src/core.py
user: login: Duspli
body: Request: May somebody explain the src folder inside the src folder to me? There has to be a less redundant solution for this?
created_at: 2025-05-09T10:55:57Z
author_association: COLLABORATOR
path: src/core/setup.py
user: login: Duspli
body: Why do we need four exactly identical setup.py files?
created_at: 2025-05-09T10:59:06Z
author_association: COLLABORATOR
diff_hunk: @@ -1 +1,10 @@
 # Open Gangster
path: README.md
user: login: Duspli
body: Could you change Open Gangster to WAVE pls? :)
created_at: 2025-05-09T11:28:29Z
author_association: COLLABORATOR
diff_hunk: @@ -119,15 +119,15 @@ unsafe-load-any-extension=no
 [BASIC]
 
 # Naming style matching correct argument names.
-argument-naming-style=camelCase
+argument-naming-style=snake_case
path: .pylintrc
user: login: FGBxRamel
body: And to add the @Duspli s comment: Is this documented somewhere? Using snake case adheres to PEP 8, but is this documented?
created_at: 2025-05-09T20:57:04Z
author_association: COLLABORATOR
diff_hunk: @@ -1,13 +1,13 @@
 import yaml
-from .gesture import Gesture
-from ..enums.gesture_types import GestureTypes
-from ..enums.bodyparts import Fingers
 import logging
+from src.core.src.gesture import Gesture
path: src/core/src/core.py
user: login: FGBxRamel
body: I could, but I would be interested in why this change is in this PR in the first place? This has nothing to do with the original intention of the PR if I'm not missing something?
created_at: 2025-05-09T20:58:12Z
author_association: COLLABORATOR
diff_hunk: @@ -1,33 +1,20 @@
-[project]
-name = "open-gangster"
+[tool.poetry]
+name = "wave"
 version = "0.0.1"
 description = ""
 license = "GPLv3"
+readme = "README.md"
 authors = [
-    {name = "Raziel Kretschmer",email = "s4005251@ba-sachsen.de"},
-    {name = "Alexander Jahn",email = "s4005236@ba-sachsen.de"},
-    {name = "Maximilian Unger",email = "s4005395@ba-sachsen.de"},
-    {name = "Dustin Kowarsch",email = "s4005362@ba-sachsen.de"}
-]
-
-packages = [
-    { path = "core"},
-    { path = "device"},
-    { path = "image"},
-    { path = "ui"}
+    "Raziel Kretschmer <s4005251@ba-sachsen.de>",
+    "Alexander Jahn <s4005236@ba-sachsen.de>",
+    "Maximilian Unger <s4005395@ba-sachsen.de>",
+    "Dustin Kowarsch <s4005362@ba-sachsen.de>"
path: pyproject.toml
user: login: FGBxRamel
body: Please change the email addresses to the new domain format
created_at: 2025-05-09T21:26:14Z
author_association: COLLABORATOR
path: src/core/src/core.py
user: login: FGBxRamel
body: What exactly are these changes? Why are they necessary?
created_at: 2025-05-09T21:28:53Z
author_association: COLLABORATOR
diff_hunk: @@ -119,15 +119,15 @@ unsafe-load-any-extension=no
 [BASIC]
 
 # Naming style matching correct argument names.
-argument-naming-style=camelCase
+argument-naming-style=snake_case
path: .pylintrc
user: login: FGBxRamel
body: Resolved by [docs: add code styling](https://github.com/s4005236/wave/pull/16/commits/e67f03653fdcb50e3044bc06ca8c87482ab41fb0)
created_at: 2025-05-12T08:11:52Z
author_association: COLLABORATOR
path: src/core/src/core.py
user: login: s4005236
body: The changes to some python files (e.g. core.py, gestures.py) are done automatically by the black formatter. They don't add or change anything when it comes to the functionalities of the files. Only the imports are corrected because of the structure change in order for them to work as intended.

If these style changes should not be in this commit, it would also be possible to revert them. They will get formatted again once someone commits changes to these files.
created_at: 2025-05-12T09:28:17Z
author_association: OWNER
path: src/core/setup.py
user: login: s4005236
body: The global setup_dev.py is for working with the whole project. When working on a specific submodule, a developer might only open up the corresponding folder. There, they can just run the normal `python setup_dev.py` command like they would at root, without the need to first build the project globally. This would mean opening up project at root, running the command, changing folder back to submodule, which would remove the purpose of the setup-file to make setting up easier.

tl;dr: Make working with the submodules-folders more convenient, remove the need to use the global setup file.
created_at: 2025-05-12T09:43:35Z
author_association: OWNER
diff_hunk: @@ -1,13 +1,13 @@
 import yaml
-from .gesture import Gesture
-from ..enums.gesture_types import GestureTypes
-from ..enums.bodyparts import Fingers
 import logging
+from src.core.src.gesture import Gesture
path: src/core/src/core.py
user: login: s4005236
body: The src-structure is necessary for poetry to recognize the modules as packages. Without it, errors occure, e.g. when there is more than one python file at submodule-root. (E.g. currently at main, building the "core" package fails, because it detects "core.py" and "gestures.py".)

Without the structure change, the whole setup wouldn't work as intended because of said error. For the intention of the PR to introduce a working CI/CD pipeline, the structure change was necessary.
created_at: 2025-05-12T09:52:43Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,14 @@
+# Code Styling
+
+## Coding Standards
+This project follows the [PEP8](https://peps.python.org/pep-0008/) style code for Python code. Please ensure that your contributions adhere to this standard.
+
+## Tools
+To ensure compliance with this standard, the following tools are used in this project:
+
+### Locally (pre-commit)
+- **Black**: A code formatter for Python that enforces PEP8 by automatically reformatting code. If formatting issues are found, Black modifies the affected files. The commit fails, and you must stage the changes and retry the commit.
+- **(TODO) isort**: //
path: docs/DevOps/CODE_STYLING.md
user: login: FGBxRamel
body: Is this missing or will this not be part of the PR?
created_at: 2025-05-12T11:59:39Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,14 @@
+# Code Styling
+
+## Coding Standards
+This project follows the [PEP8](https://peps.python.org/pep-0008/) style code for Python code. Please ensure that your contributions adhere to this standard.
+
+## Tools
+To ensure compliance with this standard, the following tools are used in this project:
+
+### Locally (pre-commit)
+- **Black**: A code formatter for Python that enforces PEP8 by automatically reformatting code. If formatting issues are found, Black modifies the affected files. The commit fails, and you must stage the changes and retry the commit.
+- **(TODO) isort**: //
path: docs/DevOps/CODE_STYLING.md
user: login: s4005236
body: isort will be implemented in a future PR. This is just a note to not forget about documenting it.
created_at: 2025-05-14T07:09:55Z
author_association: OWNER

PR comments:
user: login: s4005236
created_at: 2025-05-12T07:15:17Z
body: > Good work on the config files.
> 
> _Please merge less commits!_. Please use [tools for rewriting git history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History) and [force push](https://git-scm.com/docs/git-push#Documentation/git-push.txt---force) to cleanup the commits.

In your opinion @FGBxRamel , what is good number of commits to put in a merge? (asking for this and future PRs)
author_association: OWNER
user: login: FGBxRamel
created_at: 2025-05-12T08:09:33Z
body: > > Good work on the config files.
> > _Please merge less commits!_. Please use [tools for rewriting git history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History) and [force push](https://git-scm.com/docs/git-push#Documentation/git-push.txt---force) to cleanup the commits.
> 
> In your opinion @FGBxRamel , what is good number of commits to put in a merge? (asking for this and future PRs)

@s4005236 Sorry, my phrasing was not quite accurate. It's not really about some made up number, but more about a clean history. For example:
The commits: [test: let pylint be correct](https://github.com/s4005236/wave/pull/16/commits/ef3a6b34917c2d6a78dd775305e0031f9c3a1ae8) and [rev: rev config from test](https://github.com/s4005236/wave/pull/16/commits/df0dce75a4367a1f2c317debb11a62d0d0dead16) should be merged to e.g. "feat: Working pylint config"

"test" is generally only used if unit-tests or something similar is changed or added. Everything else where you *literally* test a config should afterwards be merged / rewritten to make a meaningful commit. This is especially true for when the test is reverted afterwards, as these two actions have no meaning or value standalone in the git history. Note that not all reverted commits have to be merged. Sometimes it's good to leave a revert-commit in the history, just to show others that some approach didn't work.

Another example of the above (but not limited to) would be these three commits:
1. [test: black output](https://github.com/s4005236/wave/pull/16/commits/f24d3995ed69436183b427023fa4f0f7e2d69bff)
2. [test: check black output](https://github.com/s4005236/wave/pull/16/commits/ab2df397b3286848649e62b4e702970ec90e25a7)
3. [style: auto-format project with black](https://github.com/s4005236/wave/pull/16/commits/0959a4dfae182a59cca3542936a9375c3a466c82)

I would argue that it would be good practice to merge these three into the last one, as the two tests are not adding any value.
author_association: COLLABORATOR
user: login: s4005236
created_at: 2025-05-14T05:57:55Z
body: > Changes lgtm; still open question: Why do we have 4 setups files? @FGBxRamel 

answered at https://github.com/s4005236/wave/pull/16#discussion_r2084278156




author_association: OWNER
user: login: s4005236
created_at: 2025-05-14T06:01:03Z
body: > > > Good work on the config files.
> > > _Please merge less commits!_. Please use [tools for rewriting git history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History) and [force push](https://git-scm.com/docs/git-push#Documentation/git-push.txt---force) to cleanup the commits.
> > 
> > 
> > In your opinion @FGBxRamel , what is good number of commits to put in a merge? (asking for this and future PRs)
> 
> @s4005236 Sorry, my phrasing was not quite accurate. It's not really about some made up number, but more about a clean history. For example: The commits: [test: let pylint be correct](https://github.com/s4005236/wave/pull/16/commits/ef3a6b34917c2d6a78dd775305e0031f9c3a1ae8) and [rev: rev config from test](https://github.com/s4005236/wave/pull/16/commits/df0dce75a4367a1f2c317debb11a62d0d0dead16) should be merged to e.g. "feat: Working pylint config"
> 
> "test" is generally only used if unit-tests or something similar is changed or added. Everything else where you _literally_ test a config should afterwards be merged / rewritten to make a meaningful commit. This is especially true for when the test is reverted afterwards, as these two actions have no meaning or value standalone in the git history. Note that not all reverted commits have to be merged. Sometimes it's good to leave a revert-commit in the history, just to show others that some approach didn't work.
> 
> Another example of the above (but not limited to) would be these three commits:
> 
> 1. [test: black output](https://github.com/s4005236/wave/pull/16/commits/f24d3995ed69436183b427023fa4f0f7e2d69bff)
> 2. [test: check black output](https://github.com/s4005236/wave/pull/16/commits/ab2df397b3286848649e62b4e702970ec90e25a7)
> 3. [style: auto-format project with black](https://github.com/s4005236/wave/pull/16/commits/0959a4dfae182a59cca3542936a9375c3a466c82)
> 
> I would argue that it would be good practice to merge these three into the last one, as the two tests are not adding any value.

@FGBxRamel 
Rebased the history, squashed all test commits that don't add significant value.

author_association: OWNER