Refactor: Simplify TrajectoryGroup and remove monkey-patching
This pull request refactors the TrajectoryGroup class to simplify its initialization and remove the need for monkey-patching in the ART CLI. Previously, the TrajectoryGroup class had a complex new method to handle both synchronous and asynchronous creation, which required monkey-patching in the server environment to function correctly. This approach made the code harder to understand and maintain. This refactoring addresses the issue by: - Moving the asynchronous instantiation logic to a new from_awaitables class method. This separates the asynchronous and synchronous creation paths, making the code more explicit and easier to follow. - Simplifying the new and init methods to handle only the standard, synchronous case. - Removing the monkey-patching code from src/art/cli.py, as it is no longer necessary. These changes improve code clarity, maintainability, and eliminate the potential side effects of modifying a class at runtime. The TrajectoryGroup class is now more robust and easier to use in different contexts without workarounds.
@bradhilton you're probably the best person to review here!
@Mirza-Samad-Ahmed-Baig could you review the failing code quality checks and fix if necessary?
Thank you for reviewing, oh man how can I leave that like that. I will correct that soon.
Done, further lowered the required uv version to 0.6.13 to align with the available development environment.