Closed rosafilgueira closed 3 years ago
Although I like very much the idea of checking if the service is mentioned in the readme. The current implementation it is not working as it should. For example, continuing with the "face classification" example, now we have:
However, I couldnt find a mention of the ../src/web/faces.py in the README.
In the case of services, the current implementation to check if a service is mentioned in the readme is the following one:
mentioned_in_readme": elem["file"]["fileNameBase"] in readme
And if we print the value of elem["file"]["fileNameBase"] , for this particular case, we get the following:
soft_info {'type': 'service', 'run': 'python /Users/rosafilgueira/HW-Work/Research/CodeSearch/test_repos/face_classification/src/web/faces.py', 'has_structure': 'main', 'mentioned_in_readme': True} - elem["file"]["fileNameBase"]: faces
And in this case, elem["file"]["fileNameBase"] has the value 'faces'. And 'faces' is found in the readme file. But that does not mean that the ../src/web/faces.py has been mentioned in the readme,
I have updated the code, so it also checks the mention of the file, not only taking into account the fileNameBase, as well, as the extension (e.g. faces.py).
mentioned_in_readme": elem["file"]["fileNameBase"]+"."+elem["file"]["extension"] in readme
Note that for the scripts with main, it already the implementation had into account the complete name of the file (fileNameBase + Extension) - so I havent modified the code there.
But I did had to modify the code also for "script without main ... with body"
@rosafilgueira, sorry, but I do not understand if the issue is addressed or not.
This issue has been addressed.
The repository face classification has a collection of scripts and a web service, but looking into the repo. The code_inspector extract all this information. See bellow:
For our future heuristic, in which we will implement the type classification taking into "has_strucure" (for script and services), this will be an interesting case - if we have services and scripts, both with main ..... something to think about.