dkg 8.0.14__py3-none-any.whl → 8.1.0__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.
@@ -386,24 +386,16 @@ class KnowledgeAsset(Module):
386
386
  if token_amount:
387
387
  estimated_publishing_cost = token_amount
388
388
  else:
389
- time_until_next_epoch = self.blockchain_service.time_until_next_epoch()
390
- epoch_length = self.blockchain_service.epoch_length()
391
389
  stake_weighted_average_ask = (
392
390
  self.blockchain_service.get_stake_weighted_average_ask()
393
391
  )
394
392
 
395
393
  # Convert to integers and perform calculation
396
394
  estimated_publishing_cost = (
397
- (
398
- int(stake_weighted_average_ask)
399
- * (
400
- int(epochs_num) * int(1e18)
401
- + (int(time_until_next_epoch) * int(1e18)) // int(epoch_length)
402
- )
403
- * int(dataset_size)
404
- )
395
+ int(stake_weighted_average_ask)
396
+ * int(epochs_num)
397
+ * int(dataset_size)
405
398
  // 1024
406
- // int(1e18)
407
399
  )
408
400
 
409
401
  knowledge_collection_id = None
@@ -398,26 +398,16 @@ class AsyncKnowledgeAsset(AsyncModule):
398
398
  if token_amount:
399
399
  estimated_publishing_cost = token_amount
400
400
  else:
401
- time_until_next_epoch = (
402
- await self.blockchain_service.time_until_next_epoch()
403
- )
404
- epoch_length = await self.blockchain_service.epoch_length()
405
401
  stake_weighted_average_ask = (
406
402
  await self.blockchain_service.get_stake_weighted_average_ask()
407
403
  )
408
404
 
409
405
  # Convert to integers and perform calculation
410
406
  estimated_publishing_cost = (
411
- (
412
- int(stake_weighted_average_ask)
413
- * (
414
- int(epochs_num) * int(1e18)
415
- + (int(time_until_next_epoch) * int(1e18)) // int(epoch_length)
416
- )
417
- * int(dataset_size)
418
- )
407
+ int(stake_weighted_average_ask)
408
+ * int(epochs_num)
409
+ * int(dataset_size)
419
410
  // 1024
420
- // int(1e18)
421
411
  )
422
412
 
423
413
  knowledge_collection_id = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dkg
3
- Version: 8.0.14
3
+ Version: 8.1.0
4
4
  Summary: Python library for interacting with the OriginTrail Decentralized Knowledge Graph
5
5
  License: Apache-2.0
6
6
  Author: Uladzislau Hubar
@@ -24,8 +24,8 @@ dkg/managers/manager.py,sha256=2fGwzppJR33d3VPRHgZIvlBbcrb5P99_J7BdfaaOSYM,2640
24
24
  dkg/method.py,sha256=HG_mI6CXxKznLAN561G2Gqtijm3eliHV6vPxAvz-dGs,5521
25
25
  dkg/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  dkg/modules/asset/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
- dkg/modules/asset/asset.py,sha256=IplLU6Rz2rJlCYpfQbPPl4JFvlieU7Vx5-TvoFifB_E,27675
28
- dkg/modules/asset/async_asset.py,sha256=92YL0JqQ5vXeJbWd3MBIwwYqEX6Y2ksghnED76hrrzs,28260
27
+ dkg/modules/asset/asset.py,sha256=G9CVvf6_sRvugHS-blteCJruW6t_U6rmOQipeMDKMx0,27300
28
+ dkg/modules/asset/async_asset.py,sha256=3uc78_uA7tPKBsMODBAU-AOk0mZ9WumaIBgcG50Aum8,27841
29
29
  dkg/modules/async_module.py,sha256=iw4DEU8tUvm0CXErQ1LZ8qGcNMQJmvGhu0poHjoKPaI,2629
30
30
  dkg/modules/graph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  dkg/modules/graph/async_graph.py,sha256=4YNTvnRdeuIV2xjr8-MT8h8zVoW6GfTKVc2AwGvsNuY,4196
@@ -75,8 +75,8 @@ dkg/utils/node_request.py,sha256=wppF8Xf0RkuAAcURcYgyjGAdMsXm0L5YEem8wFGE2g8,651
75
75
  dkg/utils/rdf.py,sha256=AvlcxZEeP58UbaGGvPX_ss69O-tgTXOJ9y9COZqVgkw,2973
76
76
  dkg/utils/string_transformations.py,sha256=eR51fVwTF9QKxEqXo9_1Bfw_k8iQajdXD6rKuTvhs70,972
77
77
  dkg/utils/ual.py,sha256=g7PFyS4Sbwjmwkq-eB20uRULEC2wlPGZr31BVQjs5OQ,1569
78
- dkg-8.0.14.dist-info/LICENSE,sha256=Dr70w2zcW8-jrPGlpTTTlJPL8lR4j2zpDD32tdEFgjY,11375
79
- dkg-8.0.14.dist-info/METADATA,sha256=KnPQYF84DahhRYTXoH3vd478uHS7KeF829qLuSZDiV0,10821
80
- dkg-8.0.14.dist-info/NOTICE,sha256=Rk5toFR2ZqPwVZ3P_P4wE6U1xCnWR9KD3rNBqfPY7h8,368
81
- dkg-8.0.14.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
82
- dkg-8.0.14.dist-info/RECORD,,
78
+ dkg-8.1.0.dist-info/LICENSE,sha256=Dr70w2zcW8-jrPGlpTTTlJPL8lR4j2zpDD32tdEFgjY,11375
79
+ dkg-8.1.0.dist-info/METADATA,sha256=FTb-ym6V2Iic2CON7rFUcWFyygR1HdvIlQonuuIAUos,10820
80
+ dkg-8.1.0.dist-info/NOTICE,sha256=Rk5toFR2ZqPwVZ3P_P4wE6U1xCnWR9KD3rNBqfPY7h8,368
81
+ dkg-8.1.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
82
+ dkg-8.1.0.dist-info/RECORD,,
File without changes
File without changes
File without changes