drive-cli
drive-cli copied to clipboard
add error handling
At several places only ideal cases have been considered. Need error handling at all the required places
- [ ] help
- [ ] login
- [ ] view-files
- [ ] clone
- [ ] add_remote
- [ ] cat
- [ ] rm
- [ ] ls
- [ ] status
- [ ] pull
- [ ] push
Note: Each section will be up for grab separately and so will be score for filling the allotted section, so claim a particular section only.
I would like to work on this issue
@shikhag2018 Sure. Go Ahead
How to get started with it.
@shikhag2018
- You can use
try except
for error and exception handling. Read more - Use appropriate error / exception messages
@shikhag2018 start with adding error handling for few functions where you feel there is a need of. We'll also let you know if we find other such places where you could do that in the mean time.
how to run the code of drive-cli and know what exceptions are raised or i have to manually read the code and think where execeptions can be raised.
Hi shikhag2018, I think manually reading the code can be tedious. It is better to try out things with an approach of finding a bug by giving buggy inputs and then handle the case. If it is pretty understandable by reading to include exception handling then you should. You can directly use drive-cli (npm install drive-cli) and test if you find bugs or follow the steps given (development mode) in the readme. Have you done that?
yes i have done the setup in both development and usage mode and i m using pip for python.
Sorry i wrote npm install drive-cli in flow. There is only python package. In "drive-cli/drive_cli" there is a file dcli.py which holds all the functions and utilities. In that file initially there are utility functions and from line 489 there are actual functions written for drive cli command line options. So try using different options on command line and understand the flow of execution. Once you understand that you can start testing with buggy inputs to find errors. If you have any difficulties feel free to ask :)
PTAL #29
I have added error handling for the first two functions namely login and drive data. I also feel that a list of functions can be maintained with this issue here to which we can add error handling, as there are many people to contribute to and there are many places to add the error handling. Something like this https://github.com/kubernetes/kubernetes/issues/68026 Where every contributor contributes to a particular package similarly here every contributor can contribute to specific functions. This would be helpful in welcoming multiple contributors on board, a speedy update and independent merging of the branches.
Agreed @Avni-Sharma , I have create checklist and we can start with separate contributions for each individual functionality.
I would like to work on cat command!
sure @udit-001 go ahead
@nurdtechie98 Done, please review!
Can I work on log command, I noticed it requires error handling as well but it isn't mentioned in this thread? @inishchith