Store phone RAM as a float so sub-GB phones can be served - #94
Merged
Merged
Conversation
TechAPI #257 corrected storage-as-RAM on 2006-2012 phones (original iPhone 0.125 GB). SmartphoneRead.ram_gb was int, so the static dump crashed on those records. Store it as float, type the schema int | float, and emit whole values as ints so the other ~90k pages keep "ram_gb": 8.
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.
GetTechAPI/TechAPI#257 set
ram_gbto 0.125 / 0.5 on 2006-2012 phones (the storage had been recorded as RAM).SmartphoneRead.ram_gb: intthen crashes the static dump:Smartphone.ram_gbmodel is nowfloat.mobile_devicealready uses float.SmartphoneRead.ram_gbschema is nowint | float, and the serializer emits whole values as ints (_whole_as_int), so existing phone pages keep"ram_gb": 8and the dump does not rewrite them.mypy and ruff are clean. The full pytest suite passes against the current TechAPI data, which includes the sub-GB records.
Refs GetTechAPI/TechAPI#1