-
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
Ben Admin Kit #18
Ben Admin Kit #18
Conversation
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.
Thanks for being one of our early contributors as we're still ironing out the process. 😅 This repo is public-facing, so this is going to be a very detailed review since 1) third party developers will need to be able to read it and make sense of it and 2) once merged, it's hard to change. Thanks for bearing with us!
To start, I have a couple of high level comments:
- Please draft a kit specification here: https://rippling.atlassian.net/wiki/spaces/ID/pages/3703538906/Kit+Specifications. This spec should give us a clear breakdown of capabilities, what is provided by the kit, and what we require from a third party.
- Can we rename this to be benefits admin to avoid jargon-y sounding names?
- Left some comments inline, but in general please prefer existing data types from the
flux_core
package instead of creating your own. Definitely open to chat if you there's a reason they're not suitable. - Also looks like in some cases you're defining some types that might want to get pushed down into
flux_core
. - A lint check is failing...you can run
./run_ruff --fix
in the top level directory to auto-fix where possible. It will also tell you where there are any lint violations that it wouldn't auto-fix.
flux_sdk/ben_admin/capabilities/process_deduction_data/interface.py
Outdated
Show resolved
Hide resolved
flux_sdk/ben_admin/capabilities/process_deduction_data/interface.py
Outdated
Show resolved
Hide resolved
flux_sdk/ben_admin/capabilities/process_deduction_data/interface.py
Outdated
Show resolved
Hide resolved
flux_sdk/ben_admin/capabilities/process_deduction_data/data_models.py
Outdated
Show resolved
Hide resolved
flux_sdk/ben_admin/capabilities/report_employee_data/data_models.py
Outdated
Show resolved
Hide resolved
flux_sdk/ben_admin/capabilities/report_employee_data/data_models.py
Outdated
Show resolved
Hide resolved
flux_sdk/ben_admin/capabilities/report_employee_data/data_models.py
Outdated
Show resolved
Hide resolved
class EmploymentType(Enum): | ||
CONTRACTOR = 1 | ||
SALARIED_FT = 2 | ||
SALARIED_PT = 3 | ||
HOURLY_FT = 4 | ||
HOURLY_PT = 5 | ||
TEMP = 6 | ||
|
||
|
||
class MonetaryValue: | ||
value: float | ||
currency_type: str | ||
|
||
|
||
class PayFrequency(Enum): | ||
WEEKLY = 1 | ||
BI_WEEKLY = 2 | ||
MONTHLY = 3 | ||
SEMI_MONTHLY = 4 | ||
|
||
class PayTimeUnit(Enum): | ||
HOUR = 1 | ||
DAY = 2 | ||
WEEK = 3 | ||
MONTH = 4 | ||
YEAR = 5 | ||
PAY_PERIOD = 6 | ||
|
||
|
||
class Pay: | ||
frequency: PayFrequency | ||
frequency_effective_date: datetime | ||
time_unit: PayTimeUnit | ||
value_per_unit: MonetaryValue | ||
value_effective_date: datetime | ||
|
||
class EmploymentHours: | ||
type: EmploymentType | ||
effectiveDate: datetime | ||
hours_per_week: Optional[int] | ||
|
||
class Employment: | ||
hours: EmploymentHours | ||
is_rehire: bool | ||
termination_date: Optional[datetime] | ||
start_date: datetime | ||
original_hire_date: datetime | ||
w2_start_date: datetime | ||
pay: Pay |
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.
I imagine that much of this can be moved into flux core. What are your thoughts @Kingpin007 @vguptarippling ?
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.
I agree, alot of this feels easily re-usable. The Employement
object conflicts with Employee
a bit as they have some overlappigng data.
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.
If there is additional information in Employment
I would recommend you extend Employee
and add it to flux-core
flux_sdk/ben_admin/capabilities/report_employee_data/interface.py
Outdated
Show resolved
Hide resolved
flux_sdk/ben_admin/capabilities/report_employee_data/interface.py
Outdated
Show resolved
Hide resolved
@stevevls Happy to help iron out the kinks :)
|
3f60b25
to
d925f71
Compare
flux_sdk/benefits_administration/capabilities/process_employees_deductions/interface.py
Outdated
Show resolved
Hide resolved
...its_administration/capabilities/report_employees_personal_and_employment_data/data_models.py
Outdated
Show resolved
Hide resolved
abb8777
to
8763977
Compare
|
||
|
||
class BenefitsEligibility(Enum): | ||
# this will expand to cover cobra later |
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.
Thx for this comment...I was looking at this and wondering why it wasn't a bool
. 😁
...its_administration/capabilities/report_employees_personal_and_employment_data/data_models.py
Outdated
Show resolved
Hide resolved
...efits_administration/capabilities/report_employees_personal_and_employment_data/interface.py
Outdated
Show resolved
Hide resolved
...efits_administration/capabilities/report_employees_personal_and_employment_data/interface.py
Outdated
Show resolved
Hide resolved
This is a fair point. If you think it makes sense to create a specialized set of classes for your kit, that's totally fine. They would just need to be named differently than the core types so that the name indicates their purpose. I feel like re-using the name
I think it was merged to |
I've gone ahead and updated the name on mine and used the model from core for part of it so we achieve some consistency. I am duplicating a few of the fields from the |
dee5378
to
241cf8c
Compare
@bryanbierce I just merged in latest main because we've added lint and test actions in GH that are now required statuses to merge. Looks like we have some linting failures to take care of. The mypy status check isn't required yet b/c some errors got merged down to main, but please make sure that we don't introduce any new issues as we plan to make it required ASAP. Thanks! |
ea24554
to
f5a349e
Compare
f5a349e
to
6ea26a6
Compare
172fd74
to
a713cb5
Compare
flux_sdk/benefits_administration/capabilities/process_employees_deductions/data_models.py
Outdated
Show resolved
Hide resolved
...its_administration/capabilities/report_employees_personal_and_employment_data/data_models.py
Outdated
Show resolved
Hide resolved
* Add deduction models for Ben Admin * fixes
c9cb2d5
to
0fd6d99
Compare
class EmploymentHours: | ||
type: EmploymentType | ||
type_effective_date: datetime | ||
hours_per_week: int | None | ||
hours_effective_date: datetime | ||
|
||
|
||
class Employment: | ||
hours: EmploymentHours | ||
pay: Pay | ||
is_rehire: bool | ||
termination_date: datetime | None | ||
termination_type: TerminationType | None | ||
start_date: datetime | ||
original_hire_date: datetime | ||
w2_start_date: datetime |
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.
@bryanbierce What are the fields do you need that are not part of Employee ?
I see that hours_per_week
and hours_effective_date
are the only fields ? Can they go inside Employee data type ? cc: @stevevls @Kingpin007 @ujjwalshukla
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.
type_effective_date
, hours_per_week
, hours_effective_date
, termination_type
and the pay
object are not on Employee
currently. I had asked the team if I could extend Employee
with these originally and the answer from @Kingpin007 and @ujjwalshukla was no. Happy to move them around if you all would rather co-locate these now. This Employment
object only existed because the team originally did not want any of the new data in flux_core
so I took the opportunity to duplicate some fields and make the objects a bit more sensible to work with.
https://rippling.atlassian.net/browse/BENEEX-84
This diff scaffolds out the kit API for the Ben Admin kit. This kit will be used to integrate with 3rd party benefit administration providers who require payroll and other demographic data about EE's managed in Rippling in order to provide insurance and other benefits