-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implemented processors for removing nonbillables and validating billable PIs #108
Conversation
bac60f7
to
0a88aba
Compare
0a88aba
to
fd68927
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that you're not removing those rows from the dataframe where credits are applying, we do need to ignore non billable projects when applying credits, otherwise a PIs credits may be used from a project that is not billable.
|
||
|
||
@dataclass | ||
class RemoveNonbillablesProcessor(processor.Processor): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name is now incorrect. Since there's not a lot happening here, I would suggest moving the logic of this processor inside of the validate billable pi processor.
Apologies. I see that you're doing this in the Billable invoice, since that hasn't be refactored yet. Disregard this comment. |
fd68927
to
85ad7f7
Compare
85ad7f7
to
c9db8d0
Compare
Added |
e3455e9
to
4621b09
Compare
…le PIs Two new fields, which are used internally by the scripts and never exported, have been added: - IS_BILLABLE_FIELD: Boolean field for whether the project is billable - MISSING_PI_FIELD: Boolean field that is True if PI name field is empty
4621b09
to
32ec283
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since nonbillables are not being removed from the dataframe now, are the processing steps where we are applying credits ignoring those nonbillable rows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. I see it now. Looks good to me!
Yes, at the end of this set of refactorings we want to
- Processors to operate on the same DataFrame (without doing
.copy
) - Invoices to filter out and shape the output how they want, without reassigning
self.data
.
Closes #104. Dependant on #100 and #99. The processing steps of removing nonbillables and validating billables in the Billable Invoice has been moved into
Processor
subclasses.@knikolla @naved001 Because future processing steps (applying discounts, etc) assume that the invoice has gone through validation processing, this PR will be blocking other refactoring issues, namely #101 and #102.