Skip to content

Commit

Permalink
Merge pull request #8 from DerwenAI/bug/show_karate_club
Browse files Browse the repository at this point in the history
Karate Club example
  • Loading branch information
ceteri authored Oct 7, 2022
2 parents 4f1ed3c + f20ccc4 commit c689129
Show file tree
Hide file tree
Showing 13 changed files with 1,950 additions and 210 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ include *.txt
recursive-include dat *.csv
recursive-include dat *.parq
recursive-include tests *.py
recursive-include examples *.ipynb
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ python3 cli.py --help

## Usage programmatically in Python

To construct a partition file programmatically, see the sample code
[`tiny.py`](https://github.com/DerwenAI/pynock/blob/main/tiny.py)
which builds the minimal recipe example as an RDF graph.
To construct a partition file programmatically, see the
[`examples`](https://github.com/DerwenAI/pynock/blob/main/examples)
for Jupyter notebooks with sample code and debugging.


## Background
Expand Down
17 changes: 13 additions & 4 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
# `pynock` changelog

## 1.2.0

2022-10-07

* migrate sample code to `examples/` Jupyter notebooks
* create an example of partitioning based on `NetworkX` "Karate Club"
* add convenience methods `Partition.find_or_create_node()` and `Partition.create_edge()`


## 1.1.1

2022-10-06

* added input validation and warnings
* resolved conflicts with `pandas` for missing values
* add input validation and warnings
* resolve conflicts with `pandas` for missing values
* consistent parsing and generation of RDF
* created CI pipeline using docker and GH Actions
* create CI pipeline using docker and GH Actions


## 1.0.1

2022-10-03

* proposed open standard
* propose open standard


## 1.0.0
Expand Down
8 changes: 4 additions & 4 deletions dat/tiny.csv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"src_name","edge_id","rel_name","dst_name","truth","shadow","is_rdf","labels","props"
"http://purl.org/heals/food/Recipe",-1,"","",1.0,-1,True,"",""
"http://purl.org/heals/ingredient/ChickenEgg",-1,"","",1.0,-1,True,"",""
"http://purl.org/heals/ingredient/CowMilk",-1,"","",1.0,-1,True,"",""
"http://purl.org/heals/ingredient/WholeWheatFlour",-1,"","",1.0,-1,True,"",""
"http://purl.org/heals/food/Recipe",-1,"","",1.0,-1,True,"top_level",""
"http://purl.org/heals/ingredient/ChickenEgg",-1,"","",1.0,-1,True,"Ingredient",""
"http://purl.org/heals/ingredient/CowMilk",-1,"","",1.0,-1,True,"Ingredient",""
"http://purl.org/heals/ingredient/WholeWheatFlour",-1,"","",1.0,-1,True,"Ingredient","{""vegan"":true}"
"https://www.food.com/recipe/327593",-1,"","",1.0,-1,True,"Recipe","{""minutes"":8,""name"":""anytime crepes""}"
"https://www.food.com/recipe/327593",0,"http://purl.org/heals/food/uses_ingredient","http://purl.org/heals/ingredient/ChickenEgg",1.0,-1,True,"",""
"https://www.food.com/recipe/327593",1,"http://purl.org/heals/food/uses_ingredient","http://purl.org/heals/ingredient/CowMilk",1.0,-1,True,"",""
Expand Down
Binary file modified dat/tiny.parq
Binary file not shown.
12 changes: 6 additions & 6 deletions dat/tiny.ttl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@prefix ind: <http://purl.org/heals/ingredient/> .
@prefix wtm: <http://purl.org/heals/food/> .
@prefix ns1: <http://purl.org/heals/food/> .

<https://www.food.com/recipe/327593> a ns1:Recipe ;
ns1:uses_ingredient <http://purl.org/heals/ingredient/ChickenEgg>,
<http://purl.org/heals/ingredient/CowMilk>,
<http://purl.org/heals/ingredient/WholeWheatFlour> .

<https://www.food.com/recipe/327593> a wtm:Recipe ;
wtm:hasIngredient ind:ChickenEgg,
ind:CowMilk,
ind:WholeWheatFlour .
Loading

0 comments on commit c689129

Please sign in to comment.