Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
# carries, or a change to them is not exercised until after it merges.
# Consumers use the action; this repository owns the rules.
- name: Refuse a skip, and a suite that shrank
run: tools/check-test-outcome.py "$RUNNER_TEMP/pytest.log" --min-tests 546
run: tools/check-test-outcome.py "$RUNNER_TEMP/pytest.log" --min-tests 547

# The rules earn their place by refusing a log that carries what they
# name. Both fixtures are written here rather than tracked, and the
Expand Down
2 changes: 1 addition & 1 deletion docs/object-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ that set from the two predicates and fails until each has a class, so a
base type MEOS adds reaches the model with no edit to the file.
`Nsegment`, `Raquet` and `JsonPath` are the MeosTypes no membership
predicate admits; the model states them, and the same gate states that it
does. `Pcschema`, `RTree`, `RTreeNNCursor`, `SPTree`, `SPNNCursor` and
does. `Pcschema`, `Raster`, `RTree`, `RTreeNNCursor`, `SPTree`, `SPNNCursor` and
`MeosArray` go further: MEOS
registers them in no enum at all, and they say so with a null `temptype`
rather than by leaving the field out. To a binding a pointer to a struct
Expand Down
13 changes: 12 additions & 1 deletion meta/object-model.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@
"posechain",
"pcpoint",
"pcpatch",
"raquet"
"raquet",
"raster"
]
},
"companions": {
Expand Down Expand Up @@ -707,6 +708,16 @@
"conditional": "RASTER",
"doc": "A raster tile. A MeosType no membership predicate admits, as Nsegment is."
},
"Raster": {
"kind": "leaf",
"parent": "Value",
"prefixes": [
"raster"
],
"temptype": null,
"conditional": "RASTER",
"doc": "A georeferenced raster of one or more bands, the value every raster accessor, clip, warp and polygonization takes. MEOS registers it in no enum, so it names no temptype."
},
"Pcschema": {
"kind": "leaf",
"parent": "Value",
Expand Down
16 changes: 15 additions & 1 deletion tests/test_object_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,23 @@ def test_a_type_meos_registers_in_no_enum_still_gets_a_class(self):
unregistered = {n for n, s in nodes.items()
if s["kind"] == "leaf" and s["temptype"] is None}
self.assertEqual(unregistered,
{"Pcschema", "RTree", "RTreeNNCursor", "SPTree",
{"Pcschema", "Raster", "RTree", "RTreeNNCursor", "SPTree",
"SPNNCursor", "MeosArray"})

def test_a_raster_is_a_class_its_functions_are_methods_of(self):
# MEOS registers no MeosType for a raster, its tile Raquet being the type the
# temporal raster values carry, while every raster function takes one first.
om = attach_object_model({"functions": [
{"name": n, "api": "public",
"params": [{"name": "rast", "cType": "const Raster *"}]}
for n in ("raster_copy", "raster_mem_size", "raster_width")
]}, MODEL, None)["objectModel"]
self.assertEqual(om["classes"]["Raster"]["cType"], "Raster")
names = {m["function"]: m["ooName"] for m in om["classes"]["Raster"]["methods"]}
self.assertEqual(names, {"raster_copy": "copy", "raster_mem_size": "memSize",
"raster_width": "width"})
self.assertEqual(om["summary"]["unclassified"], 0)

def test_a_function_named_as_its_own_prefix_still_has_a_member_name(self):
# `meos_pc_schema` IS its class's prefix, so dropping the prefix leaves
# nothing — the one case the override table exists for.
Expand Down
Loading