Commit Graph
34 Commits
Author SHA1 Message Date
kevinveenbirkenbach 67fadb57b8 refactor: normalize inventory filename to devices 2026-03-28 05:40:13 +01:00
kevinveenbirkenbach 189267496d Rename module_utils package to utils 2026-03-21 02:05:39 +01:00
kevinveenbirkenbach 44ea2df452 Fix dev workflow image build and docker repo bootstrap 2026-03-19 19:11:51 +01:00
kevinveenbirkenbach ad3f159548 Require Docker Compose in dev packaging 2026-03-19 11:25:49 +01:00
kevinveenbirkenbach ec30948546 fix(deploy): use bash -lc for commands with pipefail 2026-02-21 16:05:42 +01:00
kevinveenbirkenbach 0710c41f91 fix(ci): run mirror resolver with venv python in container 2026-02-20 11:25:46 +01:00
kevinveenbirkenbach efe2ea3357 **test: align deployment type tests with invokable-based semantics**
Update unit tests to reflect the new invokable-driven classification logic by mocking invokable path discovery, removing legacy alias expectations, and adding coverage for universal and mixed cases. Also relocate CLI deploy tests into the unit test hierarchy for consistency.
2026-02-10 21:38:02 +01:00
kevinveenbirkenbach 5acce545e1 refactor(cli): remove sound, alarm and server-type flags
Drop the sound/alarm subsystem and deprecated CLI flags.

* Remove --sound, --no-signal and --alarm-timeout
* Remove server-type flag (-T / TEST_DEPLOY_TYPE)
* Delete sound-related modules
* Simplify RunConfig and runner error handling
* Update help output, scripts and tests
* Remove optional audio extras from pyproject.toml

https://chatgpt.com/share/698b74f1-0c0c-800f-98c4-183697d6a2a0
2026-02-10 19:10:37 +01:00
kevinveenbirkenbach 84782f3b22 refactor(invokable): centralize app discovery, add type grouping, and derive deploy stages from inventory groups
https://chatgpt.com/share/698b0039-c4c4-800f-b962-7033324c07a8
2026-02-10 10:53:53 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI c84616fd50 Potential fix for code scanning alert no. 168: Module is imported with 'import' and 'import from'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-09 07:59:57 +01:00
kevinveenbirkenbach 8a81630391 Added newline at file and POSIX compatible 2026-02-04 19:49:56 +01:00
kevinveenbirkenbach a565344ed5 Solved shellcheck 2026-01-21 00:25:35 +01:00
kevinveenbirkenbach ea78ff376f test(container): adapt CLI tests for required INVENTORY_DIR and forwarding
- add --inventory-dir to container CLI test invocations
- assert inventory_dir is forwarded to run_in_container()
- add tests for required INVENTORY_DIR when env is missing
- add test for INVENTORY_DIR env fallback

https://chatgpt.com/share/69700d69-b270-800f-ad50-d9ff486378b9
2026-01-21 00:23:54 +01:00
kevinveenbirkenbach fa422ed7fe cli: allow comma-separated application IDs for --id flag
- Support space-separated, comma-separated and mixed --id values
- Normalize and deduplicate application IDs before validation
- Fix Makefile to pass APP without quoting
- Add unittest coverage for ID normalization

https://chatgpt.com/share/696be0c2-816c-800f-8b07-3c5cd0304ac5
2026-01-17 20:19:13 +01:00
kevinveenbirkenbach ea63818216 refactor(cli): simplify dedicated deploy wrapper and add ansible passthrough support
- Remove unused cli_root and logs handling from dedicated deploy wrapper
- Add parse_known_args() to forward native ansible-playbook flags
- Append passthrough args at the end for proper override behavior
- Clean up MODE_LOGS usage
- Update runner signature and cleanup phase logic
- Adapt unit tests to new wrapper contract
- Add unit test for ansible flag passthrough in command.main()

https://chatgpt.com/share/69694ad5-453c-800f-8047-cf210f60460f
2026-01-15 21:15:06 +01:00
kevinveenbirkenbach d2e88b6a8c feat(cli): eliminate runpy warnings for inventory + container entrypoints
* Remove legacy **main** re-export wrappers to avoid `runpy` "already in sys.modules" warnings
* Introduce `cli.deploy.container.command` as the stable implementation module
* Reduce `cli.deploy.container.__main__` to a minimal entrypoint delegating to `command.main`
* Re-export container helpers from package `__init__` without importing `__main__`
* Update unit tests to import/patch the new command module and keep CLI dispatch stable

https://chatgpt.com/share/69484a22-60dc-800f-a23d-068d7c45fe37
2025-12-21 20:27:26 +01:00
kevinveenbirkenbach 1fe0a420fa fix(cli): avoid runpy warnings by moving logic into command modules
Stop importing __main__ from package __init__.py to prevent runpy RuntimeWarning when using `python -m`.

- Move CLI logic into command.py modules
- Keep __main__.py as thin wrappers
- Update unit tests to import command modules directly

https://chatgpt.com/share/6947fb8e-550c-800f-8323-e36f92cb5bba
2025-12-21 14:52:09 +01:00
kevinveenbirkenbach 71c541ee05 test(cli): use unittest.mock.patch consistently
- Remove direct imports of unittest.mock alias
- Use unittest.mock.patch via unittest for all test decorators
- Keep behavior identical while simplifying imports
2025-12-21 11:10:03 +01:00
kevinveenbirkenbach e23187bccb refactor(deploy): remove skip-tests option from dedicated deploy
- Drop --skip-tests CLI flag and runner parameter
- Remove test phase execution from deploy workflow
- Update unit tests to match simplified deploy flow

https://chatgpt.com/share/69473607-22e4-800f-845b-a628677fb8b9
2025-12-21 00:49:21 +01:00
kevinveenbirkenbach 103659a534 refactor(deploy): modularize dedicated deploy CLI and fix make cwd issue
- Split dedicated deploy logic into focused modules (apps, modes, paths, proc, runner)
- Ensure all make targets run from the repository root via explicit cwd handling
- Fix "make: No rule to make target" errors caused by incorrect working directory
- Slim down __main__ to a thin CLI entrypoint
- Rework unit tests into one file per module and expand coverage

https://chatgpt.com/share/69472632-9740-800f-962c-bcb4474963d6
2025-12-20 23:41:41 +01:00
kevinveenbirkenbach 2e6d973839 fix(build): align CLI module invocations and stabilize include generation
- Switch Makefile targets to direct module execution (cli.build.*)
- Remove obsolete flags and normalize tree invocation
- Minor formatting cleanups for readability and test stability
- Keep inventory and include paths consistent after package layout migration

https://chatgpt.com/share/6946eac4-eb48-800f-becb-f08420ab03a6
2025-12-20 19:28:14 +01:00
kevinveenbirkenbach 102735dba4 Renamed inventory.py to inventory/__main__.py 2025-12-20 18:30:20 +01:00
kevinveenbirkenbach 0ea828ab6e cleanup: unify git cleanup, simplify deploy flow, fix dockerignore
- Remove clean-keep-logs target and enforce git-repo guard in Makefile
- Always use `make clean` during deploy cleanup with live output
- Add shared subprocess runner for consistent stdout/stderr handling
- Align unit tests with simplified cleanup semantics
- Fix .dockerignore to ignore build artifacts and Ruff cache correctly

https://chatgpt.com/share/6945784a-daac-800f-bc02-d7e8d3087376
2025-12-19 17:07:33 +01:00
kevinveenbirkenbach f775ae9dfa ci(deploy): run deploy tests with --missing and docker-based invokable excludes 2025-12-19 16:07:59 +01:00
kevinveenbirkenbach b512d6c4b6 Solved mock path bugs 2025-12-18 13:03:12 +01:00
kevinveenbirkenbach c2bb81a126 Merge pull request #13 from kevinveenbirkenbach/alert-autofix-61
Potential fix for code scanning alert no. 61: Module is imported with 'import' and 'import from'
2025-12-18 12:48:59 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 4bc29cd52c Potential fix for code scanning alert no. 59: Module is imported with 'import' and 'import from'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-12-18 10:34:11 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI a6a56a7cc3 Potential fix for code scanning alert no. 61: Module is imported with 'import' and 'import from'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-12-18 10:33:49 +01:00
kevinveenbirkenbach 7123841fb4 style: apply ruff autoformat 2025-12-17 16:37:21 +01:00
kevinveenbirkenbach 14548cbc52 Replaced false make messy-build by make setup 2025-12-16 20:51:37 +01:00
kevinveenbirkenbach d0882433c8 Refactor setup workflow and make install robust via virtualenv
- Introduce a dedicated Python virtualenv (deps target) and run all setup scripts through it
- Fix missing PyYAML errors in clean, CI, and Nix environments
- Refactor build defaults into cli/setup for clearer semantics
- Make setup deterministic and independent from system Python
- Replace early Makefile shell expansion with runtime evaluation
- Rename messy-test to test-messy and update deploy logic and tests accordingly
- Keep setup and test targets consistent across Makefile, CLI, and unit tests

https://chatgpt.com/share/693de226-00ac-800f-8cbd-06552b2f283c
2025-12-13 23:00:13 +01:00
kevinveenbirkenbach d0aac64c67 Refactor CI container deploy wrapper: add modes, rebuild/no-cache flags, and transparent inventory/deploy arg forwarding; update tests accordingly (see ChatGPT conversation: https://chatgpt.com/share/6931e58c-2ddc-800f-88d2-f7887ec13e25) 2025-12-04 20:49:04 +01:00
kevinveenbirkenbach f2ace362bc Refactor container deploy pipeline:
- Replace inline shell scripts with Python-driven orchestration
- Introduce inner dockerd started via detached docker run
- Add docker exec–based inventory creation and dedicated deploy execution
- Add automatic vault password generation for CI
- Update GitHub Actions workflow to use new container deploy wrapper
- Add complete unit test suite for container deploy behavior
- Fix CLI argument forwarding and ensure single docker run call

Conversation reference:
https://chatgpt.com/share/6931c45d-4e40-800f-852f-6c9b1f7dc281
2025-12-04 18:27:15 +01:00
kevinveenbirkenbach 8c64f91a6d Refactor deploy CLI into cli/deploy/dedicated.py, add package inits, and update unit tests (see ChatGPT conversation: https://chatgpt.com/share/6931af9e-dad0-800f-9a8f-6d01c373de87) 2025-12-04 16:59:13 +01:00