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

Changed file opens to binary mode for to_csv calls. #547

Closed
wants to merge 3 commits into from

Conversation

terazus
Copy link
Collaborator

@terazus terazus commented Mar 1, 2024

No description provided.

Copy link
Member

@proccaserra proccaserra left a comment

Choose a reason for hiding this comment

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

this breaks 28 tests. using "wb" in the open() call means 'encoding' argument shouldn't be passed but the culprit is actually line 58 in dump/core.py

fp.write('ONTOLOGY SOURCE REFERENCE\n') if using the 'wb' option

The last changes were initially tested and created on Windows, but had errors on GitHub. I fixed those errors, but didn't retest on Windows. This has been tested on both and is problem free.
Fixed parts of the code that needed to be changed to work with bytes. There are no more errors in testing.
@coveralls
Copy link

Coverage Status

coverage: 81.299%. remained the same
when pulling 0f7b791 on ptth222:windows-to_csv-fix
into e5f6fd2 on ISA-tools:issue-511.

@terazus
Copy link
Collaborator Author

terazus commented Mar 11, 2024

this breaks 28 tests. using "wb" in the open() call means 'encoding' argument shouldn't be passed but the culprit is actually line 58 in dump/core.py

fp.write('ONTOLOGY SOURCE REFERENCE\n') if using the 'wb' option

Can we confirm this has been fixed for merging ?

@ptth222
Copy link

ptth222 commented Mar 11, 2024

I changed lines like those to fp.write(b'ONTOLOGY SOURCE REFERENCE\n'). The 'b' at the beginning of the string makes it binary. You can see that line is one of the ones changed if you look at the files changed.

@ptth222 ptth222 deleted the windows-to_csv-fix branch March 20, 2024 22:27
@proccaserra
Copy link
Member

fixed with d7aa027

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.

4 participants