Add billable override to nonbillable projects#275
Add billable override to nonbillable projects#275jimmysway wants to merge 1 commit intoCCI-MOC:mainfrom
Conversation
ed13429 to
dde30af
Compare
dde30af to
5336f09
Compare
| billable_override_mask = ( | ||
| merged_data[invoice.NONBILLABLE_IS_BILLABLE_OVERRIDE].fillna(False).eq(True) | ||
| ) |
There was a problem hiding this comment.
Initially, my thought was fillna() should be True, since None means the project was never specified in the nonbillable file, so the default should be the project IS billable. But now I see that there are nonbillable rules independant of the nonbillable file (membership in nonbillable clusters), so I suppose this logically makes sense. The name Override becomes slightly confusing since in the case where NONBILLABLE_IS_BILLABLE_OVERRIDE is not defined, the normal nonbillable rules is the "overriding" factor.
@knikolla @naved001 Would you have any thoughts on this?
I would remove the .fillna(False).eq(True) statements. .eq(True) is redundant, and by default in Python, bool(None) == False. It also clarifies that NONBILLABLE_IS_BILLABLE_OVERRIDE for some projects were simply not set, not that they should be overriden to False
Load optional `is_billable` values from `projects.yaml` into the nonbillable projects dataframe and update tests for the new column. Also switch the default PI input path from `pi.txt` to `pi.yaml`. Closes CCI-MOC#274
5336f09 to
ac65c50
Compare
Load optional
is_billablevalues fromprojects.yamlinto the nonbillable projects dataframe and update tests for the new column. Also switch the default PI input path frompi.txttopi.yaml.Part 1 of #274
First requires CCI-MOC/invoicing-private#89 to be merged