-
Notifications
You must be signed in to change notification settings - Fork 354
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
added zip function in textbase cli tool #102
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @jahanvir, thanks for contributing to textbase! Now, there are a few issues with your code:
|
…ain.py or requirements.txt is not present. Added --path flag to take the path of both the files from user.
Hi @sammyCofactory, I got your point.
|
@jahanvir, took a look at your updated code. While you have added the Do ask if you have any doubts. |
Hi @sammyCofactory, so in this case there would be no need to show error. User would be sharing the correct path. And both main.py and requirements.txt in one folder only. |
Well, we should still have an error message. What if the user shares the wrong path? Yes, the user has to give a path to a folder where he has both the files. If he doesn't, the default fallback will be to the current folder. |
Okay, @sammyCofactory Just to confirm user will enter the path of directory not the complete path of main.py or requirements.txt right ?? so suppose the case is
User will enter folder1/folder2 and then check needs to be run for
|
Yes, exactly! Also, when the files are to be zipped up, zip all the contents of the folder path which the user gave, i.e., zip all the contents of |
…d requirements.txt is in path and compress everything from directory into deploy.zip
@sammyCofactory Okay cool I have made changes so that it will
|
@jahanvir, there is one small thing I observed while testing out your code. There is a |
@sammyCofactory yeah that's happening when directory path is root directory as newly created deploy.zip will be in the same directory too. I have added the condition in loop to avoid that!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went through your changes and tested out your code. LGTM!
This is an extension of previous pull request
#97
Scope
create zip file of bot using textbase CLI tool
Example:
poetry run python textbase/textbase_cli.py compress
textbase-client compress
[Sub task]
Screenshots
Developer checklist