feat: support export to output path for pull command #36
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 pull request introduces several changes to enhance the functionality of the pull and push operations, as well as refactoring some parts of the codebase. The most significant changes include adding support for specifying an output path for exporting model artifacts, renaming and refactoring the
tar.gofile, and updating the progress bar style.Enhancements to pull and push operations:
cmd/pull.go: Added a new flag--outputto specify the output path for exporting the model artifact and updated therunPullfunction to handle this new configuration. [1] [2]pkg/backend/options.go: Introduced a new optionWithOutputPathto set the output path for the pull operation. [1] [2]pkg/backend/pull.go: Implemented the logic to export the target model artifact to the specified output directory if theoutputPathoption is set. [1] [2]pkg/backend/push.go: Refined thepushIfNotExistfunction to fetch the manifest from the source storage and push it to the destination, ensuring the content is correctly handled. [1] [2]Refactoring and codebase improvements:
pkg/archiver/archiver.go: Renamed frompkg/backend/build/tar.goand refactored theTarFileToStreamfunction toTar. Added a newUntarfunction to handle untarring streams to a destination path. [1] [2]pkg/backend/build/build.go: Updated the import paths and changed the call fromTarFileToStreamtoarchiver.Tar. [1] [2]Progress bar style update:
pkg/backend/progress.go: Modified the progress bar style to use a more consistent and simplified style.