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

Develop to master - fix overly aggressive date parsing #58

Merged
merged 8 commits into from
Aug 23, 2023
Merged

Conversation

ThrawnCA
Copy link

  • Preserve type guesses when converting to numbers and timestamps, so we don't convert anything that is supposed to be plain text.
  • Check whether values have a day component before attempting to convert to timestamp, because dateutil is too permissive and will accept values that aren't really timestamps.

- Use our guessed types to restrict the behaviour of the numeric/timestamp converter,
so columns that sniff as text won't be incorrectly partially converted to timestamps
- Apply a regex to limit the values that will potentially be parsed as dates.
We aren't interested in anything that doesn't seem to have day, month, or year components.
- Customising the parser requires a lot of boilerplate, and we already have a post-processor to do the job.
[QOLDEV-554] fix overly aggressive timestamp parsing
Copy link
Member

@duttonw duttonw left a comment

Choose a reason for hiding this comment

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

fun times,
tabulator==1.53.5
https://github.com/frictionlessdata/tabulator-py/releases/tag/v1.53.5 (21 Mar 2021)
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
they suggest to replace with:
https://github.com/frictionlessdata/frictionless-py

@ThrawnCA
Copy link
Author

It is now read-only. they suggest to replace with: https://github.com/frictionlessdata/frictionless-py

Yes. I'm hoping that upstream will do something about that.

@ThrawnCA ThrawnCA merged commit 28ee0f4 into master Aug 23, 2023
6 checks passed
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