Skip to content

Fix style #97

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

Merged
merged 8 commits into from
Jan 22, 2019
Merged

Fix style #97

merged 8 commits into from
Jan 22, 2019

Conversation

ikmckenz
Copy link
Contributor

This is a very large pull request, but it doesn't actually change any functionality. It simply brings the style of the code to a semi-uniform and almost-pep8 compliant state.

Before this pull request the code base gets a score of -1.07/10 from pylint, and after we get up to 5.90/10.

The major things changed are white space (only spaces, instead of the potentially dangerous mix of tabs and spaces that was used before), and now there are no semicolons after statements. I don't have hardware to test against (yet) but it would be good to test this before merging to ensure that the functionality that was working is still working, and the functionality that was broken is still broken.

@codecov-io
Copy link

codecov-io commented Oct 18, 2018

Codecov Report

Merging #97 into master will increase coverage by 0.11%.
The diff coverage is 26.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
+ Coverage   37.35%   37.46%   +0.11%     
==========================================
  Files           9        9              
  Lines        1585     1588       +3     
==========================================
+ Hits          592      595       +3     
  Misses        993      993
Impacted Files Coverage Δ
openbci/utils/ssdp.py 31.11% <0%> (ø) ⬆️
openbci/utils/parse.py 87.97% <100%> (ø) ⬆️
openbci/cyton.py 47.5% <45.2%> (+0.13%) ⬆️
openbci/wifi.py 20.84% <6.25%> (+0.17%) ⬆️
openbci/utils/utilities.py 77.41% <64.28%> (ø) ⬆️
openbci/ganglion.py 13.86% <8.45%> (+0.19%) ⬆️

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 a59353b...e4fda3f. Read the comment docs.

@ikmckenz
Copy link
Contributor Author

ikmckenz commented Oct 18, 2018

Looks like codecov is upset that there are not many tests covering my changes and is thus giving me the red X. I'll make it my next project to add more tests.

I think we should hold off on merging this until test coverage is higher than it is.

@ikmckenz
Copy link
Contributor Author

This should be ready to merge if everyone else is happy with it. I am happy to answer any questions to help with reviewing this change.

@ikmckenz
Copy link
Contributor Author

ikmckenz commented Dec 3, 2018

Hey @andrewjaykeller , what are your thoughts on this pull request? Love it? Hate it?

@andrewjaykeller
Copy link

I love the idea, where you able to test it?

@ikmckenz
Copy link
Contributor Author

ikmckenz commented Dec 3, 2018

I love the idea, where you able to test it?

@andrewjaykeller Yep! I actually made this branch before adding all the new testing to the Cyton code, and this new testing confirmed that no functionality is changed by accident, and all of the changes are stylistic.

Primarily shorter line lengths and convert all print statements to print functions. Also enforce print functions by importing from __future__.
@ikmckenz
Copy link
Contributor Author

I added some more changes that I originally was saving for another pull request. This includes enforcing print functions (rather than statements) using from __future__ import print_function and changing the existing print statements around. This resolves #56.

The pylint score is now up to 6.88/10 on this branch.

@daniellasry
Copy link
Contributor

hey @ikmckenz , is this still ready to merge?
I tested it locally with a cyton board and it seems to work. The codecov still looks upset, but i'm not entirely sure what it's upset about.

Thanks!

@ikmckenz
Copy link
Contributor Author

ikmckenz commented Jan 22, 2019

Hey @daniellasry , I fixed the merge conflicts and it is ready to merge again. Codecov is upset because the diff coverage is less than the overall coverage. I think this is still okay to merge because:

  1. This only changes code style, not functionality.
  2. I actually wrote the Cyton testing code (Improve Cyton testing #100) to ensure that 1 was true, and the tests show no changes between master and this branch.

@daniellasry daniellasry merged commit f2288eb into openbci-archive:master Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants