1210 Add compressed file methods#1221
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1221 +/- ##
===========================================
- Coverage 65.86% 65.84% -0.02%
===========================================
Files 86 86
Lines 8873 8868 -5
===========================================
- Hits 5844 5839 -5
Misses 3029 3029 |
|
Looks simple and good! 😄 Once this is merged, I suggest opening the first pre-release. |
|
This does not really close #1210 yet. The same issue exists in |
|
Awesome! As soon as that is merged, I'll update the changelog, publish a pre-release and create an announcement-issue. |
Co-authored-by: Felix Divo <4403130+felixdivo@users.noreply.github.com> Rename method to decompress Add protection against memory error
I'm not sure we need to explicitly read/write with multiple dots -- just that only the last suffix is used as a key to select a message reader/writer. I added a suffix with multiple dots to |
|
|
Yeah, maybe. One could also easily add zip/... support too. For now, I think it is okay as is since it only requires three lines. |
GzipASCReader and GzipASCWriter can be deleted, right? |
Yes, they can be removed. |
|
@zariiii9003 Do you agree on merging this? |
I'll review it after work. |
|
Ahh, one thing: The linter complains. Seems like this is unrelated though, so we can do this in a subsequent PR. I'll open an issue for this. |
zariiii9003
left a comment
There was a problem hiding this comment.
Well done! The docstring could be a little more precise though.
@felixdivo I do not agree with the typehints here but i will follow up with another PR that takes care of the IO type annotations in general. There are some inconsistencies that are masked by casting.
Co-authored-by: zariiii9003 <52598363+zariiii9003@users.noreply.github.com>
Co-authored-by: zariiii9003 <52598363+zariiii9003@users.noreply.github.com>
Co-authored-by: zariiii9003 <52598363+zariiii9003@users.noreply.github.com>
I'm interested to see the solution regarding type hints! I don't have much experience with |
This closes #1210 by adding
LogReader.decompress/Logger.compressmethods.Changes:
addio/gz.pyaddGzipReaderclassaddGzipReadertoLogReadermessage readersLogReaderto check for last suffix onlyLogReaderdocstringdecompressmethod toLogReaderLoggerto check for last suffix onlyLoggerdocstringcompressmethod toLoggertest_extension_matchingGzipASCReader/GzipASCWriterand subsequent unittests