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

Eliminated need to write to temporary file in disk #315

Merged
merged 2 commits into from
May 9, 2022

Conversation

mimminou
Copy link
Contributor

@mimminou mimminou commented May 7, 2022

run_propka() in main.py now uses a String.IO() object, a file-like object stored in memory instead of a temporary file in disk.

A StringIO() stream object does not have a .name attribute and propka_input.read_molecule_file() requires a name with a valid ".pdb" extension when passing streams, hence the use of a generic "input.pdb" string as argument.

mimminou added 2 commits May 7, 2022 03:52
run_propka() in main.py now uses StringIO(), making it run entirely in memory and avoiding creating temp file on disk.
replaced temp file in run_propka() with StringIO()
@codecov
Copy link

codecov bot commented May 7, 2022

Codecov Report

Merging #315 (f47407f) into master (ed782e5) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #315      +/-   ##
==========================================
- Coverage   65.40%   65.38%   -0.02%     
==========================================
  Files          30       30              
  Lines        7792     7788       -4     
==========================================
- Hits         5096     5092       -4     
  Misses       2696     2696              
Impacted Files Coverage Δ
pdb2pqr/main.py 80.67% <100.00%> (-0.22%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed782e5...f47407f. Read the comment docs.

@sobolevnrm sobolevnrm merged commit 43f40f9 into Electrostatics:master May 9, 2022
@sobolevnrm
Copy link
Member

Thank you!

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