Refactoring of lib.fileio.auto_open function to work with subprocess (#266)#267
Merged
agalitsyna merged 15 commits intoopen2c:masterfrom Jun 19, 2025
Merged
Refactoring of lib.fileio.auto_open function to work with subprocess (#266)#267agalitsyna merged 15 commits intoopen2c:masterfrom
agalitsyna merged 15 commits intoopen2c:masterfrom
Conversation
removing the global definition of loggers to satisfy latest flake8 update
agalitsyna
requested changes
Apr 21, 2025
agalitsyna
requested changes
May 26, 2025
Member
agalitsyna
left a comment
There was a problem hiding this comment.
Comments from 26 May 2025 Open2C meeting. @golobor @agalitsyna @Phlya
Phlya
reviewed
May 26, 2025
…ngs example tested and vis improved.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
…ces updated, OSF download instead of obscure file name.
agalitsyna
approved these changes
Jun 19, 2025
Member
agalitsyna
left a comment
There was a problem hiding this comment.
Checked backwards compatibility on (1) sample distiller-nf, (2) tests, (3) example notebooks.
agalitsyna
approved these changes
Jun 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduced the CommandFormatter interface, encapsulating file operations and validations.
Added standard CLI response outputs to enhance user interaction.
MODES_TO_FILES_PRESET: format keys with values as lists of possible operation modes (read, write, append).
COMMANDS: format and mode keys with values as dictionaries containing:
tool: the tool's presence is verified in the system.
command: a command formatted for substituting the number of available processors (nproc).
This structure streamlines adding new formats without altering existing code.
Added capabilities for handling binary files.
This feature is not currently utilized but provides flexibility for future enhancements.
Transitioned to using subprocess for file operations, improving compatibility and performance.
P.S. The function signatures and responses of auto_open remain unchanged, ensuring backward compatibility. However, the implementation using the CommandFormatter class offers a more convenient and versatile approach, enhancing code maintainability and scalability.