Skip to content

Conversation

@satyamtg
Copy link
Contributor

@satyamtg satyamtg commented Mar 26, 2020

This makes the fix_ogvjs_dist.py more generic by adding functionality as mentioned in issue #1 .
@rgaudin @kelson42 please suggest changes/improvements.

Fixes #1

@rgaudin
Copy link
Member

rgaudin commented Mar 26, 2020

Thanks. Please fix the codefactor and ask for a request when you're ready

@satyamtg
Copy link
Contributor Author

Hey @rgaudin , have fixed it. Should work now. Please have a look.

@rgaudin rgaudin self-requested a review April 2, 2020 16:39
Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

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

thanks for your PR but unfortunately it's not acceptable:

  • it's not working! str.replace() does not replace in place.
  • you did not respect the code formatting (black). I'm not sure why the tests didn't run on github but should they have they would have told you that. Should you have launched the tests locally, you would have know also.
  • don't exit on error with a useless message. Raise with an informative message and let it crash.
  • gen_extra_jumps() is too verbose for what it does. should be simplified.
  • in get_directory_count_and_string() use already imported pathlib and .parts instead of your comprehension loop
  • in same function, the map is absolutely useless. What is even the point of that directory_string variable?

Please, don't submit PR for code that you haven't run and tested. I've probably spent more time reviewing your PR than you did to write it… and the issue is not fixed yet. That's counter-productive.

Also, when submitting a PR, use the Request feature to request a review. That way we get a notification and know you're done working on your PR.

@satyamtg
Copy link
Contributor Author

satyamtg commented Apr 2, 2020

Did a quick fix and ran all tests. I am not going to propose even a single line of untested code. It works now and I've tried to keep the code as short as possible. Also, I did wanted to Request for review previously but I cannot assign any reviewer (GitHub won't let me for this repo). I can only re-request.

@satyamtg satyamtg requested a review from rgaudin April 2, 2020 21:37
Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

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

Great work, thanks for fixing it all 👍

@rgaudin rgaudin merged commit c3ffb47 into openzim:master Apr 3, 2020
@satyamtg satyamtg deleted the more_generic_ogvjs branch April 3, 2020 10:38
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.

make fix_ogvjs_dist more generic

2 participants