First project of Knowledge Analysis & Management college course
Python 3
must be installed on your machine- The libraries needed for the program to work are:
AST
(included in Python),Owlready 2
,rdflib
You can download the compressed file from this page and extract it to a folder of your choice, alternatively you can download it directly from a terminal using the following commands:
git clone https://github.com/DavideMammarella/Bad-Smell-Detection.git
Access the application folder:
cd Bad-Smell-Detection/
python3 onto-creator.py
python3 individ-creator.py
python3 bad-smells.py
All the files that will be generated as output will be available in the project folder
- Execution of
Create the Ontology
command will create an ontology namedtree.owl
- Execution of
Populate the Ontology
command will populatetree.owl
, generating a new ontology namedtree2.owl
- Finally, execution of
Find Bad Smells
command will generate a file namedlog.txt
that contains the bad smells metrics
- All ontologies, i.e. files with the extension
.owl
, can be opened with Protegè - It is advisable to open the
log.txt
file with a Latex editor, as it contains bad smell metrics tables in Latex format
All the scripts in the application have been tested.
In order to reproduce the tests, it is necessary to access the application folder with the above command and execute the following command:
py.test