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

Fix to container.upload()'s behavior to match its doc #48

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

JOUNAIDSoufiane
Copy link
Contributor

container.upload() previously only packaged the contents of a directory to a tar archive and passes it as a byte stream to zun. This change is to make sure that container.upload() adds the specified source file or specified source directory to the tar archive as originally intended by its design.

Copy link
Contributor

@msherman64 msherman64 left a comment

Choose a reason for hiding this comment

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

So, I think this makes sense, but I'm not completely clear on the "before/after"

Could you add a quick example of how the invocation (from the user side) changes?
Tests would also be nice, but that seems like too big a lift to add to python-chi at the moment?

@Mark-Powers
Copy link
Contributor

Regarding tests, yes I think we might need to set up a full proper test suite when rewriting python-chi.

container.upload() previously only uploaded the contents of a specified directory path to the container.
It now uploads the file or directory pointed to by the specified path.
Example before: container.upload(test.png) would not upload the file as
it would need a directory path.
Example before: container.upload(test/) would upload the contents of
the test directory
Example after: container.upload(test.png) uploads the file test.png and
container.upload(test/) uploads the entire test directory
@JOUNAIDSoufiane JOUNAIDSoufiane merged commit 2b9d23a into master Feb 13, 2024
1 check 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.

3 participants