-
Notifications
You must be signed in to change notification settings - Fork 125
ld-export-decode-metadata tool to export SQLite metadata #991
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
Conversation
simoninns
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.
Hi, you are correct in your observation that the ld-json-converter doesn't provide testing - but this is because it's not a "real tool" - it will only be in the repo until ld-decode.py outputs SQLite natively (at which point it will be removed).
If you do not include testing with this tool there will be no indication from CI/CD if the tool breaks due to a SQLite schema change (or any other change) - so you should at least add a test for PAL and NTSC using the test data images provided (I recently modified the test data to sub-module, so you can clone it locally and run the tests locally before PRing to main).
I would suggest that, for now, your tests ld-decode something, ld-json-convert the JSON and then run the result though your tool and verify the output is as expected. Then, once the SQLite work is done in ld-decode.py we can remove the middle step (and as soon as ld-decode.py outputs SQLite the CI/CD using the converter will fail - so the need to fix testing will be obvious).
I'd appreciate it if you could make those changes before the PR is accepted.
|
Hi, I had a look at the test infrastructure. It seems there are only 3 test scripts and most tools are tested using the |
|
No issue for me... until ld-decode.py is outputting SQLite the CI/CD will have to rely on ld-json-converter. Once @happycube is ready, the ld-json-converter steps will have to be removed from the test cases otherwise CI/CD will fail due to the ld-decode changes... so it all makes sense to me. |
845ab18 to
0a4bf5f
Compare
|
Added a test to the |
simoninns
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.
ok, I gave it a quick review - looks like @happycube is rapidly including SQLite support too, so let's merge.
This is the
ld-export-decode-metadatatool, that allows to export the metadata that is now stored in the SQLite database into a JSON format, that is effectively the old internal metadata format.This allows many external tools to continue working without any changes required (mostly used in vhs-decode workflows, like audio synchronization tools, custom stackers and some statistics tools)
It is heavily based on
ld-json-converter, but it uses the tbc library to read the SQLite database. It has a copy of the previous JSON metadata code to write the JSON, with the class renamed to avoid naming conflicts. All fields are copied individually by value as they are provided by the API to maintain compatibility when internal metadata structure changes.As I couldn't find any tests for
ld-json-converterI did not write any for this tool either. If I just missed them, please point me to them I will add tests for this as well.It is separate from
ld-export-metadata, as it does not export metadata that was part of the original signal, but metadata generated in the decode process.