Your friendly neighborhood Dependabot clone . Just without the annoying mails and notifications :) Yeah also light weight :-). To get started just type dependatroll --help
export GITHUB_AUTH_TOKEN
="AUTH_TOKEN"
export GITHUB_USERNAME
="USERNAME"
In the First Version of the script ie app.py We have shallow Cloned all the repositories from the CSV file . This is the first version of the script even though it is complete and working . It is not the most optimal way out there as it required extra bandwidth to clone all the repositories. And then use the bash/zsh shell of the host machine to run the script. This was not only time and space intensive but also needed to have certain dependencies like git and github CLI to be installed on the host machine . Which is not the case for most of the people.
- Parse the CLI ARGS
- Raw Content Fetched Using Curl
- For Updates the Repositories Forked Using gh cli
- Then the forked repositories were cloned to a depth == 1 and moved to the folder for JSON File
- Then the corresponding Dependency changes were made and added to List
- Table made using tabulate
- This version had un-necessary dependencies and was not the most optimal way out there
In the second version of the script ie appv2.py We have not cloned any of the repositories completely . Only fetched the package.json file . This method is much more efficient and less bandwidth intensive. As it does not pull the entire repository. As in some cases the repositories would be very large . Thus eliminating the network overhead of cloning the repository.Could save both time and money .
It is for the same reason of performance that I have not used libraries such as pandas for csv manipulation as the storage overhead might overway the cost .
- Parse the CLI ARGS
- Json file fetched Using PyGithub GetContent allowing us to fetch only one file
- Made changes in package.json
- Tabulate the changes using tabulate
- Forking the repository achieved by PyGithub
- Creating a new Branch For every Dependancy Update
- Creating Pull Request and Fetching URL for that Request to Append to the Table
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Clone the project
git clone https://github.com/dyte-submissions/dyte-vit-2022-NimeshJohari02
Go to the project directory
cd dyte-vit-2022-NimeshJohari02/
Install dependencies
pip install -r requirements.txt
To make executable use
chmod +x DependaTroll
# To check for unmet dependencies use the following command
DependaTroll -i Dataset.csv axios@0.24.012 node@16.2 react@16.6 ejs@12.1
#Add any number of Libraries and Versions Seperated by " " and Versions by "@"
# To check for updation of the unmet dependencies use the following command
DependaTroll -u true -i Dataset.csv axios@0.24.012 node@16.2 react@16.6 ejs@12.1
#Add any number of Libraries and Versions Seperated by " " and Versions by "@"
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
Nimesh Kumar Johari - @github - nimeshjohari95@gmail.com
Project Link: https://github.com/dyte-submissions/dyte-vit-2022-NimeshJohari02