-
-
Notifications
You must be signed in to change notification settings - Fork 51
Create robust packaging system #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create robust packaging system #117
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
14d9a10 to
b88c1f6
Compare
jeshernandez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot to review without testing. But looks good to me high level :P
| @@ -0,0 +1,307 @@ | |||
| /* SPDX-License-Identifier: GPL-2.0-only */ | |||
| /* | |||
| * Copyright (C) 2022-2025, Verdant Consultants, LLC. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this Verdant consultants? Should we be adding to all of our code? I been meaning to ask.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just something I picked up on as a pattern in 180+ files and decided to continue on lol. Def worth shedding some light on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the only other action I would take on this PR is simply squashing some of the commits and summarize the overall feature in one commit?
git reset --soft HEAD~23git add .git commit -a -m "feature: bla bla"git push -f// You have to use force.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look to squash and merge - want to keep the timeline for the time being so if I need to debug, drop, or test something I can.
But I'll def squash before it makes it to main
|
recheck |
Complete Configuration System Overhaul & Build Infrastructure
Overview
This PR represents a significant milestone in modernizing PiTrac's configuration management, build system, and packaging infrastructure. After extensive development and testing, I've successfully removed the dependency on manually building, compiling, or referencing documentation for configuration. The system now provides a clean, maintainable approach to managing PiTrac across different deployment scenarios.
What's Changed
Configuration System Revolution
Before: Configuration was scattered across JSON files, environment variables, and hardcoded values with no clear precedence or validation. Users had to manually edit JSON files and hope they got the structure right.
After: Implemented a hierarchical configuration system with clear precedence:
golf_sim_config.jsonpitrac.yaml)The new
ConfigurationManagerclass (496 lines of battle-tested C++) provides:Unified CLI Interface
Created a comprehensive
pitraccommand using Bashly that replaces dozens of scattered shell scripts:The new CLI provides 40+ commands including:
run,stop,statustest hardware,test quick,test camera,test pulse,test spin,test gsproconfig show,config set,config backup,config restore,config migrateservice start/stop/restart,tomee,activemqlogs,boot config,versionProduction-Ready Packaging
Built a complete APT packaging system that actually works:
The package includes:
Docker Build Infrastructure
Implemented multi-stage Docker builds for:
Key improvements:
Comprehensive Documentation
Added developer documentation covering:
🔨 Core Application Improvements
Enhanced the C++ codebase with:
configuration_manager.cpp/hfor centralized config handlingTechnical Details
Configuration Priority System
The new system resolves configuration in this order (highest to lowest priority):
pitrac.yamloverridesPITRAC_*prefixed varsgolf_sim_config.jsonBuild System Architecture
Key Files Changed
Testing
Tested on:
All test modes verified:
pitrac test quick- Basic functionalitypitrac test hardware- Full hardware testpitrac test camera- Camera detectionpitrac test gspro- Simulator integrationMigration Guide
For existing users:
golf_sim_config.jsonwill continue to work/etc/pitrac/pitrac.yamlfor cleaner overridespitracCLI commands instead of old scriptspitrac config migrateto convert JSON to YAMLBreaking Changes
None! Full backwards compatibility maintained. Old scripts and configs will continue to work, though the new methods are strongly recommended.
Future Work
This PR lays the groundwork for:
Acknowledgments
This was a massive undertaking that touched nearly every aspect of the PiTrac build and deployment process. The result is a much more maintainable, user-friendly system that should significantly lower the barrier to entry for new users while providing power users with the flexibility they need.
Special thanks to the Discord community for testing early versions and providing invaluable feedback throughout this process.