Skip to content

Commit

Permalink
Adding UniqueID as new el3 field
Browse files Browse the repository at this point in the history
  • Loading branch information
tim.reichard committed Jan 13, 2022
1 parent 3795a15 commit 9ac0276
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 37 deletions.
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ History
=======


v0.16.1 (2022-01-13)

* Adding UniqueID as new el3 field, in place of StudentID
* Removed logic for parsing phones numbers and text message opt in.


v0.16.0 (2022-01-11)

* Update ddtrace==0.57.0.
Expand Down
37 changes: 1 addition & 36 deletions aioradio/file_ingestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def __post_init__(self):
}

self.field_to_max_widths = {
"UniqueID": 20,
"StudentID": 50,
"LastName": 64,
"FirstName": 64,
Expand Down Expand Up @@ -136,9 +137,6 @@ def __post_init__(self):
"StudentAthlete": 50,
"CampusLocation": 50,
"Email": 75,
"CellPhoneNumber": 10,
"TextMessageOptIn": 5,
"HomePhone": 10,
"Ethnicity": 1,
"FirstGenFlag": 1,
"EFC": 20,
Expand Down Expand Up @@ -852,9 +850,6 @@ def check_for_prospects(self, row: dict[str, Any]) -> bool:
############################### New EL3 field parsing functions ###############################
###############################################################################################
#
# CELLPHONENUMBER
# TEXTMESSAGEOPTIN
# HOMEPHONE
# ETHNICITY
# FIRSTGENFLAG
# EFC
Expand Down Expand Up @@ -896,24 +891,6 @@ def check_generic_boolean(self, value: str) -> str:

return value

def check_phone_number(self, value: str, field: str, row_idx: int) -> str:
"""Check Cell/Home phone number logic.
Args:
value (str): Cell/Home phone number value
field (str): Column header field value
row_idx (int): Row number in file
Returns:
str: Cell/Home phone number value
"""

if value != '':
value = ''.join(n for n in value if n.isdigit())
value = self.check_width(value, field, row_idx)

return value

def check_ethnicity(self, value: str) -> str:
"""Check Ethnicity is a federal category value.
Expand Down Expand Up @@ -1009,18 +986,6 @@ def check_generic_boolean_efi(self, records: list[str]):
for idx in range(len(records)):
records[idx] = self.check_generic_boolean(records[idx])

def check_phone_number_efi(self, records: list[str], field: str, row_idx: int):
"""Check phone number logic.
Args:
records (list[str]): List of a specific columns values
field (str): Column header field value
row_idx (int): Row number in file
"""

for idx in range(len(records)):
records[idx] = self.check_phone_number(records[idx], field, row_idx + idx)

def check_ethnicity_efi(self, records: list[str]):
"""Check ethnicity logic.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
long_description = fileobj.read()

setup(name='aioradio',
version='0.16.0',
version='0.16.1',
description='Generic asynchronous i/o python utilities for AWS services (SQS, S3, DynamoDB, Secrets Manager), Redis, MSSQL (pyodbc), JIRA and more',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 9ac0276

Please sign in to comment.