Skip to content

Commit

Permalink
Merge pull request #222 from DerwenAI/morph-kgc
Browse files Browse the repository at this point in the history
Implement materialize for morph-kgc  --- WIP
  • Loading branch information
ceteri authored Feb 27, 2022
2 parents 1d731b1 + 884a589 commit 81a1f28
Show file tree
Hide file tree
Showing 28 changed files with 670 additions and 322 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ jobs:
run: docker logs kglab-notebooks

- uses: pre-commit/[email protected]
- name: Test all notebooks in the examples/ folder can run
run: |
docker exec -i kglab-notebooks bash -c 'pip install pytest nbmake && pytest --nbmake work/examples/*.ipynb'
- name: TODO we no longer want to test notebooks, run unit test suite instead
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ See:
width="231"
/>

## Testing

It's possible to run tests with any of the Jupyter notebooks using:
```python
python3 -m pytest --nbmake examples/*ipynb
```

## License and Copyright

Expand Down Expand Up @@ -173,6 +179,7 @@ and to our contributors:
[@louisguitton](https://github.com/louisguitton),
[@tomaarsen](https://github.com/tomaarsen),
[@Mec-iS](https://github.com/Mec-iS),
[@ArenasGuerreroJulian](https://github.com/ArenasGuerreroJulian),
[@fils](https://github.com/fils),
[@gauravjaglan](https://github.com/gauravjaglan),
[@pebbie](https://github.com/pebbie),
Expand Down
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `kglab` changelog

## 0.4.4

2022-02-27

* integration of `morph-kgc`; kudos @Mec-iS and @ArenasGuerreroJulian


## 0.4.3

2022-02-10
Expand Down
1 change: 1 addition & 0 deletions dat/recipes.rml.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# working on defining RML mappings here #
Binary file added dat/student_sport.db
Binary file not shown.
63 changes: 63 additions & 0 deletions dat/student_sport.r2rml.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@base <http://example.com/base/> .

<TriplesMap1>
a rr:TriplesMap;

rr:logicalTable [ rr:tableName "Student"; ] ;

rr:subjectMap [
rr:template "http://example.com/student/{ID}";
rr:class ex:Student;
];

rr:predicateObjectMap
[
rr:predicate ex:firstName ;
rr:objectMap [ rr:column "FirstName" ]
];

rr:predicateObjectMap
[
rr:predicate ex:lastName ;
rr:objectMap [ rr:column "LastName" ]
]
.

<TriplesMap2>
a rr:TriplesMap;

rr:logicalTable [ rr:tableName "Sport"; ] ;

rr:subjectMap [
rr:template "http://example.com/sport/{ID}";
rr:class ex:Sport;
];

rr:predicateObjectMap
[
rr:predicate ex:id ;
rr:objectMap [ rr:column "ID"; ]
];

rr:predicateObjectMap
[
rr:predicate ex:description ;
rr:objectMap [ rr:column "Description" ]
]
.

<LinkMap_1_2>
a rr:TriplesMap;

rr:logicalTable [ rr:tableName "Student_Sport" ];

rr:subjectMap [ rr:template "http://example.com/student/{ID_Student}" ];

rr:predicateObjectMap [
rr:predicate ex:plays ;
rr:objectMap [ rr:template "http://example.com/sport/{ID_Sport}" ];
].
7 changes: 6 additions & 1 deletion docs/ack.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and to our contributors:
[@louisguitton](https://github.com/louisguitton),
[@tomaarsen](https://github.com/tomaarsen),
[@Mec-iS](https://github.com/Mec-iS),
[@ArenasGuerreroJulian](https://github.com/ArenasGuerreroJulian),
[@fils](https://github.com/fils),
[@gauravjaglan](https://github.com/gauravjaglan),
[@pebbie](https://github.com/pebbie),
Expand Down Expand Up @@ -105,7 +106,7 @@ Source code for **kglab** plus its logo, documentation, and examples
have an [MIT license](https://spdx.org/licenses/MIT.html) which is
succinct and simplifies use in commercial applications.

All materials herein are Copyright &copy; 2020-2021 Derwen, Inc.
All materials herein are Copyright &copy; 2020-2022 Derwen, Inc.

[![logo for Derwen, Inc.](https://derwen.ai/static/block_logo.png)](https://derwen.ai/)

Expand Down Expand Up @@ -134,3 +135,7 @@ See also:
* [zincbase](https://github.com/complexdb/zincbase)
* *pro:* probabilistic graph measures, complex simulation suite, leverages GPUs
* *con:* lacks interchange with RDF or other standard formats

In general, check
<https://github.com/pysemtec/semantic-python-overview> for excellent
curated listings of open source semantic technologies in Python.
1 change: 1 addition & 0 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ and
for *type checking*.
To run these tests specifically:
```
mypy --install-types
mypy kglab/*.py
```

Expand Down
11 changes: 3 additions & 8 deletions docs/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ source project.
Links for open source community resources:

* [Issue Tracker](https://github.com/DerwenAI/kglab/issues) for discussions and open source governance
* ["Graph-Based Data Science"](https://derwen.ai/s/kcgh) talk which gets updated along with the code
* [*Graph-Based Data Science*](https://www.linkedin.com/groups/6725785/) group on LinkedIn – join to receive related updates, news, conference coupons, etc.
* ["Graph Data Science"](https://derwen.ai/s/kcgh) talk which gets updated along with the code
* [*Graph Data Science*](https://www.linkedin.com/groups/6725785/) group on LinkedIn – join to receive related updates, news, conference coupons, etc.
* ["Graph Thinking"](https://medium.com/knowledge-technologies/graph-thinking-5e9c85134ab0) with Jürgen Müller

The [Knowledge Graph Conference](glossary/#knowledge-graph-conference)
hosts several community resources where you can post questions and
Expand All @@ -25,12 +26,6 @@ topics.
* [community Slack](https://knowledgegraphconf.slack.com/ssb/redirect) – specifically on the `#ask` channel
* [Knowledge Tech Q&A site](https://answers.knowledgegraph.tech/) for extended discussions

[KGC](glossary/#knowledge-graph-conference)
also hosts
[monthly office hours](https://www.notion.so/KG-Community-Events-Calendar-8aacbe22efa94d9b8b39b7288e22c2d3)
with [Paco Nathan](ack/#project-lead)
and others involved in this open source project.


## Project Feedback and Roadmap

Expand Down
3 changes: 2 additions & 1 deletion docs/depend.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<img src="../assets/nouns/api.png" alt="API by Adnen Kadri from the Noun Project" />

The **kglab** package requires [Python 3.6+](https://www.python.org/downloads/).
The **kglab** package requires [Python 3.7+](https://www.python.org/downloads/).

## Base Support

Expand All @@ -17,6 +17,7 @@ include:
- [gensim](https://radimrehurek.com/gensim/)
- [icecream](https://github.com/gruns/icecream)
- [matplotlib](https://matplotlib.org/)
- [Morph-KGC](https://github.com/oeg-upm/morph-kgc)
- [NetworkX](https://networkx.org/)
- [NumPy](https://numpy.org/)[^2]
- [OWL-RL](https://owl-rl.readthedocs.io/)
Expand Down
Loading

0 comments on commit 81a1f28

Please sign in to comment.