Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a407828329451165 #64

Closed
wants to merge 1 commit into from
Closed

a407828329451165 #64

wants to merge 1 commit into from

Conversation

vladkhard
Copy link

calculate_days_for_discount_rate,
calculate_days_with_payments,
calculate_income

i'll try to commit better next time

@coveralls
Copy link

coveralls commented Aug 16, 2017

Coverage Status

Coverage increased (+0.09%) to 95.663% when pulling ff2e2a7 on vladkhard:npv_calculation into 214d1a3 on openprocurement:npv_calculation.

@coveralls
Copy link

coveralls commented Aug 17, 2017

Coverage Status

Coverage increased (+0.09%) to 95.663% when pulling 3cfedff on vladkhard:npv_calculation into 214d1a3 on openprocurement:npv_calculation.

@coveralls
Copy link

coveralls commented Aug 17, 2017

Coverage Status

Coverage increased (+0.09%) to 95.663% when pulling 3cfedff on vladkhard:npv_calculation into 214d1a3 on openprocurement:npv_calculation.

days_per_year=DAYS_PER_YEAR,
announcement_date=ANNOUNCEMENT_DATE):
first_year_days = (date(announcement_date.year, 12, 31) - announcement_date).days
return [first_year_days] + [days_per_year] * NPV_CALCULATION_DURATION
Copy link
Collaborator

Choose a reason for hiding this comment

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

ця функція вже є, забери її

contract_duration_days,
announcement_date=ANNOUNCEMENT_DATE,
days_per_year=DAYS_PER_YEAR):
contract_duration = calculate_contract_duration(contract_duration_years, contract_duration_days, days_per_year)
Copy link
Collaborator

Choose a reason for hiding this comment

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

нехай функція не використовує інших функцій, а приймає готовий потрібний їй набір даних



def calculate_income(client_cost_reductions, client_payments):
return map(lambda x, y: x - y, client_cost_reductions, client_payments)
Copy link
Collaborator

Choose a reason for hiding this comment

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

перепиши без лямбди

@@ -42,6 +48,46 @@ def contract_duration(self):
)



def days_with_cost_reduction(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

тестові дані винеси у окремий файл (esco/tests/npv_test_data.py)

@coveralls
Copy link

coveralls commented Aug 22, 2017

Coverage Status

Coverage increased (+0.06%) to 95.702% when pulling 0f20678 on vladkhard:npv_calculation into e8e05fc on openprocurement:npv_calculation.

@vladkhard vladkhard closed this Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants