Skip to content

Commit

Permalink
Merge commit 'd333b3d07ea1961b1ba83ed62b87d61b7d33f5d2' into axis-reg…
Browse files Browse the repository at this point in the history
…-pull-ARRR
  • Loading branch information
vv-monsalve committed Sep 6, 2023
2 parents c43e417 + d333b3d commit 14cf997
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
15 changes: 15 additions & 0 deletions axisregistry/Lib/axisregistry/data/ar_retinal_resolution.textproto
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."
2 changes: 1 addition & 1 deletion axisregistry/requirements.txt
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 .
19 changes: 19 additions & 0 deletions axisregistry/tests/test_wellformed.py
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

0 comments on commit 14cf997

Please sign in to comment.