Skip to content

Commit

Permalink
Merge branch 'master' of github.com:koenedaele/skosprovider
Browse files Browse the repository at this point in the history
* 'master' of github.com:koenedaele/skosprovider:
  Updated HISTORY.rst
  Add subordinate_arrays to dictdumper.
  Add matches to dict dumps.

Conflicts:
	HISTORY.rst
  • Loading branch information
koenedaele committed Mar 2, 2015
2 parents 08f84cb + afb1707 commit 5ef979e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
:meth:`skosprovider.registry.Registry.get_all` that will be passed to all
registered providers. This determines in what language the
labels of the returned concepts will displayed.
- Fixed some errors with the :func:`skosprovider.utils.dict_dumper`. It didn't
dump the `matches` or the `subordinate_arrays` of concepts.
- Wrote some new documentation on what a provider is and how to use it. Some
other documentation work as well such as documenting the `language` parameter
in the API better.
Expand Down
4 changes: 3 additions & 1 deletion skosprovider/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def dict_dumper(provider):
'narrower': c.narrower,
'broader': c.broader,
'related': c.related,
'member_of': c.member_of
'member_of': c.member_of,
'subordinate_arrays': c.subordinate_arrays,
'matches': c.matches
})
elif isinstance(c, Collection):
ret.append({
Expand Down
34 changes: 31 additions & 3 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,17 @@ def setUp(self):
'narrower': [],
'broader': [],
'related': [],
'member_of': ['3']
'member_of': ['3'],
'subordinate_arrays': [],
'matches': {
'close': [
'http://id.python.org/different/types/of/trees/nr/1/the/larch'
],
'exact': [],
'related': [],
'narrow': [],
'broad': []
}
}
self.chestnut_dump = {
'id': '2',
Expand All @@ -65,7 +75,17 @@ def setUp(self):
'narrower': [],
'broader': [],
'related': [],
'member_of': ['3']
'member_of': ['3'],
'subordinate_arrays': [],
'matches': {
'close': [],
'exact': [],
'related': [
'http://id.python.org/different/types/of/trees/nr/17/the/other/chestnut'
],
'narrow': [],
'broad': []
}
}
self.species_dump = {
'id': 3,
Expand Down Expand Up @@ -98,7 +118,15 @@ def setUp(self):
'narrower': [2, 3],
'broader': [],
'related': [],
'member_of': []
'member_of': [],
'matches': {
'close': [],
'exact': [],
'related': [],
'narrow': [],
'broad': []
},
'subordinate_arrays': []
}

def tearDown(self):
Expand Down

0 comments on commit 5ef979e

Please sign in to comment.