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

Don't load entire file into memory at once #57

Merged
merged 5 commits into from
Jan 18, 2024
Merged

Conversation

scott-8
Copy link
Contributor

@scott-8 scott-8 commented Aug 18, 2023

Additions to this PR:

  • Load files line by line instead of all at once
  • Write files line by line instead of all at once
  • Added newline parameter to the parser to specify how to split the lines
  • Added the ability to write a file to a Path, and added an encoding parameter to go along with this
  • Allow you to specify the newline character when writing a file, instead of fixing it to \n

Behavior that might be breaking

  • Because file objects are read line by line, the clean function acts line by line instead of on the whole file. There is a separate clean function that runs on the first line only

@scott-8 scott-8 marked this pull request as ready for review August 18, 2023 03:45
Copy link
Contributor

@J535D165 J535D165 left a comment

Choose a reason for hiding this comment

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

Very nice improvement!!

rispy/parser.py Show resolved Hide resolved
@J535D165
Copy link
Contributor

I would like to see this PR merged :) I think these additions are very welcome.

@scott-8
Copy link
Contributor Author

scott-8 commented Oct 20, 2023

@shapiromatron

Copy link
Collaborator

@shapiromatron shapiromatron left a comment

Choose a reason for hiding this comment

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

LGTM!

@shapiromatron shapiromatron merged commit 890108f into MrTango:main Jan 18, 2024
5 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.

None yet

3 participants