Skip to content

Commit

Permalink
Merge pull request #99 from semanticarts/bugfix/181836155-dateTime_gr…
Browse files Browse the repository at this point in the history
…aphic

Bugfix/181836155 - dateTime graphic
  • Loading branch information
NeilGraham authored Apr 11, 2022
2 parents dcedb2b + ef788d2 commit 3e52ab4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion onto_tool/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '1.7.1'
VERSION = '1.7.2'
8 changes: 7 additions & 1 deletion onto_tool/ontograph.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ def gather_instance_info(self):
predicate_usage = list(self.select_query(query_text))
logging.debug("%s items returned for %s", len(predicate_usage), predicate)
for usage in predicate_usage:
if 'tgt' in usage and usage['tgt'] is None:
del usage['tgt']
if 'src' not in usage or usage['src'] is None or int(usage.get('num', 0)) < self.threshold:
continue
self.record_predicate_usage(predicate, predicate_str, usage)
Expand Down Expand Up @@ -741,7 +743,11 @@ def create_instance_graf(self, data_dict=None):
return

# Determine the maximum number any edge occurs in the data, so the edge widths can be properly scaled
max_common = max(occurs for class_data in data_dict.values() for occurs in class_data['links'].values())
common_list = [
occurs for class_data in data_dict.values()
for occurs in class_data['links'].values()
]
max_common = 0 if len(common_list) == 0 else max(common_list)

max_instance = max(self.class_counts.values())

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rdflib>=6.0.0
rdflib>=6.1.1
pyshacl~=0.17.0
pydot>=1.4.1
jinja2>=2.11.2
Expand Down

0 comments on commit 3e52ab4

Please sign in to comment.