reiz.io
reiz.io copied to clipboard
reizql: META(filename=...) matcher
Currently, there is no way to search in a specific project while using Reiz. Considering the intended dataset size (thousands of packages) it might be a cool idea to somehow add META() matcher for searching custom filenames. Here is an example;
Call(
Name('something'),
__metadata__ = META(
filename=f'requests/%'
)
)
this would match files only under requests/ prefix, which internally means only the requests/ repo.
Here is an example about how to search a specific filename; https://github.com/reizio/reiz.io/blob/8064f82a42942e66e61613c0eb3548f43a0a257b/test_cases/runner.py#L188-L195
And this is the place where you could add new metadata matchers; https://github.com/reizio/reiz.io/blob/8064f82a42942e66e61613c0eb3548f43a0a257b/reiz/reizql/compiler/functions.py#L114-L123