Skip to content

epflgraph/graphes-client

Repository files navigation

Project logo

License Latest Release on Github GitHub Stars Contributors Last Commit Open Issues Open PRs

Why Graph?

The Graph Data Platform - developed by the AI engineering team at the EPFL Center for Digital Education - is an open-source alternative to proprietary research information systems like Elsevier Pure. It federates educational and institutional data into a semantically interconnected knowledge graph of people, publications, labs, startups, courses, video lectures, and other educational resources. The GraphSearch application provides lightning-fast search and discovery of the knowledge graph, as well as LLM-powered chatbot interaction with the indexed resources.

List of Graph services:
Registry | AI | Ontology | Search | Chat | Dash | DB client | ES client

Graph ES Client

Graph ES Client is a Python-based command-line interface (CLI) tool designed to facilitate the management and interaction with the Graph Data Platform's underlying ElasticSearch server. It provides a unified interface for performing various index operations, including configuration management, data import/export, and server administration tasks. The CLI is built using Python's argparse library, allowing users to execute commands in a structured and intuitive manner.

Configuration

The CLI expects a config.yaml file (repository root format) describing server environments. Use the provided config.example.yaml as a template to create your own configuration.

Installation

🐳 Deploy with Docker

The Graph ES Client is available as a Docker image, which provides a convenient way to run the CLI without needing to set up a local Python environment. The image includes all necessary dependencies and can be easily updated by pulling the latest version from Docker Hub.

Steps to deploy with Docker:

  1. Pull the image:

    docker pull epflgraph/graphes-client:latest
  2. Run the CLI help:

    docker run --rm epflgraph/graphes-client:latest -h
  3. Run with your local configuration mounted (recommended):

    docker run --rm \
    -v "$(pwd)/config.yaml:/app/config.yaml:ro" \
    epflgraph/graphes-client:latest test --env <env_name>

To run commands as graphes [cmd], add this to your ~/.zshrc file:

graphes() {
  docker run --rm \
    -v "$PWD/config.yaml:/app/config.yaml:ro" \
    epflgraph/graphes-client:latest "$@"
}

Then reload your shell:

source ~/.zshrc

Test with:

graphes test --env <env_name>

👨🏻‍💻 Local installation

For users who prefer to run the CLI directly on their local machine, follow these steps to set up a Python virtual environment and install the package:

  1. Clone the repository:

    git clone https://github.com/epflgraph/graphes-client.git
    cd graphes-client
  2. Create and activate a virtual environment:

    python3 -m venv .venv.graphes
    source .venv.graphes/bin/activate
  3. Install the package:

    pip install .
  4. Verify installation:

    graphes -h
  5. To test the connection to a database environment:

    graphes test --env <env_name>

About

General purpose client for interacting with an ElasticSearch server in the Graph ecosystem.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages