-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
small fixes to LOCCounter. Added files needed to make this a package …
…on pypi
- Loading branch information
Showing
12 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
MIT License | ||
Copyright (c) 2018 YOUR NAME | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# python-loc-counter | ||
|
||
This python-loc-counter module was built to count various LOC metrics: | ||
- source_loc | ||
- single_comment_loc | ||
- single_docstring_loc | ||
- double_docstring_loc | ||
- total_comments_loc | ||
- blank_loc | ||
- total_line_count | ||
|
||
### Installation | ||
This package only uses the standard libaries. Pip install instuctions coming... | ||
|
||
```sh | ||
$ cd test | ||
``` | ||
|
||
### Development | ||
See a feature or found a bug? Feel free to make suggestions or (better yet) contributions for future iterations! | ||
|
||
### Example Projects | ||
- Originally this module was built for: https://github.com/bcdasilv/code-style-mining/tree/python_analysis. |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from python_loc_counter.LOCCounter import LOCCounter |
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[metadata] | ||
description-file = README.md |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from distutils.core import setup | ||
setup( | ||
name = 'python_loc_counter', | ||
packages = ['python_loc_counter'], | ||
version = '0.1', | ||
license='MIT', | ||
description = 'Get LOC metrics for python scripts', | ||
author = 'Bryce Vonilten', | ||
author_email = '[email protected]', | ||
url = 'https://github.com/BryceV/python_loc_counter', | ||
download_url = '', | ||
keywords = ['python', 'lines of code', 'loc'], | ||
install_requires=[ ], | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', # Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package | ||
'Intended Audience :: Developers', | ||
'Topic :: Software Development :: Build Tools', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python :: 3.7', | ||
], | ||
) |
Empty file.
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from python_loc_counter import LOCCounter | ||
|
||
def main(): | ||
file = "./tests/randomFile.txt" | ||
counter = LOCCounter(file) | ||
|
||
print(counter.getLOC()) | ||
print(counter.getSourceLOC()) | ||
print(counter.getSingleCommentsLOC()) | ||
print(counter.getSingleDocstringLOC()) | ||
print(counter.getDoubleDocstringLOC()) | ||
print(counter.getTotalCommentsLOC()) | ||
print(counter.getBlankLinesLOC()) | ||
print(counter.getTotalLineCountLOC()) | ||
|
||
main() |