Giter Site home page Giter Site logo

kevinschaper / kgx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from biolink/kgx

0.0 0.0 0.0 1.85 MB

KGX is a Python library for exchanging Knowledge Graphs

Home Page: https://kgx.readthedocs.io

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.04% Shell 0.01% Python 99.91% Dockerfile 0.05%

kgx's Introduction

Knowledge Graph Exchange

Python Run testsDocumentation Status Quality Gate Status Maintainability Rating Coverage PyPI Docker

KGX (Knowledge Graph Exchange) is a Python library and set of command line utilities for exchanging Knowledge Graphs (KGs) that conform to or are aligned to the Biolink Model.

The core datamodel is a Property Graph (PG), represented internally in Python using a networkx MultiDiGraph model.

KGX allows conversion to and from:

KGX will also provide validation, to ensure the KGs are conformant to the Biolink Model: making sure nodes are categorized using Biolink classes, edges are labeled using valid Biolink relationship types, and valid properties are used.

Internal representation is a property graph, specifically a networkx MultiDiGraph.

The structure of this graph is expected to conform to the Biolink Model standard, as specified in the KGX format specification.

In addition to the main code-base, KGX also provides a series of command line operations.

Installation

The installation for KGX requires Python 3.7 or greater.

Installation for users

Installing from PyPI

KGX is available on PyPI and can be installed using pip as follows,

pip install kgx

To install a particular version of KGX, be sure to specify the version number,

pip install kgx==0.5.0

Installing from GitHub

Clone the GitHub repository and then install,

git clone https://github.com/biolink/kgx
cd kgx
python setup.py install

Installation for developers

Setting up a development environment

To build directly from source, first clone the GitHub repository,

git clone https://github.com/biolink/kgx
cd kgx

Then install the necessary dependencies listed in requirements.txt,

pip3 install -r requirements.txt

For convenience, make use of the venv module in Python3 to create a lightweight virtual environment,

python3 -m venv env
source env/bin/activate

pip install -r requirements.txt

To install KGX you can do one of the following,

pip install .

# OR 

python setup.py install

Setting up a testing environment

KGX has a suite of tests that rely on Docker containers to run Neo4j specific tests.

To set up the required containers, first install Docker on your local machine.

Once Docker is up and running, run the following commands:

docker run -d --name kgx-neo4j-integration-test \
            -p 7474:7474 -p 7687:7687 \
            --env NEO4J_AUTH=neo4j/test  \
            neo4j:3.5.25
docker run -d --name kgx-neo4j-unit-test  \
            -p 8484:7474 -p 8888:7687 \
            --env NEO4J_AUTH=neo4j/test \
            neo4j:3.5.25

Note: Setting up the Neo4j container is optional. If there is no container set up then the tests that rely on them are skipped.

kgx's People

Contributors

deepakunni3 avatar lhannest avatar cmungall avatar sierra-moxon avatar richardbruskiewich avatar kennethbruskiewicz avatar phillipsowen avatar hsolbrig avatar gregr avatar dougli1sqrd avatar yy20716 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.