randovania / mercury-engine-data-structures

Construct type definitions for Mercury Engine.
MIT License
2 stars 11 forks source link

Version adapter and test fixes #186

Closed steven11sjf closed 4 months ago

steven11sjf commented 4 months ago

Fixes #30 Fixes #184

Added an adapter that converts a standard version field (Int16ul major, Int8 minor, Int8 patch) to a tuple or string "M.m.p" and optionally validates it against an expected version. This is applied to all places where a version field exists.

Fixed a bug where standard_format.game_model ignores the provided name and version field passed to it. Additionally, standard_format.create uses the new VersionAdapter.

Added parse/build for Dread .BMDEFS using a standard_format

Added a function to dread_data and samus_returns_data to return all files with a specified file extension. Replaces a large amount of code in test parametrization

Fixed some tests that were only testing on a subset of files (Bmssd, Bmbls, Bctex)

Fixed BCTEX skipping textures in packages

Removed test_lib functions that operate only on romfs files, since using the FileTreeEditor will cover these files and any in the packages

Added/simplified some checks to skip missing files

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 87.83784% with 9 lines in your changes missing coverage. Please review.

Project coverage is 75.11%. Comparing base (6c0e327) to head (d0e1b68).

Files Patch % Lines
src/mercury_engine_data_structures/common_types.py 88.88% 2 Missing :warning:
src/mercury_engine_data_structures/dread_data.py 83.33% 1 Missing :warning:
...rc/mercury_engine_data_structures/formats/bldef.py 0.00% 1 Missing :warning:
src/mercury_engine_data_structures/formats/brem.py 0.00% 1 Missing :warning:
src/mercury_engine_data_structures/formats/bres.py 0.00% 1 Missing :warning:
src/mercury_engine_data_structures/formats/brev.py 0.00% 1 Missing :warning:
src/mercury_engine_data_structures/formats/brsa.py 0.00% 1 Missing :warning:
...rcury_engine_data_structures/samus_returns_data.py 83.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #186 +/- ## ========================================== + Coverage 74.70% 75.11% +0.41% ========================================== Files 66 66 Lines 3277 3311 +34 ========================================== + Hits 2448 2487 +39 + Misses 829 824 -5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

steven11sjf commented 4 months ago

I can add lists of missing files to check against, will take a minute though