-
Notifications
You must be signed in to change notification settings - Fork 2
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
Code migration texas #102
base: main
Are you sure you want to change the base?
Code migration texas #102
Conversation
src/utils/transform/Form.py
Outdated
|
||
|
||
class ExpenseForm(Form): | ||
def __init__(self, column_mapper=None): |
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 would need different 'read_table' for some states. To deal with this, you can make state specific subclasses. This class should be considered the most common/standard Expense form.
Make sure you add a docstring to the class that describes that
src/utils/transform/Form.py
Outdated
pass | ||
|
||
def map_columns(self) -> None: | ||
"""Map and filter columns of the DataFrame""" |
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.
add a bit more explanation to this
self.table = None | ||
|
||
@abc.abstractmethod | ||
def read_table(self, paths: list[str]) -> pd.DataFrame: |
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.
google style docstring, describe 'paths'
src/utils/transform/Form.py
Outdated
def __init__(self, column_mapper=None): | ||
required_columns = [ | ||
"DONOR_ID", | ||
"RECIPIENT", |
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.
RECIPIENT_ID
Created Form subclasses for normalized and semi-normalized form tables
No description provided.