Task #3393
closedTask #3374: Migrate all core modules from legacy Mentat
Task #3376: Polish mentat-inspector.py module
Revision of pynspect library
100%
Description
Because mentat-inspector.py is currently being heavily used and expectations are getting bigger, it would be wise to perform revision of the library and finish the implementation, so that everything works as expected and mentat-inspector.py delivers.
Related issues
Updated by Jan Mach over 7 years ago
- Assignee changed from Jan Mach to Pavel Kácha
I have made huge revision of filtering library to map the current state. I have tried to document it as well as possible, so we can better plan future improvements. However, there is more pressing work at hand, so we should probably move it to version Future for now and come back to it later.
Updated by Jan Mach over 7 years ago
- Related to Task #3392: Revision of JPath library added
Updated by Pavel Kácha over 7 years ago
- Assignee changed from Pavel Kácha to Jan Mach
- Priority changed from High to Normal
- Target version changed from 2.0 to Backlog
Yep, will need revisiting. Some of the operators are not consistent, were created as ad-hoc solutions, same applies for return types (especially values vs lists).
Food for thought:
- type coercion (if it's not list, make it one) vs explicit return types?
- less operators doing "the right thing" or more specific ones (scalar, list, set)
- syntax freedom (how clever to be in recognizing IPs, times, strings)?
- working with specific types
- list if IP addresses is list of lists? list of ranges? what about operations?
- how about time operations
- what to do with operation on nonexistent keys? Need to riddle queries with explicit "exists" calls, or somehow try to do the right thing? Is 3 > nonexistent? nonexistent > 3?
- review existing operator implementations, especially that they use current idioms (one of the suspects is "exists" not calling proper jsonpath)
Let's get inspiration from Python, but we have a special case, so let's keep it simple and translatable even to database languages. That might event mean that sometimes we will have to say that some result is undefined (db would do something else than direct code, or db does not support).
Updated by Jan Mach over 7 years ago
- Subject changed from Revision of mentat.filtering library to Revision of pynspect library
The library was renamed from mentat.filtering to pynspect, because it is being used outside of Mentat project it made sense for it to have a neutral name.
Updated by Jan Mach about 7 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
The pynspect library is now distributed as separate package.