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

FIX: tdb: Update float parsing regex #144

Merged
merged 3 commits into from Nov 12, 2017

Conversation

Projects
None yet
2 participants
@richardotis
Collaborator

richardotis commented Nov 10, 2017

FIX: tdb: Update float parsing regex to detect floats with no trailing digits. Fixes gh-143.

@bocklund

This will not treat leading 0s (e.g. 00.1 or 01.0) as floats, but instead as just match 0. If you parse the unmatched strings using float('00.1') it is parsed to 0.1 as you would expect and indeed Python seems to ignore leading zeros in numbers.

@richardotis richardotis force-pushed the fix_143 branch from 459ea99 to 39b5963 Nov 12, 2017

@richardotis

This comment has been minimized.

Collaborator

richardotis commented Nov 12, 2017

Useful site for testing: https://regex101.com/

@bocklund bocklund merged commit 7f6e952 into develop Nov 12, 2017

5 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.2%) to 87.882%
Details
@richardotis

This comment has been minimized.

Collaborator

richardotis commented Nov 13, 2017

I think this change caused a 5-10% performance regression in creating Database objects. I'm not sure if it matters that much.

@richardotis

This comment has been minimized.

Collaborator

richardotis commented Nov 13, 2017

Never mind, I'm getting a lot of scatter in my local unit testing. I think we're fine.

richardotis added a commit that referenced this pull request Nov 26, 2017

FIX: tdb: Update float parsing regex (#144)
* FIX: tdb: Update float parsing regex to detect floats with no trailing digits. Fixes gh-143.

* FIX/WIP: tdb: Float parsing regex with lookaround

* WIP: tdb: Simplify negative lookahea for float parsing regex

@richardotis richardotis deleted the fix_143 branch Nov 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment