feat: Add shef in file export, update shef command#196
Open
Conversation
Convert shefcritimport and shefinimport to use a 'shef' command group with 'import_crit' and 'import_infile' subcommands. Move implementation files to cwmscli/commands/shef/ directory: - cwmscli/commands/shef_critfile_import.py → cwmscli/commands/shef/import_critfile.py - cwmscli/commands/shef_infile_import.py → cwmscli/commands/shef/import_infile.py This aligns with the existing blob/clob command structure for better organization. Usage changes: cwms-cli shefcritimport → cwms-cli shef import_crit cwms-cli shefinimport → cwms-cli shef import_infile
Enovotny
requested changes
Apr 9, 2026
| # --------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| def _build_parser() -> argparse.ArgumentParser: |
Collaborator
There was a problem hiding this comment.
don't think any of this is needed. arguments should be handled by click.
| return p | ||
|
|
||
|
|
||
| def main(argv: Optional[list] = None) -> int: |
Collaborator
There was a problem hiding this comment.
none of this is likely needed either since the cwms-cli is calling import_shef_infile which skips all of this.
| "Default: silently update the existing group." | ||
| ), | ||
| ) | ||
| p.add_argument( |
Collaborator
There was a problem hiding this comment.
might want to add dry run option to the import_shef_infile.
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.
This adds an importer for ".in" files that were read into exportShef.py and refactors the crit file import so both commands live under
cwms-cli shef. I was able to test the.infile but don't have a good example for.critimport. That needs testing. Also, I'm guessing there is documentation I need to update? Not sure how that works.