Browse Source

Merge commit 'd333b3d07ea1961b1ba83ed62b87d61b7d33f5d2' into axis-reg-pull-ARRR

Viviana Monsalve 1 year ago
parent
commit
14cf997d81

+ 15 - 0
axisregistry/Lib/axisregistry/data/ar_retinal_resolution.textproto

@@ -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."

+ 1 - 1
axisregistry/requirements.txt

@@ -1,3 +1,3 @@
 --index-url https://pypi.python.org/simple/
-protobuf==3.19.4
+protobuf==3.20.3
 -e .

+ 19 - 0
axisregistry/tests/test_wellformed.py

@@ -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