This repository was archived by the owner on Dec 2, 2026. It is now read-only.
Repository navigation
Read the catalog keys the MEOS-API catalog names - #18
Merged
estebanzimanyi merged 1 commit intoNov 5, 2026
Merged
estebanzimanyi merged 1 commit into
estebanzimanyi merged 1 commit into
Conversation
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 *.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 *.