kodexa 6.1.2a4784849829__py3-none-any.whl → 6.1.2a4786754000__py3-none-any.whl

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.
kodexa/model/model.py CHANGED
@@ -1719,7 +1719,8 @@ class FeatureSetDiff:
1719
1719
  self.first_feature_set = first_feature_set
1720
1720
  self.second_feature_set = second_feature_set
1721
1721
  self._differences = deepdiff.DeepDiff(first_feature_set, second_feature_set, ignore_type_subclasses=True,
1722
- ignore_order=True).to_dict()
1722
+ exclude_types={Tag}).to_dict()
1723
+ self.get_new_items()
1723
1724
  self.diff_parser()
1724
1725
 
1725
1726
  def diff_parser(self):
@@ -1729,7 +1730,6 @@ class FeatureSetDiff:
1729
1730
  changed = diff.get('values_changed', {})
1730
1731
 
1731
1732
  result = {}
1732
-
1733
1733
  for key in set(added.keys()) | set(removed.keys()) | set(changed.keys()):
1734
1734
  key_diff = {}
1735
1735
 
@@ -1747,6 +1747,23 @@ class FeatureSetDiff:
1747
1747
 
1748
1748
  result[key] = key_diff
1749
1749
 
1750
+ def get_new_items(self) -> List[dict]:
1751
+ """
1752
+ :return: Show items that were added
1753
+ """
1754
+ new_item_list = []
1755
+ new_item = {}
1756
+ for key, value in self._differences.get('iterable_item_added').items():
1757
+ new_item['name'] = value['name']
1758
+ for value_item in value['value']:
1759
+ # Check if the value_item is an object of Tag
1760
+ if isinstance(value_item, Tag):
1761
+ value_item = value_item.to_dict()
1762
+
1763
+ new_item['value'] = value_item['value']
1764
+ new_item_list.append(new_item)
1765
+ return new_item_list
1766
+
1750
1767
  def get_differences(self):
1751
1768
  """
1752
1769
  :return: This returns a dictionary representing the differences between the two feature sets
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 6.1.2a4784849829
3
+ Version: 6.1.2a4786754000
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -5,7 +5,7 @@ kodexa/connectors/__init__.py,sha256=WCUEzFGjHcgPAMFIKLaRTXAkGHx3vUCD8APMhOrNNgM
5
5
  kodexa/connectors/connectors.py,sha256=25-TffyGDjxHyp9ITug0qgr1nhqMAekmV5NVvbPGs7o,7722
6
6
  kodexa/model/__init__.py,sha256=DyCgkJU7rOfd4SMvPRLaPdklCNlkqCRRWiVPwjYn2GE,720
7
7
  kodexa/model/base.py,sha256=6IraEK3RomjPgFpPYkxjuLUriF958AusgJO21Dcopeg,753
8
- kodexa/model/model.py,sha256=WwJs1jzA7zOUd1DQeQlcKPy-wanVrcAi3wRoDd-6jwE,92520
8
+ kodexa/model/model.py,sha256=PGuKIqUy2eUzExvMqMOfYMZaHw_snIkEUGtoDRtvGiY,93175
9
9
  kodexa/model/objects.py,sha256=afckMl6Mjc-C-Jvl1sly8sckrujWvV4bOpi3e9ruUlc,116415
10
10
  kodexa/model/persistence.py,sha256=ZWESzXS-jkGbp-NlPuQzQFxmZeRup7uNJjrUkGaYIOk,38334
11
11
  kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
@@ -34,7 +34,7 @@ kodexa/testing/test_components.py,sha256=i_9M6-bfUBdR1uYAzZZzWiW0M1DGKzE5mkNuHq4
34
34
  kodexa/testing/test_utils.py,sha256=HXM3S5FDzarzS6R7jkOHps6d6Ox2UtNqymoK6VCw8Zg,13596
35
35
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
36
36
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- kodexa-6.1.2a4784849829.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
38
- kodexa-6.1.2a4784849829.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
39
- kodexa-6.1.2a4784849829.dist-info/METADATA,sha256=DrXscrgi6Zv9nclk61jBSW83uI02cZ9exZLOp9sJpe0,4159
40
- kodexa-6.1.2a4784849829.dist-info/RECORD,,
37
+ kodexa-6.1.2a4786754000.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
38
+ kodexa-6.1.2a4786754000.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
39
+ kodexa-6.1.2a4786754000.dist-info/METADATA,sha256=Zacyvjs2TA9ubvYrZn9iu3zFk8X3zz9nvXolHO-aBjA,4159
40
+ kodexa-6.1.2a4786754000.dist-info/RECORD,,