diff --git a/bin/API_migration_scripts/README-2.md b/bin/API_migration_scripts/README.md similarity index 61% rename from bin/API_migration_scripts/README-2.md rename to bin/API_migration_scripts/README.md index 347c3e238..9b46e2b6a 100644 --- a/bin/API_migration_scripts/README-2.md +++ b/bin/API_migration_scripts/README.md @@ -41,35 +41,48 @@ The above python scripts creates the following CSVs | matching_entries | gets the matching packages | | merged_output | gets the name of the packages, file location, and method name (as a whole) | +#### [Image 1 Below](#image-1-below) + +![CSV_Directory](https://github.com/niccolopaganini/e-mission-phone-nvsr-iter1/blob/16b6ba09b3e6dc37e0927b6ff338400e3236e28b/bin/API_migration_scripts/screenshots/csv%20order.png) + + Everything is executed through a shell script file called ```run_them_py_and_delete_em_csvs.sh``` They are executed in the above order and are created in the same. Although I am creating a bunch of CSVs, in the end, I am just saving ```output.csv```, ```matching_entries.csv```, and ```merged_output.csv``` and the rest are deleted; and ```merged_output.csv``` has the necessary information (More information below). +#### Image 2 Below + +![CSV_Files_Importance](https://github.com/niccolopaganini/e-mission-phone-nvsr-iter1/blob/16b6ba09b3e6dc37e0927b6ff338400e3236e28b/bin/API_migration_scripts/screenshots/CSVs.png) + The process started from a jupyter notebook file ```Changes for script.ipynb``` which can be used for more information (if required) and the ```environment.yml``` holds the necessary dependencies. -The above served as the foundation but is now an outdated method +(The above served as the foundation but is now an outdated method) ## Setup/ How to run ### Setup -1. Navigate to the directory +__1. Navigate to the directory__ ``` .../e-mission-phone/bin/API_Migration_scripts ``` -2. Update the URL in ```classes.py``` & ```links.py```(if required) +**2. Update the URL in ```classes.py``` & ```links.py```(if required)** ``` classes.py -> url = "https://developer.android.com/sdk/api_diff/33/changes/alldiffs_index_changes" #URL from android website - only changes ``` ``` links.py -> links = get_links("https://developer.android.com/sdk/api_diff/33/changes/alldiffs_index_changes") ``` -(refer image_1 for more information if required) +_Link should look something like this:_ +``` +https://developer.android.com/sdk/api_diff/33/changes/alldiffs_index_changes +``` -3. Update locations for ```output.py``` accordingly +**3. Update locations for ```output.py``` accordingly** ``` match_csv_java(".../e-mission-phone/plugins", ".../e-mission-phone/bin/API_Migration_scripts/simplify_classes.csv") - ``` +To be more precise, the first PATH will have to be your ```plugins``` directory and then second will be the PATH to ```simplify_classes.csv```. Techincally speaking, you can add leave it as ```simplify_classes.csv``` as all the files will be in the same directory ([image for reference](#image-1-below)). + __Once the setup process is done, run the following commands:__ The first command allows permissions to run @@ -80,3 +93,19 @@ This command runs the shell script which in turn executes the python scripts ``` bash run_them_py_and_delete_em_csvs.sh ``` +## Expected Output +Excepted Output will be a CSV file (```merged_output.csv```). The file opened in an excel will be in the following format: +``` + | | +``` + +For example: +``` +content | /Users/nvsr/Downloads/e-mission-phone-nvsr-iter1-API_Migration_aid_script_patch-1/plugins/cordova-plugin-file/src/android/FileUtils.java | ../../../../reference/android/companion/CompanionDeviceManager.html#hasNotificationAccess(android.content.ComponentName) +``` +I formatted it in this way because the method has the "full extension" so having the directory location in the middle can allow one to look at the classes on the left for a high level view and can scroll to the right for more information (basically quality of life from my perspective). + +#### _Reasons why I didn't print changes_ +1. The whole process on average took 4 minutes to run. +2. Quality of life - Looks more presentable/ easy to understand +3. Work span can take more time and this will have to be run just once. After that it's just you referring the CSV.