-
Notifications
You must be signed in to change notification settings - Fork 218
Download multiple packages trough the CLI and refactor #59
Download multiple packages trough the CLI and refactor #59
Conversation
First of all, thank you @fernandocollova for the contribution! I will give you some feedback, just my own opinions, so you may disagree 😉. The commits are a bit messy: 2 WIP and 3 initial commits, this way is really hard to review the actual changes. You provided an extensive explanation of the changes in the pull request, so I guess you're excused this time, but in the future please consider squashing the commits when the pull request is ready for review, otherwise it will be hard to provide precise feedback.
Good point. Maybe we can still keep the single filename in case of a single download (as now) and raise an error if
The paramters were passed that way only because it was easier to unit test that code. If you modify the tests accordingly to keep the test coverage, I'm fine with the change.
Ok, I agree, with this change it's redundant.
Single auth for N packages is perfectly fine as long as N is not a big number. With N < 10 there shouldn't be any problems (to be tested though).
As the name suggests, those are the private credentials that I use during development and are excluded from git. If that file exists, then it is used instead of
For the web part, you don't need to specify the packages to download from the CLI. I would use a different subpackage for this: I will provide more feedback as a code review, but I haven't tried to run the code yet. |
Hey, just passing by to say that I haven't forgot about this 😅 but I had a lot of work this week. I'll try to work on this tomorrow or some time next week |
Hey, I finally have some time for this, and below I'll answer your points:
Yeh, I guess fair enough. I'm not big on having pretty commit streams, but I can do better for next time.
Regarding the folder name, I much rather leave the single
Sure, as I said, I haven't had the time to go over the tests yet, but I will fix every test that needs fixing.
If that's what you want, I guess I'll leave it as it is, but can I at least implement that behaibour in the cli tool too? Just for consistency.
Yes, that I understand, but you might want to provide the download output folder for example. Or tagging. Re thinking about this, maybe I can do something class based for argparse, to share many base arguments between the two modules, and then add some specific ones on the cli case. That's all, thanks for your comments, and I'll probably start working on the tests this week while we finish resolving the rest of the discussed features. Regards, Fernando |
Let's keep it simple and do like you suggested in the first message (
Yes, sure, good idea.
I guess it could be a nice improvement 👍. |
Hello again, So, I was finally able to find some time to work on this. I think I addressed all of the points we talked about, but I'm having some problems with the tests. More precisely, there are some category related tests that are failing, that I'm not sure why they are failing, and I'm not sure they are related to my changes at all. Are those working on your end? Also, please notice that I had to change the mock count on And, finally, I took the liberty the arg you asked me to rename to Regards, Fernando |
Hi @fernandocollova, thanks for the updates! I will need some time to review everything, and since now the command line arguments are a little bit different I will also need to create a new release and make sure the README and the docker image are updated. I'll let you know as soon as this PR will be merged, thanks again! |
No problem! Also, as a follow up on the tests thing, I did the obvious today, and ran the tests from the master branch of this repo, and I can report that some of them are failing when I run them with my account, and three of them are the categories ones I talked about. The other two I think were failing on my end too, and i fixed them, but I don't remember for sure. Anyway, this is the list of tests failing for me:
Regards, Fernando |
Hi @fernandocollova, finally I had some time to look at this. I confirm that some tests were failing on my end too on the master branch, but everything should be fixed now. I also made some changes to styling and documentation, but everything seems to work great 👍. I still need to update a few files and then I will push everything to master, sorry for the delay. |
Hi,
Following up on #58, here is some code that, among other changes, enables the download of multiple packages trough the CLI.
This is not the final PR I wish to merge, but I'd like to get some early feedback before I focus on fixing the tests and the docs.
There are a number of things to note about this code:
Path.cwd() / Downloads
and the tagging continues to be the same.download.py
is gone. I'm happy to bring it back, but it seemed redundant now that you can call the downloader as an executable module withpython3 -m playstoredownloader.cli
Also, I did the async changes that I wanted here in case you are curious. As you can see, in the diff from the async to the regular one there are not a lot of changes, its just a matter of changing some calls to
requests
toaiohttp
Also, regarding the web part, I was looking into adding it to the CLI, but I noticed two things worth discussing:
private_credentials.json
which I don't know how you would like to handle--web
switch while passing packages to download doesn't make much sense. I'm inclined to just document it in the help and be done with it, saying that--web
ignores packages to download, but I'd like your opinion.That's all, hope you find this changes useful, and I look forward for some feedback about them :)
Regards, Fernando
Type of change
Additional context
Checklist