dswah / pyGAM

[HELP REQUESTED] Generalized Additive Models in Python
https://pygam.readthedocs.io
Apache License 2.0
862 stars 159 forks source link

Run pylint as a required check in Travis CI #248

Open tetraptych opened 5 years ago

tetraptych commented 5 years ago

This commit adds pylint as a required check for the Travis CI build to be successful. It also addresses some of the easy-to-fix recommendations found by pylint.

For now, pylint will only fail on error types E and F:

  There are 5 kind of message types :
  * (C) convention, for programming standard violation
  * (R) refactor, for bad code smell
  * (W) warning, for python specific problems
  * (E) error, for much probably bugs in the code
  * (F) fatal, if an error occurred which prevented pylint from doing
  further processing.
codecov[bot] commented 5 years ago

Codecov Report

Merging #248 into master will decrease coverage by 2.08%. The diff coverage is 82.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
- Coverage    95.2%   93.12%   -2.09%     
==========================================
  Files          22       11      -11     
  Lines        3170     2138    -1032     
==========================================
- Hits         3018     1991    -1027     
+ Misses        152      147       -5
Impacted Files Coverage Δ
pygam/distributions.py 88.4% <100%> (ø) :arrow_up:
pygam/links.py 92.45% <100%> (ø) :arrow_up:
pygam/callbacks.py 95.16% <100%> (ø) :arrow_up:
pygam/terms.py 94.21% <69.69%> (ø) :arrow_up:
pygam/penalties.py 93.42% <76.92%> (+0.08%) :arrow_up:
pygam/utils.py 87.73% <77.77%> (ø) :arrow_up:
pygam/core.py 90.62% <87.5%> (ø) :arrow_up:
pygam/pygam.py 94.77% <88.57%> (-0.13%) :arrow_down:
pygam/datasets/load_datasets.py 97.16% <93.75%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a767fd9...eb27bbc. Read the comment docs.

dswah commented 5 years ago

@tetraptych this is great! thanks a lot!

However, we have recently changed the license to Apache 2.0 to allow proprietary use of the library, which means downstream users would NOT need to release the source-code of their application when they use pyGAM.

The previous GPLv3 license is quite strict, and the hope is that a more passive license will encourage (proprietary) contributors to keep improving this library.

Please let me know if you are ok with this change. Thanks, Danny

Current License: Apache 2.0 (tldr: any use and modifications are allowed, with any license, with or without release source-code. all modifications must be explicitly stated.)

Old license for reference: GPLv3 (tldr: any modifications and downstream applications must be made open-source and released with the same license)

tetraptych commented 5 years ago

Thanks for this great library!

The license change makes complete sense to me, as I'm sure there are many people who would want to use pygam for projects that are not open-source. (Full disclosure: I am one of these people.)

I'm happy to contribute in either case. Is there a specific timeline for the license change?

tetraptych commented 5 years ago

With respect to this PR, I removed the /test/ directory from code coverage (as these lines were guaranteed to run). Unfortunately, this reduces the overall coverage of the project, causing codecov to fail. I'm hopeful that there's a way to merge despite the decrease in coverage, since the new percentage is a more accurate reflection of what proportion of lines in the core library are being run during the test suite.

dswah commented 5 years ago

@tetraptych Great. The license was just updated a few days ago!

WRT the decrease in coverage: That makes total sense. This will not affect our desire to merge your contribution.

I want to pull your changes locally on my computer at home and take a look at how it works!