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

Strip out all special characters from csv headers #915

Closed
wants to merge 11 commits into from

Conversation

orangewolf
Copy link
Member

These cause nothing but pain.

@orangewolf orangewolf added patch-ver for release notes bug-fix labels Feb 8, 2024
@orangewolf orangewolf force-pushed the strippers_and_rob_both_work_late branch from ea238d6 to 1adeff0 Compare February 8, 2024 09:21
def self.read_data(path)
raise StandardError, 'CSV path empty' if path.blank?
options = {
headers: true,
header_converters: ->(h) { h.to_s.strip.to_sym },
header_converters: ->(h) { h.to_s.gsub(/[^\w\d -]+/, '').strip.to_sym },
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want underscore as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

@jeremyf \w includes underscore.

Copy link
Contributor

Choose a reason for hiding this comment

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

Today I (re-)learned!

* main:
  Denormalize Status Message to that Entry Look Up Can Be Fast (#913)
  ⚙️ Adding dry-monads as development dependency
@orangewolf
Copy link
Member Author

closing this one for #918 instead as it is a cleaner PR

@orangewolf orangewolf closed this Feb 9, 2024
@jeremyf jeremyf deleted the strippers_and_rob_both_work_late branch February 9, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants