closurizer 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: closurizer
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Add closure expansion fields to kgx files following the Golr pattern
5
5
  Author: Kevin Schaper
6
6
  Author-email: kevin@tislab.org
@@ -24,7 +24,7 @@ def _length(value):
24
24
  def _length_of_field_values(rec, fields):
25
25
  value = 0
26
26
  for field in fields:
27
- if field in rec and (field_value := rec[field]) is not None:
27
+ if (field_value := rec[field]) is not None:
28
28
  value += _length(field_value)
29
29
  return value
30
30
 
@@ -32,7 +32,7 @@ def add_closure(kg_archive: str,
32
32
  closure_file: str,
33
33
  output_file: str,
34
34
  fields: List[str] = ['subject', 'object'],
35
- evidence_fields: List[str] = ['has_evidence', 'publications', 'primary_knowledge_source', 'provided_by']
35
+ evidence_fields: List[str] = ['has_evidence', 'publications', 'primary_knowledge_source']
36
36
  ):
37
37
  print("Generating closure KG...")
38
38
  print(f"kg_archive: {kg_archive}")
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "closurizer"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "Add closure expansion fields to kgx files following the Golr pattern"
5
5
  authors = ["Kevin Schaper <kevin@tislab.org>"]
6
6
 
File without changes