Reiz

Reiz: Structural Source Code Search - Published in JOSS (2021)

https://github.com/reizio/reiz.io

Science Score: 98.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

ast-matcher python-ast search-engine source source-code
Last synced: 4 months ago · JSON representation ·

Repository

Structural Source Code Search Engine

Basic Info
  • Host: GitHub
  • Owner: reizio
  • License: other
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 874 KB
Statistics
  • Stars: 45
  • Watchers: 3
  • Forks: 4
  • Open Issues: 9
  • Releases: 1
Topics
ast-matcher python-ast search-engine source source-code
Created over 5 years ago · Last pushed 9 months ago
Metadata Files
Readme Contributing Funding License Citation

README.md

DOI

reiz.io

reiz.io is a structural source code search engine for Python. Compared to the popular alternatives (e.g Github Code Search) it executes queries over the syntax trees (instead of raw source code) and tries to retrive structural knowledge (no semantics applied). For more information, please see the docs.

A gentle introduction

Reiz is the code search framework that reiz.io is built a top on. Due to it's nature, it solely works with the ASTs and intentionally avoids doing any semantical work.

{note} Some ASTs attach a bit of contextual knowledge (e.g `Name(ctx=...)` on python) which can be queried through simple matcher queries but reiz.io doesn't include them when comparing references (see matchers#reference-matcher for details).

Here is a simple ReizQL query that searches for a function that ends with a try statement where we return a call to a function that has the same name as the function we are within.

python FunctionDef(~func, body=[*..., Try(body=[Return(Call(Name(~func)))])])

which would match the following;

py def foo(spam): eggs = bar() try: return foo(spam + eggs) except ValueError: return None

In the very basic sense, it is generating the AST of the code above and checks whether it fits the pattern (ReizQL query) or not.;

py FunctionDef( name='foo', args=arguments( posonlyargs=[], args=[arg(arg='spam', annotation=None, type_comment=None)], vararg=None, kwonlyargs=[], kw_defaults=[], kwarg=None, defaults=[], ), body=[ Assign( targets=[Name(id='eggs', ctx=Store())], value=Call( func=Name(id='bar', ctx=Load()), args=[], keywords=[], ), type_comment=None, ), Try( body=[ Return( value=Call( func=Name(id='foo', ctx=Load()), args=[ BinOp( left=Name(id='spam', ctx=Load()), op=Add(), right=Name(id='eggs', ctx=Load()), ), ], keywords=[], ), ), ], handlers=[ ExceptHandler( type=Name(id='ValueError', ctx=Load()), name=None, body=[ Return( value=Constant(value=None, kind=None), ), ], ), ], orelse=[], finalbody=[], ), ], decorator_list=[], returns=None, type_comment=None, )

Owner

  • Name: Reiz
  • Login: reizio
  • Kind: organization
  • Email: isidentical+reizio@gmail.com

JOSS Publication

Reiz: Structural Source Code Search
Published
June 27, 2021
Volume 6, Issue 62, Page 3296
Authors
Batuhan Taskaya
Python Core Developer
Editor
Matthew Sottile ORCID
Tags
source code search big code structure analysis

Citation (CITATION.cff)

cff-version: 1.2.0
authors:
- family-names: "Taskaya"
  given-names: "Batuhan"
  orcid: "https://orcid.org/0000-0002-5081-5529"
title: "Reiz: Structural Source Code Search"
version: 1.0.0
doi: 10.21105/joss.03296
date-released: 21-07-24
url: "https://github.com/reizio/reiz.io"

GitHub Events

Total
  • Watch event: 1
  • Push event: 10
  • Pull request event: 1
Last Year
  • Watch event: 1
  • Push event: 10
  • Pull request event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 235
  • Total Committers: 3
  • Avg Commits per committer: 78.333
  • Development Distribution Score (DDS): 0.026
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Batuhan Taskaya b****a@g****m 229
pre-commit-ci[bot] 6****] 5
Hugo van Kemenade h****k 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 28
  • Total pull requests: 36
  • Average time to close issues: 30 days
  • Average time to close pull requests: 21 days
  • Total issue authors: 3
  • Total pull request authors: 4
  • Average comments per issue: 1.18
  • Average comments per pull request: 0.42
  • Merged pull requests: 32
  • Bot issues: 0
  • Bot pull requests: 6
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • isidentical (25)
  • yuhc (2)
  • hendursaga (1)
Pull Request Authors
  • isidentical (27)
  • pre-commit-ci[bot] (6)
  • hugovk (3)
  • hakancelikdev (1)
Top Labels
Issue Labels
good first issue (1) bug (1)
Pull Request Labels

Dependencies

docs/requirements.txt pypi
  • furo ==2021.3.20b30
  • myst-parser ==0.13.5
  • sphinx ==3.4.3
requirements-dev.txt pypi
  • coverage * development
requirements.txt pypi
  • aioredis *
  • black ==20.8b1
  • edgedb *
  • pyasdl *
  • sanic *
  • sanic-cors *
  • sanic_limiter *
.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v1.0.13 composite
  • edgedb/setup-edgedb v1 composite
Dockerfile docker
  • python 3.8.2-slim build
docker-compose.yml docker
  • edgedb/edgedb 1-beta2
static/ui/Dockerfile docker
  • python 3.8.2-slim build
pyproject.toml pypi
setup.py pypi