Closed
Conversation
added 30 commits
February 17, 2026 15:37
…ngName tests to test_objects
…ferences between parsed and original files
…GDFile to GDPackedScene, fixed remove_unused_resources to include nested and improved GDResource initialization to allways include a main GDResourceSection
…tputing to string
feat: support typed containers, StringNames, and non-string Dictionar…
Owner
|
I appreciate that you're trying to make this work better, but please realize that this is over 3000 lines of changes to review and maintain. If I had a lot of time I could eventually manage to review a PR this large (for reference, the entirety of this repo currently clocks in at only 2000 LOC), but the maintenance is the real problem. I can't merge this because I can't maintain this much new code. |
Contributor
Author
|
No worries! I made these changes so I could use this lib in a project of my own and thought it wouldn't hurt to share those improvements back, but the maintenance concerns are understandable. I'll simply keep working on my own fork for now. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've added support for multiple Godot version output formats!
Basic usage of the library remains the same. However, now instead of simply converting a GDFile to string, you need to call the output_to_string and pass an extra argument specifying how the file should be output. Other methods like GDFile.write were also updated accordingly
The OutputFormat class defines how the output should be generated, with flags for each behavior different godot versions have. To make things easier, there is also a VersionOutputFormat where you just inform your godot version and all flags will be filled accordingly
Several tests where added for each flag inside OutputFormat. Also, I've created test projects on every major Godot version from 3.3 to 4.6 (through the web editor at https://editor.godotengine.org/releases/) and am testing each one of them through pytests, comparing results and getting 100% matched without any form of sanitization
On top of it, I also made a guess_version class method under VersionOutputFormat that will take a guess at which godot version was used to create an input parsed file by peeking at which features it's using. This means that, with a single file as input, you can make as many changes to it as you want and output with while keeping whatever format was originally used
This also solves the issues with test_parse_files.py discussed on #21. I have removed all forms of sanitization from the diff and am relying simply on raw string comparison, getting 99% of success. The remaining 1% is caused by inconsistencies within godot, the one I found being some tres files for some reason having extra line breaks under [ext_resource] entries that I can't do anything about
I'll try to break down everything that is being changed in this PR
__delitem__to not fail silently