Refactor platform metadata lookups in Context for cross LEAPP#1512
Open
JamesHabben wants to merge 1 commit into
Open
Refactor platform metadata lookups in Context for cross LEAPP#1512JamesHabben wants to merge 1 commit into
JamesHabben wants to merge 1 commit into
Conversation
This refactor moves platform-specific reference data out of shared Python logic and into explicitly named JSON collections. RLEAPP may need to resolve both Apple and Android device metadata from account-return records, while iLEAPP and ALEAPP primarily use their own platform data. Keeping the Context metadata API generic makes the shared framework code easier to synchronize directly between LEAPP repositories. Each project can include only the JSON collections it needs, while reusable collections can be copied between projects without adding repository-specific branching. Where not possible (the apple version mess), platform specific function code can live across platforms with a graceful failure if the data file needed for the code is missing. - Replace Apple-specific JSON loaders with generic cached metadata helpers: `get_metadata()` and `lookup_metadata()`. - Rename metadata files to describe their mapping direction: `apple_device_id_to_model.json`, `apple_board_id_to_model.json`, and `apple_build_id_to_os_version.json`. - Add `get_apple_os_version()` for Apple device-family routing and the existing modern iPadOS label adjustment. - Update affected artifacts to use the new generic lookups and Apple OS resolver. - Add metadata documentation
Collaborator
Author
|
An example from RLEAP where there is a similar list of apple devices as what we have here, but this list is not as comprehensive nor is it even up to date. With this PR, RLEAPP can be build to use the same |
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.
This refactor moves platform-specific reference data out of shared Python logic and into explicitly named JSON collections. RLEAPP may need to resolve both Apple and Android device metadata from account-return records, while iLEAPP and ALEAPP primarily use their own platform data.
Keeping the Context metadata API generic makes the shared framework code easier to synchronize directly between LEAPP repositories. Each project can include only the JSON collections it needs, while reusable collections can be copied between projects without adding repository-specific branching.
Where not possible (the apple version mess), platform specific function code can live across platforms with a graceful failure if the data file needed for the code is missing.
get_metadata()andlookup_metadata().apple_device_id_to_model.json,apple_board_id_to_model.json, andapple_build_id_to_os_version.json.get_apple_os_version()for Apple device-family routing and the existing modern iPadOS label adjustment.