Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/usc-isi-i2/kgtk
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarijo committed May 21, 2020
2 parents a640b9a + 2e3b8a4 commit f27f8fb
Show file tree
Hide file tree
Showing 152 changed files with 12,717 additions and 5,518 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ dmypy.json
.vscode/

# MacOS file system hidden file
.DS_Store
.DS_Store
15 changes: 15 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Required
version: 2

# Build documentation with MkDocs
mkdocs:
configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/requirements.txt
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
sudo: false
dist: xenial
language: python
python:
- 3.7.7

install:
- sudo apt-get update
- pip install --upgrade pip
- pip install -r requirements.txt
- pip install --force-reinstall numpy --no-cache
- pip install .
script:
- python -m spacy download en_core_web_sm
- cd kgtk/tests
- python -m unittest discover
notifications:
slack:
secure: FfFhdBv7FgVTZrA/UUm3EcsH/dOvyOusIJ0o+Y+Ysf9DVeasBjJ2E7xaCMcs0KM8ypQuXTVMJyT88uGiJ3fNU/Sy5C/TEireGOWCqy84et/iFjMfIIHnPb3Nz6yLIrDsrrEufcLm1RDeMtQkvn55FfuLOoelfKe10/eAfR/luscoCr1LLqFxGZizpkYION9FCTlZ1CX+OK13ALuG9hqeCKy+k/PkmuwboQDW1N0Q7JcJTs90Pr02TZp83efePRmayXSjjhiy3npVsBYP/oQPyec1mgCSizn+lkTJJ80yzHe++e7zzpg5XbyLjSoA/ddz8AdRq5wD+BooVegJB0cxnMioEzHvpocIyUC28vGEBTbHCU+songs7z9WJyySTy3G1GaBSbcp6dOVDgTmizouBQbkL4/k+PJUDndsMN7hykDYzvlaVt2HZykiA+sf6EiW2RWPhWThmzo3ACJf30OTK78pUfuh1UcuxHcUz/Ve7V/2pP8wGnD2Imbj78GxKa+hzGQ+7lggExVUpPMCMPAJeFcSjbiLeUVO/muyqoRC6Mr1Y1ZlqL1EcKC9LC6jkXs0XV6jB3DRlr8YHiq6X1GPe0rSzV0/XUain9WY5jO15P8HBU2Pv4Y4hsU8LjVqBbX5r22Xquv6KaLQZVIJUOe2FGzfzYiiIXivYNvtATkxSfY=
48 changes: 44 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# kgtk
# KGTK: Knowledge Graph Toolkit [![doi](https://zenodo.org/badge/DOI/10.5281/zenodo.3828069.svg)](https://doi.org/10.5281/zenodo.3828069)

### Installation
KGTK is a Python library for easy manipulation with knowledge graphs. It provides a flexible framework that allows chaining of common graph operations, such as: extraction of subgraphs, filtering, computation of graph metrics, validation, cleaning, generating embeddings, and so on. Its principal format is TSV, though we do support a number of other inputs.

## Documentation

https://kgtk.readthedocs.io/en/latest/

## Features

* Computation of class instances
* Computation of reachable nodes
* Filtering based on property values
* Removal of columns
* Sorting
* Computation of various embeddings
* Cleaning and validation
* Computation of graph metrics
* Joining and concatenation of graphs
* Manipulation of Wikidata data

## Releases

* [Source code](https://github.com/usc-isi-i2/kgtk/releases)

## Installation

0. Our installations will be in a conda environment. If you don't have a conda installed, follow [link](https://docs.conda.io/projects/conda/en/latest/user-guide/install/) to install it.
1. Set up your own conda environment:
Expand All @@ -10,7 +33,7 @@ conda activate kgtk-env
```
**Note:** Installing Graph-tool is problematic on python 3.8 and out of a virtual environment. Thus: **the advised installation path is by using a virtual environment.**

2. Install kgtk: `pip install kgtk`
2. Install (the dev branch at this point): `pip install kgtk`

You can test if `kgtk` is installed properly now with: `kgtk -h`.

Expand All @@ -25,6 +48,22 @@ You can test if `kgtk` is installed properly now with: `kgtk -h`.

More installation options for `mlr` can be found [here](https://johnkerl.org/miller/doc/build.html).

## Running KGTK commands

To list all the available KGTK commands, run:

`kgtk -h`

To see the arguments of a particular commands, run:

`kgtk <command> -h`

An example command that computes instances of the subclasses of two classes:

`kgtk instances --transitive --class Q13442814,Q12345678`

## Additional information

### The Miller Package

1. Our code uses the "miller" package to manipulate formatted data.
Expand All @@ -50,12 +89,13 @@ https://www.mankier.com/1/mlr
* `gt_loader`
* `merge_identical_nodes`
* `zconcat`
* `export_neo4j`

To get an information on how to use each of them, run:
`kgtk [TOOL] -h`

More detailed description of the arguments will be added here promptly.

### Developer Instruction
### Developer Instructions

Please refer to [this](README_dev.md)
11 changes: 0 additions & 11 deletions data/conceptnet_first10.tsv

This file was deleted.

Loading

0 comments on commit f27f8fb

Please sign in to comment.