Skip to content
This repository was archived by the owner on Dec 2, 2026. It is now read-only.

Read the catalog keys the MEOS-API catalog names - #18

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/read-the-catalog-keys-it-names
Nov 5, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/read-the-catalog-keys-it-names

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

FunctionSignature.from_catalog_entry reads each MEOS-API catalog function by the keys the catalog spells: name, category, params, returnType, network and wire, with return_type taken from returnType.c, the C spelling of the result. Each of these keys is required and an absent one raises KeyError at load, so a renamed or misspelled catalog key fails loudly instead of reading as an empty value. Inside wire, a serialized parameter or array element yields its decode and a serialized result yields its encode, all read by exact key. The only optional key is doc, which becomes the description, and no description key exists in the catalog to fall back to. The dispatcher maps no C types: it passes returnType.c and the params entries through unchanged, so the canonical spellings and the typedefs list are not consumed here.

Why. The catalog key for the result type is returnType, with c and canonical spellings; a defaulting read of return_type finds no such key in any catalog function, so every signature carries an empty return type and GET /catalog serves an empty return_type for every function. Any defaulting read of a catalog key has the same shape: a key absent from the catalog reads as a default and nothing reports it.

Measured. Over the current MEOS-API catalog (5254 functions, 3650 exposable), the dispatcher on master yields a non-empty return type for 0 of the 3650 exposable signatures, and with this change for all 3650.

Witness. tests/test_dispatcher.py builds its catalog entries in the catalog's shape and asserts that return_type is returnType.c, that removing any of the six required keys raises KeyError naming it, that an entry spelling return_type instead of returnType raises, that an absent doc gives an empty description, and that an array element's decode is read. tests/test_app.py and tests/test_movfeat.py serve catalog-shaped entries, and GET /catalog/shift_trip returns the return type Temporal *.

FunctionSignature.from_catalog_entry reads each MEOS-API catalog function by the keys the catalog spells: name, category, params, returnType, network and wire, with return_type taken from returnType.c, the C spelling of the result. Each of these keys is required and an absent one raises KeyError at load, so a renamed or misspelled catalog key fails loudly instead of reading as an empty value. Inside wire, a serialized parameter or array element yields its decode and a serialized result yields its encode, all read by exact key. The only optional key is doc, which becomes the description, and no description key exists in the catalog to fall back to. The dispatcher maps no C types: it passes returnType.c and the params entries through unchanged, so the canonical spellings and the typedefs list are not consumed here.

Why. The catalog key for the result type is returnType, with c and canonical spellings; a defaulting read of return_type finds no such key in any catalog function, so every signature carries an empty return type and GET /catalog serves an empty return_type for every function. Any defaulting read of a catalog key has the same shape: a key absent from the catalog reads as a default and nothing reports it.

Measured. Over the current MEOS-API catalog (5254 functions, 3650 exposable), the dispatcher on master yields a non-empty return type for 0 of the 3650 exposable signatures, and with this change for all 3650.

Witness. tests/test_dispatcher.py builds its catalog entries in the catalog's shape and asserts that return_type is returnType.c, that removing any of the six required keys raises KeyError naming it, that an entry spelling return_type instead of returnType raises, that an absent doc gives an empty description, and that an array element's decode is read. tests/test_app.py and tests/test_movfeat.py serve catalog-shaped entries, and GET /catalog/shift_trip returns the return type Temporal *.
@estebanzimanyi
estebanzimanyi merged commit 1af9ad8 into MobilityDB:master Nov 5, 2026
3 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/read-the-catalog-keys-it-names branch November 5, 2026 20:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant