Fix github-linguist statistics#547
Merged
adam-urbanczyk merged 2 commits intoCadQuery:masterfrom Dec 15, 2020
Merged
Conversation
Tell git that the test/testdata/ files and Jupyter Notebooks are binary files, ie. do not display diffs and do not touch line endings in those files.
Now github-linguist will classify it as documentation, and the massive line count in that file will stop skewing the language statistics for CadQuery on Github.
Member
Author
|
If anyone is interested, here are the files github-linguist considers when calculating CQ's language statistics: |
Codecov Report
@@ Coverage Diff @@
## master #547 +/- ##
=======================================
Coverage 94.18% 94.18%
=======================================
Files 29 29
Lines 6208 6208
Branches 663 663
=======================================
Hits 5847 5847
Misses 224 224
Partials 137 137 Continue to review full report at Codecov.
|
Member
|
@marcus7070 Thanks! @adam-urbanczyk I think this is good to merge, do you agree? |
Member
|
Yes, thanks @marcus7070 - merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CQ's current language statistics:

These changes will make it look like:

See my fork to see it in action.
The problem was a single Jupyter Notebook, github-linguist naively counts every line of code in that 5MB file. Moving it to the examples directory means github-linguist now classes it as documentation (not core code) and ignores it.
I also added a
.gitattributes, which tells git to treattests/testdata/*and*.ipynbas un-diff-able and not to change the line endings on those files. Doesn't fix any issue in particular, just seems like good practise.