Code refactoring
The code on https://github.com/Mte90/GH-License/blob/master/ghlicense/cmd.py is too long and probably is better to split in various files.
I'll gladly do many changes, with among them (order not important)
- [x] Refactor all strings concatenation to f-strings : not very useful, but quick win for motivation
- [ ] Flake8 and some linting
- [ ] Revamp report creation : instead of creating a file throughout the script, make a main dictionnary that stores information then use a separate function to deal with report file creation
- [ ] Separate the 3 main branch of the command line in 3 different files to differ them
- [ ] Use
progressbarlibrary to replace current workaround : https://github.com/WoLpH/python-progressbar - [ ] Minimal testing cover : don't know how to proceed yet, since it needs dummies GitHub or BitBucket users/organizations to test all possible cases
Thoughts @Mte90 ?
I agree with everything, just about tests we have the ticket https://github.com/Mte90/GH-License/issues/34
If we can simplify and organize it better it will be simpler to add new things and supports for other services.
Reading the code I think that https://github.com/Mte90/GH-License/blob/master/ghlicense/cmd.py#L348
This section will be better if we switch to a switch case or to an array