Kglab - an abstraction layer in Python for building knowledge graphs

Overview

kglab

DOI Licence Repo size GitHub commit activity Checked with mypy security: bandit Language grade: Python CI downloads sponsor

Welcome to graph data science: https://derwen.ai/docs/kgl/

The kglab library provides a simple abstraction layer in Python 3.7+ for building knowledge graphs.

SPECIAL REQUEST:
Which features would you like in an open source Python library for building knowledge graphs?
Please add your suggestions through this survey:
https://forms.gle/FMHgtmxHYWocprMn6
This will help us prioritize the kglab roadmap.

Reviews

@kaaloo:

"Feels like it's a Hugging Face for graphs! 🤯 "

Getting Started

See the "Getting Started" section of the online documentation.

To install from PyPi:

python3 -m pip install kglab

If you work directly from this Git repo, be sure to install the dependencies as well:

python3 -m pip install -r requirements.txt

Alternatively, to install dependencies using conda:

conda env create -f environment.yml
conda activate kglab

Then to run some simple uses of this library:

import kglab

# create a KnowledgeGraph object
kg = kglab.KnowledgeGraph()

# load RDF from a URL
kg.load_rdf("http://bigasterisk.com/foaf.rdf", format="xml")

# measure the graph
measure = kglab.Measure()
measure.measure_graph(kg)

print("edges: {}\n".format(measure.get_edge_count()))
print("nodes: {}\n".format(measure.get_node_count()))

# serialize as a string in "Turtle" TTL format
ttl = kg.save_rdf_text()
print(ttl)

See the tutorial notebooks in the examples subdirectory for sample code and patterns to use in integrating kglab with other graph libraries in Python: https://derwen.ai/docs/kgl/tutorial/

WARNING when installing in an existing environment:
Installing a new package in an existing environment may reveal
or create version conflicts. See the kglab requirements
in requirements.txt before you do. For example, there are
known version conflicts regarding NumPy (>= 1.19.4) and TensorFlow 2+ (~-1.19.2)

Contributing Code

We welcome people getting involved as contributors to this open source project!

For detailed instructions please see: CONTRIBUTING.md

Build Instructions Note: unless you are contributing code and updates, in most use cases won't need to build this package locally.

Instead, simply install from PyPi or use Conda.

To set up the build environment locally, see the "Build Instructions" section of the online documentation.

Semantic Versioning

Before kglab reaches release v1.0.0 the types and classes may undergo substantial changes and the project is not guaranteed to have a consistent API.

Even so, we'll try to minimize breaking changes. We'll also be sure to provide careful notes.

See: changelog.txt

illustration of a knowledge graph, plus laboratory glassware

License and Copyright

Source code for kglab plus its logo, documentation, and examples have an MIT license which is succinct and simplifies use in commercial applications.

All materials herein are Copyright © 2020-2021 Derwen, Inc.

Attribution

Please use the following BibTeX entry for citing kglab if you use it in your research or software. Citations are helpful for the continued development and maintenance of this library.

@software{kglab,
  author = {Paco Nathan},
  title = {{kglab: a simple abstraction layer in Python for building knowledge graphs}},
  year = 2020,
  publisher = {Derwen},
  doi = {10.5281/zenodo.4717287},
  url = {https://github.com/DerwenAI/kglab}
}

Kudos

Many thanks to our open source sponsors; and to our contributors: @ceteri, @dvsrepo, @Ankush-Chander, @louisguitton, @tomaarsen, @Mec-iS, @fils, @gauravjaglan, @pebbie, @CatChenal, @jake-aft, @dmoore247, plus general support from Derwen, Inc.; the Knowledge Graph Conference and Connected Data World; plus an even larger scope of use cases represented by their communities; Kubuntu Focus, the RAPIDS team @ NVIDIA, Gradient Flow, and Manning Publications.

Comments
  • CI action to add `kglab` to DockerHub

    CI action to add `kglab` to DockerHub

    Let's add a CI action in GitHub to update a container image in DockerHub

    This will help people who want to run the our notebook-based tutorial from DockerHub, i.e., what we use for the conference workshops.

    enhancement 
    opened by ceteri 13
  • NetworkX shape passed value error and how can I help?

    NetworkX shape passed value error and how can I help?

    @ceteri Paco, So I have some time to spend working with some schema.org based data from Hydroshare and exploring using kglabs to explore it. I'm having issues applying it and I hope in resolving them I might be able to help somehow in the docs and such.

    Hopefully this isn't just me being stupid in graph space, but is of some help back to the project. Happy to share.

    Working with the same data from Issue 24 and now trying the NetworkX area I got a specific error.

    So this code:

    import networkx as nx
    
    sparql3 = """
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    SELECT ?subject ?object
    WHERE { 
      ?subject a <https://schema.org/Dataset> .
      ?subject <https://schema.org/creator> ?creator .
      ?creator rdf:first ?o .
      ?o <https://schema.org/name> ?object
    }
      """
    
    subgraph = kglab.SubgraphMatrix(kg, sparql3)
    nx_graph = subgraph.build_nx_graph(nx.DiGraph(), bipartite=True)
    

    results in this error

    ValueError                                Traceback (most recent call last)
    /tmp/ipykernel_3293779/2456468873.py in <module>
         13 
         14 subgraph = kglab.SubgraphMatrix(kg, sparql3)
    ---> 15 nx_graph = subgraph.build_nx_graph(nx.DiGraph(), bipartite=True)
    
    ~/.conda/envs/kglab/lib/python3.8/site-packages/kglab/subg.py in build_nx_graph(self, nx_graph, bipartite)
        250         """
        251         if self.kg.use_gpus:
    --> 252             df = self.build_df()
        253             nx_graph.from_cudf_edgelist(df, source="src", destination="dst")
        254         else:
    
    ~/.conda/envs/kglab/lib/python3.8/site-packages/kglab/subg.py in build_df(self, show_symbols)
        223 
        224         if self.kg.use_gpus:
    --> 225             df = cudf.DataFrame(rows_list, columns=col_names)
        226         else:
        227             df = pd.DataFrame(rows_list, columns=col_names)
    
    ~/.conda/envs/kglab/lib/python3.8/contextlib.py in inner(*args, **kwds)
         73         def inner(*args, **kwds):
         74             with self._recreate_cm():
    ---> 75                 return func(*args, **kwds)
         76         return inner
         77 
    
    ~/.conda/envs/kglab/lib/python3.8/site-packages/cudf/core/dataframe.py in __init__(self, data, index, columns, dtype)
        257                     )
        258                 else:
    --> 259                     self._init_from_list_like(
        260                         data, index=index, columns=columns
        261                     )
    
    ~/.conda/envs/kglab/lib/python3.8/site-packages/cudf/core/dataframe.py in _init_from_list_like(self, data, index, columns)
        397         if columns is not None:
        398             if len(columns) != len(data):
    --> 399                 raise ValueError(
        400                     f"Shape of passed values is ({len(index)}, {len(data)}), "
        401                     f"indices imply ({len(index)}, {len(columns)})."
    
    ValueError: Shape of passed values is (5293, 5293), indices imply (5293, 2).
    

    The results of that SPARQL on the graph should be like:

    subject,object
    https://www.hydroshare.org/resource/aefabd0a6d7d47ebaa32e2fb293c9f8a#schemaorg,Courtney G Flint
    https://www.hydroshare.org/resource/f94ac7f8d8a048cdbd2610dfa7cd315b#schemaorg,Zhiyu (Drew) Li
    https://www.hydroshare.org/resource/f9a75c0b289649aa844e84c24f9f5780#schemaorg,Young-Don Choi
    https://www.hydroshare.org/resource/173875a936f14c22a5ba19c721adfb86#schemaorg,Remi Dupas
    https://www.hydroshare.org/resource/f1116211202a4c069919797272023e62#schemaorg,Nathan Swain
    https://www.hydroshare.org/resource/6d80e4bd00244b5dabaff34074cd3102#schemaorg,Garrick Stephenson
    https://www.hydroshare.org/resource/25133b13a1fc4fca9187c2d4e272d4e8#schemaorg,Jessie Myers
    https://www.hydroshare.org/resource/ca0f2f0f28ba40018ae64b973e2bb35a#schemaorg,Ruth B. MacNeille
    https://doi.org/10.4211/hs.88454dae8c604009b684bfa136e5f7f4#schemaorg,Celray James CHAWANDA
    https://doi.org/10.4211/hs.1c6034be6886412ba59970ab1157fa7e#schemaorg,Bethany Neilson
    for 5293 lines
    
    opened by fils 11
  • Refactor KnowledgeGraph class

    Refactor KnowledgeGraph class

    Currently KnowledgeGraph class is implemented in ~1000 lines of code. To improve design, readability and accessibility we should consider refactoring. I would suggest considering composition by grouping the different methods in components classes like:

    class Loaders:
        ...
        def load_rdf(...):
            ...
        def load_jsonld(...):
           ...
    
    class KnowledgeGraph:
        def __init__(...):
            self.loaders = Loaders()
        ...
    

    So that the methods can be moved to different files like kglab/loaders.py and have a clearer layout of the code.

    After refactoring the calls would look like:

    import kglab
    
    kg = KnowledgeGraph()
    kg.loaders.load_rdf(...)
    
    opened by Mec-iS 10
  • Add morph-kgc materialize

    Add morph-kgc materialize

    Please try pytest --nbmake examples/ex6_2.ipynb

    New expected behaviour

    see https://github.com/DerwenAI/kglab/issues/108#issuecomment-1048445124

    Change logs

    Add the materialized() method to kglab.py. Add an example for it at ex6_2.ipynb

    Add docstring at the top of kglab.py

    opened by Mec-iS 10
  • directions for RDBMS support in general

    directions for RDBMS support in general

    Following up after some work with Trino authors yesterday, there are needs ahead for better metadata modeling based on inference techniques, semantic technologies, etc., for example in Iceberg connectors.

    Just found this about Morph-RDB :

    Probably a good thing to have a spike toward: how to integrate with Trino and Morph-RDB. Will check with @dachafra, et al.

    Could be good to discuss with @dvsrepo and Asun about this, too? It could become an integration point for Recognai?

    enhancement help wanted partnering research 
    opened by ceteri 8
  • Source distribution does not observe the file/path excludes and is too big

    Source distribution does not observe the file/path excludes and is too big

    I'm submitting a

    • [X] bug report (CRITICAL)

    This subsumes #275

    Currently when using either pyproject.toml or setup.py approaches to build source and wheel, the wheel for a release is ~400Kb while the source distribution is ~300Mb, which is too large for PyPi.

    Note that the former was moved to wip/pyproject.toml since its use with Flit appeared to be bugging. Perhaps Poetry works better?

    See the MANIFEST.in file, where there are both include and exclude statements getting used. For some reason, these rules are followed when building a wheel, but not when building a source distribution (sdist)

    @Mec-iS @tomaarsen @jake-aft - do you have any suggestions about the library packaging here could be structured better for avoid this issue?

    bug help wanted 
    opened by ceteri 7
  • Bug report:

    Bug report: "AttributeError: partially initialized module 'kglab'..."

    I'm submitting a bug report.

    • I get a "AttributeError: partially initialized module 'kglab'" error when trying to run the kglab example on the readme

    Current Behaviour:

    When I run the code I get: AttributeError: partially initialized module 'kglab' has no attribute 'KnowledgeGraph' (most likely due to a circular import)

    Expected Behaviour:

    That it would work per the repo readme file

    Steps to reproduce:

    • Create a new Python project
    • Install kglab
    • Create new file test.py
    • Copy the code from the readme file
    • Run the code

    Snapshot:

    kglab

    Environment:

    • Python version 3.10.7
    • pip version 22.2.2 (using pipenv)
    • OS details MacOS 12.6
    • IDE PyCharm 2022.2.2

    Installed packages

    aiobotocore              2.4.0
    aiohttp                  3.8.3
    aioitertools             0.11.0
    aiosignal                1.2.0
    appnope                  0.1.3
    asgiref                  3.5.2
    asttokens                2.0.8
    async-timeout            4.0.2
    attrs                    22.1.0
    backcall                 0.2.0
    botocore                 1.27.59
    cachetools               5.2.0
    certifi                  2022.9.24
    cffi                     1.15.1
    charset-normalizer       2.1.1
    chocolate                0.0.2
    colorama                 0.4.5
    cryptography             38.0.1
    csvwlib                  0.3.2
    decorator                5.1.1
    Django                   4.1.2
    elementpath              3.0.2
    executing                1.1.1
    falcon                   3.1.0
    frozenlist               1.3.1
    fsspec                   2022.8.2
    gcsfs                    2022.8.2
    google-api-core          2.10.2
    google-auth              2.12.0
    google-auth-oauthlib     0.5.3
    google-cloud-core        2.3.2
    google-cloud-storage     2.5.0
    google-crc32c            1.5.0
    google-resumable-media   2.4.0
    googleapis-common-protos 1.56.4
    greenlet                 1.1.3.post0
    html5lib                 1.1
    icecream                 2.1.3
    idna                     3.4
    ipython                  8.5.0
    isodate                  0.6.1
    jedi                     0.18.1
    Jinja2                   3.1.2
    jmespath                 1.0.1
    jsonpath-python          1.0.6
    jsonpickle               2.2.0
    kglab                    0.6.1
    language-tags            1.1.0
    MarkupSafe               2.1.1
    matplotlib-inline        0.1.6
    morph-kgc                2.2.0
    multidict                6.0.2
    networkx                 2.8.7
    numpy                    1.23.3
    oauthlib                 3.2.1
    owlrl                    6.0.2
    oxrdflib                 0.3.2
    packaging                21.3
    pandas                   1.5.0
    parso                    0.8.3
    patsy                    0.5.3
    pexpect                  4.8.0
    pickleshare              0.7.5
    pip                      22.2.2
    prettytable              2.5.0
    prompt-toolkit           3.0.31
    protobuf                 4.21.7
    pslpython                2.3.0
    ptyprocess               0.7.0
    pure-eval                0.2.2
    pyarrow                  9.0.0
    pyasn1                   0.4.8
    pyasn1-modules           0.2.8
    pycparser                2.21
    Pygments                 2.13.0
    pynvml                   11.4.1
    pyoxigraph               0.3.6
    pyparsing                3.0.9
    pyshacl                  0.20.0
    python-dateutil          2.8.2
    pytz                     2022.4
    pyvis                    0.3.0
    PyYAML                   6.0
    rdflib                   6.2.0
    rdflib-jsonld            0.6.2
    requests                 2.28.1
    requests-oauthlib        1.3.1
    rsa                      4.9
    s3fs                     2022.8.2
    scipy                    1.9.2
    setuptools               65.4.1
    six                      1.16.0
    sql-metadata             2.6.0
    SQLAlchemy               1.4.41
    sqlparse                 0.4.3
    stack-data               0.5.1
    statsmodels              0.13.2
    tqdm                     4.64.1
    traitlets                5.4.0
    uritemplate              4.1.1
    urllib3                  1.26.12
    urlpath                  1.2.0
    wcwidth                  0.2.5
    webencodings             0.5.1
    wheel                    0.37.1
    wrapt                    1.14.1
    yarl                     1.8.1
    
    question 
    opened by stuchalk 7
  • Prefix strings with `r` to avoid `DeprecationWarning` and `W1401`

    Prefix strings with `r` to avoid `DeprecationWarning` and `W1401`

    I noticed some warnings in the CI runs for #263:

    =============================== warnings summary ===============================
    kglab/query/sparql.py:195
      /opt/kglab/kglab/query/sparql.py:195: DeprecationWarning: invalid escape sequence \?
        pattern = re.compile("(\?" + var + ")(\W)")  # pylint: disable=W1401
    
    kglab/query/sparql.py:195
      /opt/kglab/kglab/query/sparql.py:195: DeprecationWarning: invalid escape sequence \W
        pattern = re.compile("(\?" + var + ")(\W)")  # pylint: disable=W1401
    

    So I've updated this line to use the r string prefix instead.

    • Tom Aarsen
    opened by tomaarsen 6
  • Initial implementation for RDF-based tests QueryEvaluationTest

    Initial implementation for RDF-based tests QueryEvaluationTest

    From #248

    This is the first draft for implementing automated RDF tests. The first batch of test from RDF-tests (basic) can be run with pytest tests/rdf_tests/test_rdf_basic.py -k test_rdf_runner -s from the project directory; tests are in tests/rdf_tests/dat. For the moment the only assertion implemented is a check on the length of returned results. This is already interesting as some kg query outputs return more or less bindings compared to the expected ones.

    The script should work also on oxigraph-tests but it doesn't, it seems the read_manifest file provided with rdflib cannot parse the oxigraph manifest, maybe a discrepancy in the XML structure? @Tpt please provide some feedback.

    Currently the tests are cut-pasted.

    Tests with anomalies:

    • Running basic/Non-matching triple pattern ERROR: Non-matching triple pattern resulted in object of type 'NoneType' has no len()
    • Running basic/Basic - Prefix/Base 1 Basic - Prefix/Base 1 resulted in False
    • Running basic/Basic - Var 1 Basic - Var 1 resulted in False
    • Running basic/Basic - Var 2 Basic - Var 2 resulted in False
    • Running basic/Basic - Term 6 Basic - Term 6 resulted in False
    • Running basic/Basic - Term 7 ERROR: Basic - Term 7 resulted in Expected {SelectQuery | ConstructQuery | DescribeQuery | AskQuery}, found '.' (at char 140), (line:5, col:23)

    The ones resulting in "False" mean length discrepancies between expected and actual output, the one with errors are exceptions raised.

    opened by Mec-iS 6
  • ModuleNotFoundError: No module named 'urlpath'

    ModuleNotFoundError: No module named 'urlpath'

    After successfully following the instruction for the installation I got, over and over, the following error. I have installed it in a Conda environment.

    bug 
    opened by igrangel 6
  • Integrate csvwlib to support W3C CSVW

    Integrate csvwlib to support W3C CSVW

    opened by ceteri 6
  • [Snyk] Security upgrade setuptools from 39.0.1 to 65.5.1

    [Snyk] Security upgrade setuptools from 39.0.1 to 65.5.1

    This PR was automatically created by Snyk using the credentials of a real user.


    Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.

    Changes included in this PR

    • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
      • requirements.txt
    ⚠️ Warning
    pyvis 0.1.9 requires networkx, which is not installed.
    owlrl 6.0.2 requires rdflib, which is not installed.
    ipython 5.10.0 requires simplegeneric, which is not installed.
    
    

    Vulnerabilities that will be fixed

    By pinning:

    Severity | Priority Score (*) | Issue | Upgrade | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:-------------------------|:------------------------- medium severity | 551/1000
    Why? Recently disclosed, Has a fix available, CVSS 5.3 | Regular Expression Denial of Service (ReDoS)
    SNYK-PYTHON-SETUPTOOLS-3180412 | setuptools:
    39.0.1 -> 65.5.1
    | No | No Known Exploit

    (*) Note that the real score may have changed since the PR was raised.

    Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.

    Check the changes in this PR to ensure they won't cause issues with your project.


    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

    For more information: 🧐 View latest project report

    🛠 Adjust project settings

    📚 Read more about Snyk's upgrade and patch logic


    Learn how to fix vulnerabilities with free interactive lessons:

    🦉 Regular Expression Denial of Service (ReDoS)

    opened by ceteri 0
  • Poetry build

    Poetry build

    Current behaviour

    pyproject.toml uses flint to build

    New expected behaviour

    Issue: Move setup.py functionality to poetry for pre-check and package build and release - https://github.com/DerwenAI/kglab/issues/275

    Build and publish the package with poetry in the pyproject.toml

    I'd like to recommend that we put this on a branch to further test and validate it is doing everything we want/need it to do

    Unsure of the Makefile that builds the docs and how it might be integrated into pyproject.toml with poetry Need to review some of the pre-commit-config options

    I am working on poetry build / publish instructions these will need to be integrated with the docs build instructions for whomever will be building the package not sure if this is something we need in the repo?

    The pyproject.toml needs to have the version changed to the version that will be correct at the time of merge

    Change logs

    added exclude to pyproject.toml of the tests/rdf_tests to not be included in the package

    Updated pre-commit-config to check the poetry additions Updated pyproject.toml to use poetry build and dependency layouts

    Size of the package is now ~50 K for both whl and zip

    opened by jake-aft 1
  • Poetry and pipenv install

    Poetry and pipenv install

    Current behaviour

    No instructions to install kglab with pipenv or poetry Issue: Improve installation- https://github.com/DerwenAI/kglab/issues/272

    New expected behaviour

    Instructions to install kglab with pipenv or poetry

    Change logs

    Instructions to install kglab with pipenv This is not for building the package or development work on kglab project.

    Instructions to install kglab with poetry This is not for building the package or development work on kglab project.

    Readme updated with Instructions to install kglab with pipenv or poetry Created new directory to test the install envs

    Removed and decoupled the Poetry Build changes from the previous PR. These will follow in a future PR

    opened by jake-aft 0
  • implement Frame in place of Subgraph

    implement Frame in place of Subgraph

    Current behaviour

    Subgraph operations are wrapped in Subgraph #273

    New expected behaviour

    Frame is used in place of Subgraph

    Change logs

    • no more Subgraph class, welcome Frame class
    • subg.py renamed to frame.py

    Please double-check that documentation files are rendered correctly according to new naming.

    P.S. I had to rerun all the notebooks.

    opened by Mec-iS 0
  • Move setup.py functionality to poetry for pre-check and package build and release.

    Move setup.py functionality to poetry for pre-check and package build and release.

    I'm submitting a

    [x] feature idea to research and discuss

    This is split from https://github.com/DerwenAI/kglab/issues/272

    Current Behaviour:

    Investigate and review the implication of changing the existing use of setup.py and using poetry instead for pre-check, package build, and release.

    One thing I am not at all clear on is the documentation building for KGLab, and how that will need to be managed in a poetry env / process.

    enhancement 
    opened by jake-biolexis 3
  • Renaming SubgraphMatrix

    Renaming SubgraphMatrix

    SubGraphMatrix (and in perspective SubGraphTensor) is the reference class for graph algebra and network analysis. Would it be better to rename the subg.py module and classes therein for encompassing a more general approach?

    For example:

    • subg.py -> ?
    • SubGraphMatrix: keeping the fact that a SPARQL query is needed (so the subgraph naming), it would be better from a data scientist point-of-view to have this class to follow some more popular convention like for example GraphFrame or DataGraph or NetFrame (just throw a die with the right naming permutations, I though about this names: graph, frame, net, datagram, data, table, ...)
    • SubGraphTensor -> as above for future applications

    cc: @ceteri @tomaarsen

    help wanted question 
    opened by Mec-iS 5
Releases(v0.6.6)
  • v0.6.6(Nov 24, 2022)

  • v0.6.4(Nov 24, 2022)

    2022-11-23

    • update setuptools to workaround potential vulnerabilities
    • create pyproject.toml to support upcoming pip release

    What's Changed

    • Add more sparql11 rdf-tests by @Mec-iS in https://github.com/DerwenAI/kglab/pull/259
    • Create querying mixin by @Mec-iS in https://github.com/DerwenAI/kglab/pull/262
    • Prefix strings with r to avoid DeprecationWarning and W1401 by @tomaarsen in https://github.com/DerwenAI/kglab/pull/264
    • Add serilization-deserialization mixin by @Mec-iS in https://github.com/DerwenAI/kglab/pull/263
    • Create W3C standards mixin by @Mec-iS in https://github.com/DerwenAI/kglab/pull/265
    • Provide a graph factory method to be used by mixins to instantiate KGs by @Mec-iS in https://github.com/DerwenAI/kglab/pull/268
    • Starting graph algebra by @Mec-iS in https://github.com/DerwenAI/kglab/pull/267
    • Improvement in networks module by @Mec-iS in https://github.com/DerwenAI/kglab/pull/271
    • Bump scikit-learn from 1.1.2 to 1.1.3 by @dependabot in https://github.com/DerwenAI/kglab/pull/279
    • Workaround setuptools vulnerability by @ceteri in https://github.com/DerwenAI/kglab/pull/289
    • Fix error with LIMIT clause in gpviz by @Mec-iS in https://github.com/DerwenAI/kglab/pull/282
    • Cutover to using pyproject.toml based on Flit by @ceteri in https://github.com/DerwenAI/kglab/pull/290

    New Contributors

    • @dependabot made their first contribution in https://github.com/DerwenAI/kglab/pull/279

    Full Changelog: https://github.com/DerwenAI/kglab/compare/v0.6.1...v0.6.4

    Source code(tar.gz)
    Source code(zip)
  • v0.6.1(Apr 20, 2022)

    2022-04-20

    • automated RDF tests, coordinated with Oxigraph; kudos @Mec-iS, @Tpt
    • begin refactoring KnowledgeGraph as abstract classes, per #237
    • update to Morph-KGC 2.0.0 and update links to the new documentation; kudos @ArenasGuerreroJulian

    What's Changed

    • Initial implementation for RDF-based tests QueryEvaluationTest by @Mec-iS in https://github.com/DerwenAI/kglab/pull/249
    • Base class refactor by @ceteri in https://github.com/DerwenAI/kglab/pull/252
    • Add rdf-tests algebra by @Mec-iS in https://github.com/DerwenAI/kglab/pull/253
    • update to Morph-KGC 2.0.0 and update links to the new documentation by @ArenasGuerreroJulian in https://github.com/DerwenAI/kglab/pull/254
    • minor fixes to resolve warnings; prep release by @ceteri in https://github.com/DerwenAI/kglab/pull/255

    Full Changelog: https://github.com/DerwenAI/kglab/compare/v0.6.0...v0.6.1

    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Mar 23, 2022)

    • include use of YARRRML in the R2RML tutorial in ex2_1; kudos @cutterkom
    • support for substituting the binding variables into a SPARQL query – for better Oxrdflib support, etc.
    • add a NumPy-backed RDFlib.Store plugin

    What's Changed

    • swap list constructors for np.array() by @ceteri in https://github.com/DerwenAI/kglab/pull/243
    • unbinding a SPARQL query, to help troubleshoot integration with Oxrdflib by @ceteri in https://github.com/DerwenAI/kglab/pull/245
    • ex2_1: add yarrrrml to get r2rml file by @cutterkom in https://github.com/DerwenAI/kglab/pull/244
    • Docs yarrrml by @ceteri in https://github.com/DerwenAI/kglab/pull/246
    • prep release by @ceteri in https://github.com/DerwenAI/kglab/pull/247

    New Contributors

    • @cutterkom made their first contribution in https://github.com/DerwenAI/kglab/pull/244

    Full Changelog: https://github.com/DerwenAI/kglab/compare/v0.5.3...v0.6.0

    Source code(tar.gz)
    Source code(zip)
  • v0.5.3(Mar 15, 2022)

    What's Changed

    • update docs by @ceteri in https://github.com/DerwenAI/kglab/pull/241
    • adjust dependency versions to avoid conflicts by @ceteri in https://github.com/DerwenAI/kglab/pull/242

    Full Changelog: https://github.com/DerwenAI/kglab/compare/v0.5.2...v0.5.3

    Source code(tar.gz)
    Source code(zip)
  • v0.5.2(Mar 15, 2022)

    • bump up versions of dependencies to fit Py 3.7+
    • improve testing based on pytest; kudos @Mec-iS
    • allow config for rdflib.Store plugins, e.g., the excellent Oxrdflib; kudos @paoespinozarias

    What's Changed

    • updated docs by @ceteri in https://github.com/DerwenAI/kglab/pull/234
    • add DH badge by @ceteri in https://github.com/DerwenAI/kglab/pull/235
    • add DH badge by @ceteri in https://github.com/DerwenAI/kglab/pull/236
    • Implement tests modules by @Mec-iS in https://github.com/DerwenAI/kglab/pull/238
    • Storage plugin by @ceteri in https://github.com/DerwenAI/kglab/pull/239
    • allow configurable rdflib.Store plugins, e.g., Oxrdflib by @ceteri in https://github.com/DerwenAI/kglab/pull/240

    Full Changelog: https://github.com/DerwenAI/kglab/compare/v0.5.1...v0.5.2

    Source code(tar.gz)
    Source code(zip)
  • v0.5.1(Mar 10, 2022)

    • CI action to build/push container image to DockerHub on release; kudos @RishiKumarRay

    What's Changed

    • Add tests by @Mec-iS in https://github.com/DerwenAI/kglab/pull/231
    • CI action to add kglab to DockerHub by @RishiKumarRay in https://github.com/DerwenAI/kglab/pull/232
    • prep release, confirming #230 by @ceteri in https://github.com/DerwenAI/kglab/pull/233

    New Contributors

    • @RishiKumarRay made their first contribution in https://github.com/DerwenAI/kglab/pull/232

    Full Changelog: https://github.com/DerwenAI/kglab/compare/v0.5.0...v0.5.1

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Mar 8, 2022)

    We're in the progress of making structural changes to the library and how it gets tested and deployed, while preparing for a v1.0.0 release. Most all of the existing features will continue without change, although we're making preparations for new kinds of integrations and this will change our library structure. We'll try to minimize breaking changes.

    • improve our handling of Dockerfile (e.g., for use in regulated environments that require a simpler base image)
    • refactored code to remove dependencies out of library which are only needed for the tutorial
    • removed dependency on PyTorch

    What's Changed

    • prepare for version bump by @ceteri in https://github.com/DerwenAI/kglab/pull/224
    • reworking docker by @ceteri in https://github.com/DerwenAI/kglab/pull/225 https://github.com/DerwenAI/kglab/pull/226
    • Implement pytest for current tests by @Mec-iS in https://github.com/DerwenAI/kglab/pull/228

    Full Changelog: https://github.com/DerwenAI/kglab/compare/v0.4.4...v0.5.0

    Source code(tar.gz)
    Source code(zip)
  • v0.4.4(Feb 27, 2022)

    What's Changed

    • Add morph-kgc materialize by @Mec-iS in https://github.com/DerwenAI/kglab/pull/220
    • Revert "Add morph-kgc materialize" by @ceteri in https://github.com/DerwenAI/kglab/pull/221
    • add basic Morph-KGC example by @ArenasGuerreroJulian in https://github.com/DerwenAI/kglab/pull/223
    • Implement materialize for morph-kgc --- WIP by @Mec-iS in https://github.com/DerwenAI/kglab/pull/222

    New Contributors

    • @ArenasGuerreroJulian made their first contribution in https://github.com/DerwenAI/kglab/pull/223

    Full Changelog: https://github.com/DerwenAI/kglab/compare/v0.4.3...v0.4.4

    Source code(tar.gz)
    Source code(zip)
  • v0.4.3(Feb 10, 2022)

    What's Changed

    • [Snyk] Security upgrade mistune from 0.8.4 to 2.0.1 by @snyk-bot in https://github.com/DerwenAI/kglab/pull/218
    • addresses #198 with improved GPU detection/handling by @ceteri in https://github.com/DerwenAI/kglab/pull/219

    Full Changelog: https://github.com/DerwenAI/kglab/compare/v0.4.2...v0.4.3

    Source code(tar.gz)
    Source code(zip)
  • v0.4.2(Dec 13, 2021)

    What's Changed

    • Fix import sequence by @Mec-iS in https://github.com/DerwenAI/kglab/pull/210
    • update abort_on_error to abort_on_first for pyshacl by @fils in https://github.com/DerwenAI/kglab/pull/213
    • upgrade OWL-RL and pySHACL to track RDFlib updates #214 by @ceteri in https://github.com/DerwenAI/kglab/pull/215
    • migrate up to Py 3.7 or later by @ceteri in https://github.com/DerwenAI/kglab/pull/216
    • migrate up to Py 3.7 or later by @ceteri in https://github.com/DerwenAI/kglab/pull/217

    New Contributors

    • @fils made their first contribution in https://github.com/DerwenAI/kglab/pull/213

    Full Changelog: https://github.com/DerwenAI/kglab/compare/v0.4.1...v0.4.2

    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Nov 27, 2021)

    • CI pipeline through GH Actions; kudos @tomaarsen
    • further testing/config for NVIDIA GPUs
    • fixes for Snyk security advisories
    • update to RDFlib 6.x, removing use of json-ld plugin
    • use nbmake to add test coverage of example notebooks into the CI pipeline; kudos @Mec-iS

    What's Changed

    • Adding pre-commit to Continuous Integration with GitHub Actions by @tomaarsen in https://github.com/DerwenAI/kglab/pull/192
    • Update by @ceteri in https://github.com/DerwenAI/kglab/pull/193
    • further testing/config for NVIDIA GPUs by @ceteri in https://github.com/DerwenAI/kglab/pull/195
    • workaround for GitHub CI by @ceteri in https://github.com/DerwenAI/kglab/pull/196
    • Improve relative paths in notebooks by @Mec-iS in https://github.com/DerwenAI/kglab/pull/205
    • updated notebooks for RDFlib 6.x by @ceteri in https://github.com/DerwenAI/kglab/pull/208
    • Add PR and issue creation templates by @Mec-iS in https://github.com/DerwenAI/kglab/pull/206
    • Update by @ceteri in https://github.com/DerwenAI/kglab/pull/209

    New Contributors

    • @tomaarsen made their first contribution in https://github.com/DerwenAI/kglab/pull/192
    • @Mec-iS made their first contribution in https://github.com/DerwenAI/kglab/pull/205

    Full Changelog: https://github.com/DerwenAI/kglab/compare/v0.4.0...v0.4.1

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(May 10, 2021)

    2021-05-10

    • add multifile support for load_jsonld(); kudos @Ankush-Chander
    • warning about NumPy/TensorFlow version conflicts; kudos @CatChenal
    • roll back NumPy requirement to >= 1.19.2
    • documenting notes about how to handle "PEP 517" errors
    • add multifile support for load_parquet(); kudos @Ankush-Chander
    • import JSON from Roam Research export
    • add docker-compose support for tutorial; kudos @louisguitton
    • note the PSL dependency on Java JDK
    • Visualize a SPARQL query using PyVis; kudos @pebbie
    • CI based on GitHub Actions; kudos @louisguitton
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Apr 24, 2021)

    2021-04-23

    • add conda environment.yml plus instructions
    • use bandit to check for security issues
    • add pre-commit hooks
    • add lgtm code reviews (slow, not integrating into GitHub PRs directly)
    • add use of pipdeptree to analyze dependencies
    • refactor docs to use Divio design patterns; kudos @louisguitton
    • created SECURITY.md security policy
    • using Snyk for security audits of dependencies (it has some troubles)
    • testing/correcting the PSL examples; kudos @louisguitton
    • include first user quote; kudos @kaaloo !!
    • multifile decorator (supports globs) for load_rdf(); kudos @Ankush-Chander
    • fixed bug in SubgraphTensor null check; kudos @dvsrepo
    • prep for pytorch_geometric integration; kudos @dvsrepo
    • add as_tensor() support for PyTorch
    Source code(tar.gz)
    Source code(zip)
  • v0.2.1(Mar 12, 2021)

    2021-03-12

    • tutorial proofreading and corrections; kudos @louisguitton
    • better exception handling for RDF construction, parsing, serialization
    • build_nx_graph() now requires a networkx.DiGraph directed graph as an argument
    • add DOI to README, CITATION, and docs
    • add contributor instructions
    • neo4j integration via neosemantics; kudos @gauravjaglan
    • replace GPUtil with pynvml as recommended by NVidia; kudos @kingmesal
    • option to enable NVidia GPU use, if devices are available and libaries are installed
    • using cuDF/cuGraph in lieu of pandas/networkx where possible; kudos @BradReesWork
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Feb 7, 2021)

  • v0.1.8(Feb 1, 2021)

    2021-01-31

    • hotfix: backing out the igraph dependency; too many installation issues with it
    • factory pattern to build an igraph object allows caller to create and pass in, instead
    Source code(tar.gz)
    Source code(zip)
  • v0.1.7(Jan 30, 2021)

    2021-01-30

    • fix for save_parquet() since storage_options won't be used by pandas before 1.2.0
    • introduced SubgraphMatrix and SubgraphTensor as subclasses for the base vectorization
    • introduced PSLModel class for building probabilistic soft logic models
    • using icecream in methods that require verbose traces
    Source code(tar.gz)
    Source code(zip)
  • v0.1.6(Jan 19, 2021)

    2021-01-19

    • rollback pandas to 1.1.5 which is the latest stable on Ubuntu; see #94
    • revise pyvis use as a factory pattern
    • extend RDFlib serialization with urlpath support
    • extend all serialization to support file-like objects
    • including gcsfs and fsspec to leverage cloud bucket access in pandas
    • added code_of_conduct.md
    • code checking based on pylint
    • added accessor methods, e.g., KnowledgeGraph.rdf_graph()
    • updated pandas usage for direct Parquet/Arrow calls, e.g., read_parquet() and to_parquet()
    • updated pyshacl usage to >= 0.14.1 to support inplace graph manipulation (inference)
    Source code(tar.gz)
    Source code(zip)
  • v0.1.5(Jan 4, 2021)

    0.1.5

    2021-01-04

    • renamed serialization methods, e.g., save_ttl() -- WILL BREAK THINGS
    • impl load_rdf_text() and save_rdf_text() to De/Ser as text
    • type checking based on typing and mypy
    • corrected the networkx examples to use DiGraph for directed graphs
    • generated meta.yml for conda support
    • use mkdocs to generate documentation
    • add method to return SPARQL query result set as a pandas DataFrame
    • integrate with python-igraph, leidenalg, cairocffi to support iGraph
    • provide simple OWL-RL inference with infer_rdfs_closure() and infer_owlrl_closure()
    • add Subgraph class for projecting onto networkx
    • add Measure class for measuring graphs and creating simplex generators
    • use coverage for unit test coverage
    • use chocolate for enhanced kwargs
    • make KnowledgeGraph class GPU-aware
    • add ShapeFactory and related classes for evolving shape prediction
    Source code(tar.gz)
    Source code(zip)
  • v0.1.4(Dec 6, 2020)

    2020-12-06

    • added pySHACL examples
    • resolved Google Colab errors registering the rdflib-jsonld plugin
    • comparing timing info across serialization methods
    • simplified the example notebook naming convention
    Source code(tar.gz)
    Source code(zip)
  • v0.1.3(Dec 4, 2020)

  • v0.1.2(Nov 30, 2020)

    2020-11-30

    updates prior to "KG 101" tutorial https://www.knowledgeconnexions.world/talks/kg-101/

    • support for dependabot
    • added a logo
    • interactive visualizations in pyvis and grave
    • SPARQL query examples
    • running graph algorithms in networkx
    • Parquet files using pyarrow
    • examples of annotation that combine use of SPARQL, SKOS, etc.
    • added instructions for installing/running JupyterLab
    • examples of SRL inference using pslpython
    • demo use of vector embedding with gensim
    • examples of string similarity with pylev
    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Nov 9, 2020)

Owner
derwen.ai
"In the loop..."
derwen.ai
Statistics and Visualization of acceptance rate, main keyword of CVPR 2021 accepted papers for the main Computer Vision conference (CVPR)

Statistics and Visualization of acceptance rate, main keyword of CVPR 2021 accepted papers for the main Computer Vision conference (CVPR)

Hoseong Lee 78 Aug 23, 2022
view cool stats related to your discord account.

DiscoStats cool statistics generated using your discord data. How? DiscoStats is not a service that breaks the Discord Terms of Service or Community G

ibrahim hisham 5 Jun 02, 2022
Tools for exploratory data analysis in Python

Dora Exploratory data analysis toolkit for Python. Contents Summary Setup Usage Reading Data & Configuration Cleaning Feature Selection & Extraction V

Nathan Epstein 599 Dec 25, 2022
Realtime Viewer Mandelbrot set with Python and Taichi (cpu, opengl, cuda, vulkan, metal)

Mandelbrot-set-Realtime-Viewer- Realtime Viewer Mandelbrot set with Python and Taichi (cpu, opengl, cuda, vulkan, metal) Control: "WASD" - movement, "

22 Oct 31, 2022
metedraw is a project mainly for data visualization projects of Atmospheric Science, Marine Science, Environmental Science or other majors

It is mainly for data visualization projects of Atmospheric Science, Marine Science, Environmental Science or other majors.

Nephele 11 Jul 05, 2022
A simple python tool for explore your object detection dataset

A simple tool for explore your object detection dataset. The goal of this library is to provide simple and intuitive visualizations from your dataset and automatically find the best parameters for ge

GRADIANT - Centro Tecnolóxico de Telecomunicacións de Galicia 142 Dec 25, 2022
Generate a 3D Skyline in STL format and a OpenSCAD file from Gitlab contributions

Your Gitlab's contributions in a 3D Skyline gitlab-skyline is a Python command to generate a skyline figure from Gitlab contributions as Github did at

Félix Gómez 70 Dec 22, 2022
Data visualization electromagnetic spectrum

Datenvisualisierung-Elektromagnetischen-Spektrum Anhand des Moduls matplotlib sollen die Daten des elektromagnetischen Spektrums dargestellt werden. D

Pulsar 1 Sep 01, 2022
Info for The Great DataTas plot-a-thon

The Great DataTas plot-a-thon Datatas is organising a Data Visualisation competition: The Great DataTas plot-a-thon We will be using Tidy Tuesday data

2 Nov 21, 2021
Glue is a python project to link visualizations of scientific datasets across many files.

Glue Glue is a python project to link visualizations of scientific datasets across many files. Click on the image for a quick demo: Features Interacti

675 Dec 09, 2022
Fast visualization of radar_scenes based on oleschum/radar_scenes

RadarScenes Tools About This python package provides fast visualization for the RadarScenes dataset. The Open GL based visualizer is smoother than ole

Henrik Söderlund 2 Dec 09, 2021
A little word cloud generator in Python

Linux macOS Windows PyPI word_cloud A little word cloud generator in Python. Read more about it on the blog post or the website. The code is tested ag

Andreas Mueller 9.2k Dec 30, 2022
Visualize tensors in a plain Python REPL using Sparklines

Visualize tensors in a plain Python REPL using Sparklines

Shawn Presser 43 Sep 03, 2022
visualize_ML is a python package made to visualize some of the steps involved while dealing with a Machine Learning problem

visualize_ML visualize_ML is a python package made to visualize some of the steps involved while dealing with a Machine Learning problem. It is build

Ayush Singh 164 Dec 12, 2022
WebApp served by OAK PoE device to visualize various streams, metadata and AI results

DepthAI PoE WebApp | Bootstrap 4 & Vue.js SPA Dashboard Based on dashmin (https:

Luxonis 6 Apr 09, 2022
TensorDebugger (TDB) is a visual debugger for deep learning. It extends TensorFlow with breakpoints + real-time visualization of the data flowing through the computational graph

TensorDebugger (TDB) is a visual debugger for deep learning. It extends TensorFlow (Google's Deep Learning framework) with breakpoints + real-time visualization of the data flowing through the comput

Eric Jang 1.4k Dec 15, 2022
Cryptocurrency Centralized Exchange Visualization

This is a simple one that uses Grafina to visualize cryptocurrency from the Bitkub exchange. This service will make a request to the Bitkub API from your wallet and save the response to Postgresql. G

Popboon Mahachanawong 1 Nov 24, 2021
With Holoviews, your data visualizes itself.

HoloViews Stop plotting your data - annotate your data and let it visualize itself. HoloViews is an open-source Python library designed to make data a

HoloViz 2.3k Jan 02, 2023
A visualization tool made in Pygame for various pathfinding algorithms.

Pathfinding-Visualizer 🚀 A visualization tool made in Pygame for various pathfinding algorithms. Pathfinding is closely related to the shortest path

Aysha sana 7 Jul 09, 2022
Monochromatic colorscheme for matplotlib with opinionated sensible default

Monochromatic colorscheme for matplotlib with opinionated sensible default If you need a simple monochromatic colorscheme for your matplotlib figures,

Aria Ghora Prabono 2 May 06, 2022