Skip to content

sachahu1/Github-Search-Engine

Repository files navigation

Github-Search-Engine

GitHub Actions Workflow Status

GitHub Release PyPI - Python Version GitHub Repo stars

Getting Started

Installation

Installing the package (from PyPI)

You can install this package from PyPI using:

pip install Github-Search-Engine[cpu]

You can also choose to install extras:

pip install Github-Search-Engine[gpu,api]

Installing the package (from source)

You can install this package from source using:

pip install git+https://github.com/sachahu1/Github-Search-Engine.git

Installing the package (Manual)

You can also install the package yourself by cloning the repo:

git clone https://github.com/sachahu1/Github-Search-Engine.git

And installing the package with poetry:

poetry install

Using as a CLI tool

You can use this package as a CLI tool, start with:

github_search_engine -h

Once you're more familiar with the CLI, you can index your favourite GitHub repository:

github_search_engine index <owner> <repository_name> --db_path=./local-store --github_access_token=<Your GitHub Personal Access Token>

Then, search through any issue using:

github_search_engine search <owner> <repository_name> "<Your query>" --db_path=./local-store --github_access_token=<Your GitHub Personal Access Token>

Launching an API server

You can use this package as an API. To do that, simply run:

github_search_engine api --github_access_token=<Your GitHub Personal Access Token>

Building the documentation

Using Docker

To access the documentation locally, the easiest way is to use the docker image. To do so, simply run:

docker build . -f Dockerfile --target documentation -t github_search_engine-docs
docker run -p 80:80 -it github_search_engine-docs

Then navigate to http://localhost

Manually

Alternatively you can build the documentation yourself. First, make sure you have the dependencies installed:

poetry install --with=documentation

Then build the documentation:

poetry run sphinx-build -M html docs/source/ docs/build

Then open the documentation in your browser:

open docs/build/html/index.html