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

PY2 & PY3 String/Binary Fixes #203

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

JVickery-TBS
Copy link
Contributor

fix(misc): fixed binary/str types between py2 and py3;

  • Added binary type support and mapping.
  • Added new config option for strict type guessing.
  • Minor fixes for python2 types and classes.
  • Minor fix for failed type guessing.

- Added binary type support and mapping.
- Added new config option for strict type guessing.
- Minor fixes for python2 types and classes.
- Minor fix for failed type guessing.
@@ -210,5 +214,7 @@ def type_guess(rows, types=TYPES, strict=False):
# element in case of a tie
# See: http://stackoverflow.com/a/6783101/214950
guesses_tuples = [(t, guess[t]) for t in types if t in guess]
if not guesses_tuples:
Copy link
Collaborator

Choose a reason for hiding this comment

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

How does this handle files with only a header and no data rows?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ThrawnCA can you add a test for a header only upload please.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@duttonw I can't; the pull request doesn't originate from our repo.

- Added to config declaration description.
@ThrawnCA
Copy link
Collaborator

ThrawnCA commented Feb 9, 2024

@JVickery-TBS Merge conflict needs to be resolved.

@JVickery-TBS
Copy link
Contributor Author

@ThrawnCA fixed conflicts now

@ThrawnCA ThrawnCA merged commit a27b993 into ckan:master Jun 25, 2024
3 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.

3 participants