Skip to content
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

Add mypy test to CI #180

Merged
merged 6 commits into from
Nov 5, 2020
Merged

Add mypy test to CI #180

merged 6 commits into from
Nov 5, 2020

Conversation

zakajd
Copy link
Collaborator

@zakajd zakajd commented Oct 30, 2020

Closes #160

Proposed Changes

  • mypy.ini with proper config
  • Fix existing errors
  • Add test to CI

I had to add "--allow-redefinition" flag to ignore errors due to re-use of the same variable in the functions multiple times.
PyTorch is currently in progress of adding proper types, but currently there a lot of errors, so I ignore them (see mypy.ini file for details).

@codecov
Copy link

codecov bot commented Nov 3, 2020

Codecov Report

Merging #180 into master will increase coverage by 0.04%.
The diff coverage is 96.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #180      +/-   ##
==========================================
+ Coverage   94.82%   94.87%   +0.04%     
==========================================
  Files          25       25              
  Lines        1699     1696       -3     
==========================================
- Hits         1611     1609       -2     
+ Misses         88       87       -1     
Flag Coverage Δ
unittests 94.87% <96.42%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
piq/gs.py 74.35% <0.00%> (+0.94%) ⬆️
piq/brisque.py 99.03% <100.00%> (-0.01%) ⬇️
piq/fid.py 88.33% <100.00%> (ø)
piq/fsim.py 100.00% <100.00%> (ø)
piq/functional/colour_conversion.py 100.00% <100.00%> (ø)
piq/functional/layers.py 100.00% <100.00%> (ø)
piq/gmsd.py 100.00% <100.00%> (ø)
piq/haarpsi.py 100.00% <100.00%> (ø)
piq/kid.py 88.54% <100.00%> (ø)
piq/msid.py 77.07% <100.00%> (ø)
... and 5 more

@zakajd
Copy link
Collaborator Author

zakajd commented Nov 3, 2020

@snk4tr Ready for review

@zakajd zakajd marked this pull request as ready for review November 3, 2020 19:36
@zakajd zakajd requested a review from snk4tr November 3, 2020 19:36
@zakajd zakajd self-assigned this Nov 3, 2020
piq/brisque.py Outdated Show resolved Hide resolved
piq/fsim.py Outdated Show resolved Hide resolved
piq/fsim.py Outdated Show resolved Hide resolved
piq/functional/colour_conversion.py Outdated Show resolved Hide resolved
piq/functional/layers.py Show resolved Hide resolved
piq/kid.py Show resolved Hide resolved
piq/perceptual.py Show resolved Hide resolved
@snk4tr snk4tr added tests Automatic tests need to be added enhancement Making some part of the codebase better without introduction of new features labels Nov 5, 2020
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 5, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@snk4tr snk4tr merged commit 34a3d4a into master Nov 5, 2020
@snk4tr snk4tr deleted the feature/mypy branch November 5, 2020 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Making some part of the codebase better without introduction of new features tests Automatic tests need to be added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add mypy test to CI
2 participants