-
Notifications
You must be signed in to change notification settings - Fork 7
Assorted fixes #9
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
base: master
Are you sure you want to change the base?
Conversation
0c01791 to
a4bd5a3
Compare
|
Let me know what parts you like me to split up in different PRs. |
48f8f54 to
c607e19
Compare
|
@ruuk There are two additional things I would like you to review specifically:
|
|
a curiosity question, i have seen that in all the projects you keep wrong the commas on the descriptions of the methods, why do you insert them all wrong? |
|
cc @mediaminister I always appreciate your input 😉 |
| @@ -1,135 +1,162 @@ | |||
| # -*- coding: utf-8 -*- | |||
| # GNU Lesser General Public License v2.1 (see COPYING or https://www.gnu.org/licenses/gpl-2.1.txt) | |||
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.
this not follow SPDX convention
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.
Comments in code do not use SPDX. SPDX identifiers are used for computer-processed fields not for human-processed information (license one-liners are intended for humans).
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 don't understand what you mean, but this does not follow the SPDX directives at all, if you do a test with various check software will not be approved.
You can see how to do in netflix repo,
even licenses should not be written with links, but placed in the folder LICENSES,
otherwise it is useless to follow the SPDX directives...
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.
Make a new PR for your change if you like. I am not interested to take it this far.
The license is in LICENSE.txt, I don't see the point of an additional LICENSES/ directory if we have a single license anyway. (The license is 5x larger than the library, so having the license in the source tree twice is unneeded and unwanted IMO).
Again, conventions are nice, up to a point and then they become pedantic 😄
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.
it is addon checker, devs want to go in this way...
agree that this project is big like a flea
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.
AFAIK this was only related to addon.xml, not code comments in your source files.
Why is using ''' wrong? There is no convention that places one before the other. In Python I tend to use single quotes unless double quotes are required. I prefer single quotes because they are easier to read (less fluffy) then double quotes. |
|
so understand, i prefer to use the correct ones otherwise PEP8 and pycharm complains... |
|
I added GitHub CI support and removed Travis CI support. The unit tests now integrate better with GitHub and the output will look like this from the Actions tab at the top: It would be really nice if we can have the fixes and unit testing added. |
Because I started writing Python before one style was decided to be the 'right' style, and only recently started caring 😄. |
ruuk
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.
Sorry for the long, long delay in reviewing this. Changes look good, I'll merge after a rebase.
This PR includes: - Fix SPDX to LGPL-2.1-or-later - Switch to using unicode_literals for Python 2 - Add _to_unicode() function - Replace RECEIVER global with static variable - Replace getAddonInfo() call with _addon_id() using static variable - Remove unused CallHandler.data And also cosmetic/testing improvements: - Add docstrings to all methods and functions - Remove disabled import-error and missing-docstring pylint tests - A codecov.yml file for code coverage - Add coverage support to Travis config - Small fixes to setup.py and tox config - Allow PYTHON to be set for Makefile - Unit test fix - Use snake_case for internal functions (no impact)
This reduces the overhead of using AddonSignals at import time (as is most impacting on slower devices like Raspberry Pi). On Kodi all imports are performed at startup or at every invocation, even when not used.
This PR includes: - Fix a bug in the return signal name - Improve callback integration tests - Ensure receiver and sender use different SignalReceiver instances
This commit includes: - Add .gitattributes to get a proper ZIP pakage - Remove Travis CI - Add a GitHub CI workflow for unit testing, codecov and SonarCloud - Add a GitHub CI workflow for kodi-addon-checker - Move add-on icon to resources/
|
Ok, I noticed a new release without any tests and then found this PR still in the queue :-( Rebasing this is real hell, because I lack the context 10 months later and I have to dig into what has changed since. So it takes a lot more effort than it could have been. Please next time, if a big PR is in the queue, do not merge anything else before this has been sorted out. |
|
The current code is failing, where it used to work before: |
81c9f7e to
4f56683
Compare
4f56683 to
23ba50c
Compare
|
Ok, the new code returns This is what it will look like in this project when merged: https://github.com/dagwieers/script.module.addon.signals/actions |
|
I just added a GitHub CI release workflow. If you add |
now remember, yes the OSError raised is right behaviour |
681acc1 to
1b7fef1
Compare
|
if you prefeer you can add a new custom exception for interrupted event but is not really necessary |
Sure, but OSError seems to be a strange exception to be used for that. A custom exception, or maybe one from Kodi would make more sense IMO. A few months ago this was not handled, and did not raise an OSError. |
The release workflow helps pushing releases to the Kodi repositories. Also add support starting from Gotham
|
if you want i think you can still add a custom exception |
1b7fef1 to
6a9cb6f
Compare
|
@CastagnaIT Sure, but I would leave that up to the person who wrote that ;-) |
|
The coverage is no longer 99%, this is something to fix later IMO |
This PR includes:
Switch to using unicode_literals for Python 2And also cosmetic/testing improvements:
See Travis for test results:
https://travis-ci.org/dagwieers/script.module.addon.signals
And Codecov for coverage results (we have 99% testing coverage!):
https://codecov.io/gh/dagwieers/script.module.addon.signals/branch/assorted-fixes/commits