-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'd333b3d07ea1961b1ba83ed62b87d61b7d33f5d2' into axis-reg…
…-pull-ARRR
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
axisregistry/Lib/axisregistry/data/ar_retinal_resolution.textproto
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
tag: "ARRR" | ||
display_name: "AR Retinal Resolution" | ||
min_value: 10 | ||
default_value: 10 | ||
max_value: 60 | ||
precision: 0 | ||
fallback { | ||
name: "Default" | ||
value: 10 | ||
} | ||
fallback_only: false | ||
description: | ||
" Resolution-specific enhancements in AR/VR typefaces to optimize" | ||
" rendering across the different resolutions of the headsets" | ||
" making designs accessible and easy to read." |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--index-url https://pypi.python.org/simple/ | ||
protobuf==3.19.4 | ||
protobuf==3.20.3 | ||
-e . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import pytest | ||
from axisregistry import AxisRegistry | ||
from axisregistry.axes_pb2 import AxisProto | ||
|
||
registry = AxisRegistry() | ||
|
||
OPTIONAL_FIELDS = ["illustration_url", "is_parametric"] | ||
|
||
|
||
@pytest.mark.parametrize("axis_tag", registry.keys()) | ||
def test_proto_wellformed(axis_tag): | ||
axis = registry[axis_tag] | ||
raw_fields = dict([(k.name, v) for k, v in axis.ListFields()]) | ||
for field in AxisProto.DESCRIPTOR.fields: | ||
field_name = field.name | ||
if field_name in OPTIONAL_FIELDS: | ||
continue | ||
assert field_name in raw_fields, field_name | ||
assert raw_fields[field_name] is not None, field_name |