EagleVision
Project description
EagleVision
Tool to identify and report
-
Extract the source code to dataframe
-
Pattern checking
-
Similarity checking
-
Cyclomatic complexity checking
-
Repository statistics like, Type of file, LOC, Comments, Code etc.
Dependencies
-
python 3.8 : 64 bit
-
python packages (functiondefextractor, similarity-processor, lizard)
-
cloc package
npm i -g cloc@2.6.0
https://www.npmjs.com/package/cloc
-
third party packages [Ctags, grep]
Installation
Requirements are added in requirement.txt file
Python 3.8
python:
install python for the respective OS at https://www.python.org/downloads/
Make sure to update the path variable to point to the python installation folder.
pip: (only if pip is not present by default)
get get-pip.py from below link to your folder https://bootstrap.pypa.io/get-pip.py
Open a command prompt and navigate to the folder containing get-pip.py
. Run the
following command:
cloc:
- cloc package
npm i -g cloc@2.6.0
https://www.npmjs.com/package/cloc
EagleVision:
pip install EagleVision
Other tools
Ctags: "https://en.wikipedia.org/wiki/Ctags"
- Windows:
1.Download Ctags from "http://ctags.sourceforge.net/"
2.Select the right package(based on OS & architecture) and
extract the zip file to a folder
3.Update the system 'path' environment variable with the path to ctags executable
- Linux:
apt-get install ctags
- OS X:
brew install ctags
grep
1.Download grep "binaries and Dependencies"
from http://gnuwin32.sourceforge.net/packages/grep.htm
2.Extract the content to a folder
3.Copy and paste contents from \bin
folder of Dependencies
to \bin
folder of Binaries
4.Update the system 'path'
environment variable with the path to "grep" executable
Usage
Commandline
>>>python -m eaglevision --p "path\to\input\json"
- sample json input,
[
{
"path": "repo/path",
"run_pattern_match":true,
"run_similarity":true,
"extraction_annotation": null,
"extraction_delta": null,
"extraction_exclude": "*/test_resource/*",
"pattern_match": ["assert"],
"pattern_seperator": ["("],
"similarity_range": "70,100",
"run_cloc_metric":true,
"cloc_args": "--exclude-dir=src --exclude-ext=*.cpp,*.java",
"run_cyclomatic_complexity":true,
"cyclo_args": "-l java -l python",
"cyclo_exclude": ["*.cpp","*.java"],
"report_folder": null
}
]
Note:
All the inputs are taken from the json file
-
Do not forget to have the json as list
[...]
-
Make sure
pattern_match
andpattern_seperator
is of same length list if you are not interested in anypattern_seperator
for s specificpattern_match
, mark itnull
inpattern_seperator
-
Make sure mark it
null
if a string or list parameter is not used -
Make sure mark it
true/false
for bool type
refer https://www.npmjs.com/package/cloc for cloc args
refer https://pypi.org/project/lizard/ for cyclo args
refer https://pypi.org/project/functiondefextractor/ for extraction_exclude
refer https://pypi.org/project/similarity-processor/ for similarity
Output
- Output will be available in same folder as
path
given in json underEagleVisionReport
Contact
Brijesh Krishnan brijesh.krishnank@philips.com
License
The MIT License (MIT) Copyright © [2019] Koninklijke Philips N.V,
https://www.philips.com
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for EagleVision-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baeb4d2628ddd991fa212c0dd93a1f29800ead2b58619ae2f6abebabfcb5fb89 |
|
MD5 | 6b7c860ad424914b33d68848e39d2f3c |
|
BLAKE2b-256 | e284e24adbf84416560d46969b5fac74dcb4049f6b8e0aa8101fc07e471c7ae4 |