Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

+ calculate max usage helper #4840

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

shadeofblue
Copy link
Contributor

mv compute_subtask_value to a separate helpers module and rename to calculate_subtask_amount

  • calculate_max_usage
  • tests

@@ -7,7 +7,7 @@
from golem.marketplace.pooling_marketplace import\
RequestorPoolingMarketStrategy
from golem.task import timer
from golem.task.taskkeeper import compute_subtask_value
from golem.task.helpers import calculate_subtask_amount
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's just me but "amount" here does not feel right. What was wrong with "value"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in programming context, value has a different connotation and obviously, may refer to something that's not necessarily a number and specifically, even if number, it may not a "monetary" number ... amount does not have such a connotation and the meaning itself may indeed be used to describe monetary quantities

if you're saying "subtask value", it could be understood as e.g. the result of the subtask or some other "value" (as in, a parameter) related to a subtask... in this respect subtask amount feels more unambiguous

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbenke after a tiny bit more thought, maybe just calculate_subtask_payment would be better altogether ... ?

@codecov
Copy link

codecov bot commented Oct 29, 2019

Codecov Report

Merging #4840 into develop will increase coverage by 1.75%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #4840      +/-   ##
===========================================
+ Coverage    87.62%   89.37%   +1.75%     
===========================================
  Files          226      227       +1     
  Lines        20743    20747       +4     
===========================================
+ Hits         18176    18543     +367     
+ Misses        2567     2204     -363

@shadeofblue shadeofblue force-pushed the slight-refactor-of-compute-subtask-value branch from b5a8e91 to 1ae27c0 Compare October 30, 2019 10:29
…to `calculate_subtask_payment`

+ `calculate_max_usage`
+ tests
@shadeofblue shadeofblue force-pushed the slight-refactor-of-compute-subtask-value branch from 1ae27c0 to 5676712 Compare October 30, 2019 10:44
@shadeofblue shadeofblue merged commit a300c92 into develop Oct 30, 2019
@shadeofblue shadeofblue deleted the slight-refactor-of-compute-subtask-value branch October 30, 2019 11:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants