-
Notifications
You must be signed in to change notification settings - Fork 2
Bug fixes and improvements #1
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
Conversation
• Support added for file names that are URL-encoded (including those with options appended)
|
I can submit a new PR if you'd like. |
|
Thanks for the PR! I'll take a look tomorrow. In the meantime, can you explain a bit on what things didn't work before? Either edited in the PR description above, or a new issue?
How familiar are you with git? You should be able to just commit to the main branch of your fork where you did this work to update this PR. |
|
Why don't I submit a bug report for the two things that were changed. As for Git, I'm somewhat proficient but I'm not hugely familiar with how Github handles things. I'll try pushing an update to my repo and see if it propagates here. |
evetion
left a comment
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.
I'm not sure about the change to the monitoring. You have added a lot of warnings about variable naming/aliasing, and pass the path, but you don't need it in the function (only for logging). So the main change is to use the layer_id, but that is not passed by the signal, and still cached from the code above it. The signal only passes the path I guess, and that might set it to both arguments?
I'm also not sure what didn't work in the old code, did the layers not update in some cases?
Let me know if you want me to work on the PR.
|
I'll be submitting a second bug report shortly regarding the changes to to callback function. In a nutshell it's a workaround for what appears to be a Python bug (likely system-dependent). |
|
All of the changes that we've been discussing plus the fix for #4 have been implemented and pushed to Github. For installing the callback I used my implementation (a lambda); as this is your project though it's ultimately your decision as to which method to use for this. Currently I'm passively testing the code (it's being triggered every minute or so) and I haven't seen any issues so far. |
• Improved comments • Changed callback function name since a method with the same name also exists (this has no effect on the code's function)
|
The most recent push (14ec5f8) covers everything that we've been discussing. This code has been tested for the past 24 hours with multiple file-backed layers being watched and no issues have been seen. In my opinion this code should be ready to be merged. |
|
Thanks for the finding the bugs, reporting and fixing them! I will make some minor changes and make a release this weekend. |
¡De nada! And thank you for writing such a useful plugin!
There's always something missed: lines 66 and 67 aren't needed and can be deleted (that's the |
|
I've removed some lines, ran an autoformatter, added a test and some more in 1577f35. Most impactful, I've shortened a check you did for re-adding the watch at 1577f35#diff-859e6c5392dbec182d14bd578888ecdd0c6c29b9007f5abce8d7654f541b2418R356. Can you confirm it still works as it should? edit: See, it was good to check, I think I inverted the condition there. |
I read through the diff and saw a few things, mostly minor (stylistic), one or two that might be issues. I'll pull the code and test it then annotate the aforementioned diff. |
|
How are you running |
|
Great, thanks for testing! I'll make a release tomorrow. |
|
There are a few suggested changes in the comments I made.
|
|
I was right, |
This patch does the following:
The code is reasonably-well documented, let me know if you have any questions.