Skip to content

Conversation

@xcorail
Copy link
Contributor

@xcorail xcorail commented Sep 4, 2018

Hi there!

I thought you might be interested in adding these code quality badges to your project. They will indicate a very high code quality to potential users and contributors.
You can also check the alerts discovered by LGTM.

N.B.: I am on the team behind LGTM.com, I'd appreciate your feedback on this initiative, whether you're interested or not, if you find time to drop me a line. Thanks.

@cwhanse
Copy link
Member

cwhanse commented Sep 4, 2018

@wholmgren some interesting bugs found by the LGTM alerts

@wholmgren
Copy link
Member

Looks like it could be useful.

So far as I can tell, a few of the reported errors are incorrect. These include:

  • NotImplementedType errors in singlediode.py are probably hit due to the optional dependency allowance. see here
  • If I correctly understand thepvsystem.py method signature complaint (SingleAxisTracker.get_aoi signature differs from PVSystem.get_aoi signature) then it's not a problem. see here

The imports should be cleaned up, though they are not hurting anything. Same for unused and identically assigned variables.

This forecast.py report is a bug.

We'd probably want to add a .lgtm.yml file similar to metpy

Most importantly we'd want to enable github integration to check pull requests. This is much more interesting to me than badges in the readme.

@mikofski
Copy link
Member

mikofski commented Sep 4, 2018

NotImplementedType errors in singlediode.py are probably hit due to the optional dependency allowance.

Actually, I think it is a bug. I should have used brentq = lambda: NotImplemented so that it's callable because NotImplemented is a constant, and will raise an exception if called:

TypeError: 'NotImplementedType' object is not callable

Or NotImplementedError could also work better because it's a callable.

Sorry, I can send a pr to address it. Shall I open a ticket, or just wait until the SciPy dependency discussion is resolved?

@xcorail
Copy link
Contributor Author

xcorail commented Sep 4, 2018

Hi @cwhanse @wholmgren

Happy of this feedback, and thanks a lot for the detailed report. Allow me to pass it to my python colleagues so that they can check the false positives.

Most importantly we'd want to enable github integration to check pull requests. This is much more interesting to me than badges in the readme.

I cannot agree more. PR integration is indeed the usage we recommend. I think the badges are more interesting for your potential users. Activating PR integration is a one-click operation.

@wholmgren
Copy link
Member

@mikofski thanks for checking! please do put in a quick pr.

@wholmgren
Copy link
Member

wholmgren commented Sep 4, 2018

Added PR integration. Easy to remove if we don't like it.

Edited to add that I've turned off the auto-comment feature. I think the report in the Github integrations box is sufficient.

@wholmgren wholmgren added this to the 0.6.0 milestone Sep 5, 2018
@wholmgren
Copy link
Member

I'll go ahead and merge this and separately add a .lgtm.yml file. Thanks for the push, @xcorail.

@wholmgren wholmgren merged commit 998840b into pvlib:master Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants