diff --git a/bpfin/financials/financial_income.py b/bpfin/financials/financial_income.py index c398fc6d6665f8b4d188e359370e8c4840653184..e5d193dca259fdc02f9f34138171ecc81feb8497 100644 --- a/bpfin/financials/financial_income.py +++ b/bpfin/financials/financial_income.py @@ -19,7 +19,7 @@ class Income_Statement(): self.revenue = None self.utility_expense = None self.non_utility_expense = None - self.electricity_opex = None + self.electric_opex = None self.gas_opex = None self.oil_opex = None self.water_opex = None @@ -48,7 +48,7 @@ class Income_Statement(): Description Sample: income_input = {revenue': 100000, 'utility_expense': 60000,'non_utility_expense': 3000} - annual_bill_table = {'electricity': electricity_bill, 'oil': oil_bill, 'gas': gas_bill, 'water': water_bill} + annual_bill_table = {'electric': electric_bill, 'oil': oil_bill, 'gas': gas_bill, 'water': water_bill} TODO: create gloabl constant list for income statement line items and replace the properties @@ -57,11 +57,11 @@ class Income_Statement(): self.revenue = income_input['revenue'] self.utility_expense = income_input['utility_expense'] self.non_utility_expense = income_input['non_utility_expense'] - self.electricity_opex = annual_bill_table[UTILITY_TYPE_LIST[0]][self.year] + self.electric_opex = annual_bill_table[UTILITY_TYPE_LIST[0]][self.year] self.gas_opex = annual_bill_table[UTILITY_TYPE_LIST[1]][self.year] self.oil_opex = annual_bill_table[UTILITY_TYPE_LIST[2]][self.year] self.water_opex = annual_bill_table[UTILITY_TYPE_LIST[3]][self.year] - self.energy_opex = self.electricity_opex + self.oil_opex + self.gas_opex + self.water_opex + self.energy_opex = self.electric_opex + self.oil_opex + self.gas_opex + self.water_opex self.other_utility = self.utility_expense - self.energy_opex self.net_non_energy_opex = self.other_utility + self.non_utility_expense self.total_opex = self.energy_opex + self.net_non_energy_opex @@ -90,11 +90,11 @@ class Income_Statement(): annual_bills = {'electric: 100.0, 'oil': 200.0, 'gas': 300.0, 'water': 400.0} """ self.revenue = average_revenue - self.electricity_opex = annual_bills[UTILITY_TYPE_LIST[0]] + self.electric_opex = annual_bills[UTILITY_TYPE_LIST[0]] self.gas_opex = annual_bills[UTILITY_TYPE_LIST[1]] self.oil_opex = annual_bills[UTILITY_TYPE_LIST[2]] self.water_opex = annual_bills[UTILITY_TYPE_LIST[3]] - self.energy_opex = self.electricity_opex + self.gas_opex + self.oil_opex + self.water_opex + self.energy_opex = self.electric_opex + self.gas_opex + self.oil_opex + self.water_opex self.other_utility = self.revenue * characters['other_utility_percent'] self.non_utility_expense = self.revenue * characters[ 'non_utility_expense_percent'] @@ -117,7 +117,7 @@ def convert_income_statement_class(income_statement_class): 'revenue': income_statement_class.revenue, 'utility_expense': income_statement_class.utility_expense, 'energy_opex': income_statement_class.energy_opex, - 'electricity_opex': income_statement_class.electricity_opex, + 'electric_opex': income_statement_class.electric_opex, 'gas_opex': income_statement_class.gas_opex, 'oil_opex': income_statement_class.oil_opex, 'water_opex': income_statement_class.water_opex, @@ -155,8 +155,8 @@ class Income_Statement_Next(): 'non_utility_expense_percent': (float) 0.035 == 3.5% 'revenue_average': (float) 3000.00 } - annual_bill_table = {'electric: electricity_bill, 'oil': oil_bill, 'gas': gas_bill, 'water': water_bill} - electricity_bill = {2014: 100, 2015:200, ...} + annual_bill_table = {'electric: electric_bill, 'oil': oil_bill, 'gas': gas_bill, 'water': water_bill} + electric_bill = {2014: 100, 2015:200, ...} """ if not validate_growth_rate_flag(growth_rate_flag): raise ValueError('growth_rate input is not valid') @@ -170,11 +170,11 @@ class Income_Statement_Next(): growth_rate = growth_rate_flag # growth_rate_flag == 0.00, 0.01, ... current_revenue = last_revenue * (1 + growth_rate) self.revenue = current_revenue - self.electricity_opex = annual_bill_table[UTILITY_TYPE_LIST[0]][self.year] + self.electric_opex = annual_bill_table[UTILITY_TYPE_LIST[0]][self.year] self.gas_opex = annual_bill_table[UTILITY_TYPE_LIST[1]][self.year] self.oil_opex = annual_bill_table[UTILITY_TYPE_LIST[2]][self.year] self.water_opex = annual_bill_table[UTILITY_TYPE_LIST[3]][self.year] - self.energy_opex = self.electricity_opex + self.gas_opex + self.oil_opex + self.water_opex + self.energy_opex = self.electric_opex + self.gas_opex + self.oil_opex + self.water_opex self.other_utility = self.revenue * characters['other_utility_percent'] self.non_utility_expense = self.revenue * characters['non_utility_expense_percent'] self.utility_expense = self.energy_opex + self.other_utility @@ -209,8 +209,8 @@ class Income_Statement_Table(): Description: raw_income_input = {2014: {'revenue': 90.0, 'utility_expense': 55.0, 'non_utility_expense': 35.0}, 2015:{},} - annual_bill_table = {'electric: electricity_bill, 'oil': oil_bill, 'gas': gas_bill, 'water': water_bill} - electricity_bill = {2014: 100, 2015:200, ...} + annual_bill_table = {'electric: electric_bill, 'oil': oil_bill, 'gas': gas_bill, 'water': water_bill} + electric_bill = {2014: 100, 2015:200, ...} characters = { 'start_year': (int) 2014, 'end_year': (int) 2016, @@ -331,7 +331,7 @@ class Income_Statement_Table(): 'revenue': current_income_statement.revenue, 'utility_expense': current_income_statement.utility_expense, 'energy_opex': current_income_statement.energy_opex, - 'electricity_opex': current_income_statement.electricity_opex, + 'electric_opex': current_income_statement.electric_opex, 'gas_opex': current_income_statement.gas_opex, 'oil_opex': current_income_statement.oil_opex, 'water_opex': current_income_statement.water_opex, @@ -364,7 +364,7 @@ class Income_Statement_Table(): average_revenue = mean(list(i_s.revenue for i_s in self.hist_table)) annual_bills = { UTILITY_TYPE_LIST[0]: - mean(list(i_s.electricity_opex for i_s in self.hist_table)), + mean(list(i_s.electric_opex for i_s in self.hist_table)), UTILITY_TYPE_LIST[1]: mean(list(i_s.gas_opex for i_s in self.hist_table)), UTILITY_TYPE_LIST[2]: @@ -392,7 +392,7 @@ class Income_Statement_Table(): 'revenue': current_income_statement.revenue, 'utility_expense': current_income_statement.utility_expense, 'energy_opex': current_income_statement.energy_opex, - 'electricity_opex': current_income_statement.electricity_opex, + 'electric_opex': current_income_statement.electric_opex, 'gas_opex': current_income_statement.gas_opex, 'oil_opex': current_income_statement.oil_opex, 'water_opex': current_income_statement.water_opex, @@ -444,7 +444,7 @@ class Income_Statement_Table(): 'revenue': current_income_statement.revenue, 'utility_expense': current_income_statement.utility_expense, 'energy_opex': current_income_statement.energy_opex, - 'electricity_opex': current_income_statement.electricity_opex, + 'electric_opex': current_income_statement.electric_opex, 'gas_opex': current_income_statement.gas_opex, 'oil_opex': current_income_statement.oil_opex, 'water_opex': current_income_statement.water_opex, diff --git a/bpfin/financials/financial_lib.py b/bpfin/financials/financial_lib.py index 67d662de6584abe11d1cbf8bedc62e9ac50a2c32..1b2c2e8f460878ec1be897060fb92b420fdfe636 100644 --- a/bpfin/financials/financial_lib.py +++ b/bpfin/financials/financial_lib.py @@ -68,7 +68,7 @@ IS_Item_List = [ 'revenue', 'utility_expense', 'energy_opex', - 'electricity_opex', + 'electric_opex', 'gas_opex', 'oil_opex', 'water_opex', diff --git a/setup.py b/setup.py index 06f19b4b55f673228f05047566c5383ba65f6d04..94ca14df6f0f0f82f72df9728876e65d17872b38 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ reqs = [str(req.req) for req in install_reqs] setup( name='bpfin', - version='0.2.1', + version='0.2.2', description='Finance models and utilites', author='BlocPower', author_email='admin@blocpower.org',