SafeImport
Layout
| Folder | Description |
|---|---|
src |
Source |
src_dataset |
Source for batch cloning public repositories |
test_src |
Example targets for development |
output |
Webpack-ed dependencies |
dist |
Sliced dependencies |
How to rerun the program
-
Collect the mineable repositories
node src_dataset/index.mjsLook at the code and you can tweak the number of repos that are being used.
They will get copied to
../cache-repos/repos.package.jsonof each of the files are fetched from npm (so that we dont clone the whole repo) and cached in../cache-repos. -
Get a list of candidate repos that can slice.
./script.shIf something goes wrong, add it to the ignore list. This also moves the repos into a
candidates/folder. It will createsuccess.txtwith a list of repos that work with slicing. -
Slice and get test results
Go through
success.txt, and runmaster.shwith each repo../master.sh cov-> Get test coverage and pre-test count./master.sh exec-> Slice and post coverage./master.sh cloc-> Sliced statisticsNote that in some cases, the scripts may attempt to execute tests in the backup node modules folder (
.node_modules). In this case, move it out, and run the tests individually. You can get the commands from the output from the master script (which calls thescript-placer.shscript).