-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add ObjectPool reading, writing and manipulations #23
Conversation
Minimum allowed coverage is Generated by 🐒 cobertura-action against 7e24191 |
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.
Some of these things it would be amazing if we could fully unit test - like give it a real object pool and validate each object and each objects' components. Unsure if that's something we'd want to do now or later, as that seems like a fair bit of work.
Generally this all seems pretty good for manipulating a pool, reading, and writing. I suspect more than anything that people would bring a binary object pool, but in the case that we write a VT server or want to programmatically manipulate or generate a pool, then these object layouts will be very nice to have.
Yea... copy/ pasted it from my OpenIsobus project. I will fix those and do a bit more cleanup. |
Co-authored-by: Adrian Del Grosso <[email protected]> Signed-off-by: Thom de Jong <[email protected]>
Co-authored-by: Adrian Del Grosso <[email protected]> Signed-off-by: Thom de Jong <[email protected]>
Co-authored-by: Adrian Del Grosso <[email protected]> Signed-off-by: Thom de Jong <[email protected]>
I started to integrate some unit tests and continued the work of @Thom-de-Jong so that it compiles and without the |
This link doesn't seem to be working for me 🤔 |
Ahh, I don't know what link I put before. But the replacement should work. |
Here my continuation for this night: |
Here my continuation for this night: |
I got stuck on the validation of the Graphic Context and its resulting consequence on reading the pool. I've wasted too much time racking my brains and have finally found out that the Pool Designer has a bug. Bug report is out and tomorrow I will continue. |
Thanks for your continued work on this. Busy time at work right now, but we've got another innovation sprint coming up near the end of the year where I hope to be working full time on this project again. |
Ahh, that sounds like a bummer! I will also be able to work more on this again in the coming months. I just got a chance to look at your additions, overall good stuff! There's one thing I noticed, and also involves your issue, is that you are reading a IOP file to test all objects. I feel like doing it this way might result in headaches later down the line when maintaining the unit test. We might run into a similar issue you are facing right now, and furthermore it is not really easy to expand with more objects. My suggestion: unit test the objects directly from a hex string/array. E.g. pass the hex array directly to the de-serialization method for each object individually, and then test it's contents. Then the other way around can be unit tested easily and maintainable as well, by simply serializing the same 'de-serialized' object again and checking if it equals the defined hex array used at the start. I'm sure we can do a small unit test for the I also suggest making a draft PR into @Thom-de-Jong's Last but not least, I want to say thanks for continuing to put effort into this 🚀 |
Yep, completely agree on that. Just trying to write it down as fast as possible cause its a kinda annoying work. |
5583911
to
d20259c
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #23 +/- ##
===========================================
- Coverage 40.67% 11.52% -29.16%
===========================================
Files 8 17 +9
Lines 563 2664 +2101
===========================================
+ Hits 229 307 +78
- Misses 334 2357 +2023 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Daan Steenbergen <[email protected]>
I want to merge this into main, so we can all iterate on it faster and not linger on this large PR. Does that sound good? |
Works for me! |
I've approved so that you can merge, but it appears the repo merge policy is set to "rebase and merge", but this MR doesn't fast-forward rebase (hence the "Merge branch 'main' into tjd/object-pool" commit at the HEAD. I think there's two resolutions:
As an aside, while I use a somewhat strict fast-forward only merge policy at work (and somewhat religiously believe it's the "right" way), I suspect we should have a pragmatically looser policy here, because I don't want to discourage contributions, especially from new contributors. |
Yeah, I agree. I initially set the repo merge policy to fast-forward merges only. I used the squash and merge for this PR to not bloat the commit history, but I agree that it's probably better to allow merge commits as well to not discourage contributions. I'll change it |
First attempt to implement .iop file reading, parsing and writing.
ObjectPools can also be changed or constructed in code.
TODO: implement the Serde crate.
Contains some dependencies on the changes to name from #22