Skip to content
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

Include mapping between csv headers and the fields used in app #347

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

RosieH1
Copy link
Contributor

@RosieH1 RosieH1 commented Jul 8, 2024

We have a mapping, so if the headers of the cost centre csv are changed, we only have to update them in the csv_updater script, and not in other places in the codebase.

The file uploaded to S3 now only contains the fields used by this app, instead of everything in the source csv.

Copy link
Contributor

@heathd heathd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not ideal that the required headers are duplicated in the validation function but it's ok, this isn't a super complicated piece of code.

We could probably avoid that by refactoring to put the validation and mapping logic in the same class, but I don't want to create lots of re-work so let's get this merged

@heathd heathd merged commit a671e6c into main Jul 8, 2024
1 check passed
@heathd heathd deleted the eng-397-csv-updater-improvements branch July 8, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants