robotpy / robotpy-wpilib-utilities

Useful utility functions/objects for RobotPy
BSD 3-Clause "New" or "Revised" License
11 stars 19 forks source link

Refactor out magicbot dependency injection #170

Closed auscompgeek closed 3 years ago

auscompgeek commented 4 years ago

This should be better testable, and will make it easier to implement different flavours on the injection requests.

(will eventually write/untangle tests for this before merging)

auscompgeek commented 4 years ago

Well, I managed to make the existing tests work at least.

virtuald commented 4 years ago

Due to the scope of changes, my inclination is to not merge this until the end of season unless there's a significantly compelling reason?

virtuald commented 4 years ago

It does look pretty nice though.

auscompgeek commented 4 years ago

This is mostly to prepare for performing DI on the constructor. Happy to leave this for next season.

I've discovered that a nice side effect of this is that if an error is raised the locals give you a bit more information though.

auscompgeek commented 4 years ago

I'll probably try to untangle getting these tests working from this PR. Seems worthwhile anyway.