reiz.io icon indicating copy to clipboard operation
reiz.io copied to clipboard

reizql: META(filename=...) matcher

Open isidentical opened this issue 4 years ago • 2 comments

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.

isidentical avatar Mar 06 '21 11:03 isidentical

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

isidentical avatar Mar 06 '21 11:03 isidentical

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

isidentical avatar Mar 06 '21 11:03 isidentical