Skip to content

dyte-submissions/dyte-vit-2022-Anirudh-Mishra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

SDK Dependency Updation Tool

This project contains a python script that extracts mentioned repositories, checks the version of the mentioned dependencies by comparing them with the required versions and provides an option to update the dependencies to the required version if they are dated, thus generating a pull request with the updated dependency versions, automating and making it more convenient for the user.

Exe File Link for the tool - https://drive.google.com/drive/folders/1sV3iI87N9dV5WRtaKPcOimOAyde7g6-w?usp=sharing

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contact

About The Project

This project contains a python script that checks specified repositories for whether the specified dependencies satisfy specified version requirements by crawling the package.json and package-lock.json file. It produces an output file stating the validation of the satisfaction of each repository. Another feature of the project involves updation of the dependencies and creation of a pull request for the same and stating of the pull request link in an output file.

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

In order for the tool to work, it is mandatory that the repositories being worked upon belong to the user or contains the user as a collaborator in order for the tool to function appropriately.

Given below are the libraries/packages required beforehand for smooth functioning of the tool/script along with their install command.

  • npm

    npm install npm@latest -g
  • typer

    pip install typer
  • python-git

    pip install python-git
  • os

    pip install os
  • glob

    pip install glob
  • json

    pip install json
  • requests

    pip install requests
  • subprocess

    pip install subprocess
  • PyGithub

    pip install github

Installation

  1. Clone the repo
    git clone https://github.com/Anirudh-Mishra/dyte-vit-2022-Anirudh-Mishra.git)
  2. Install NPM and python packages as mentioned in prerequisite section
    npm install <package_name>
    pip install <package_name>
  3. Generate a personal github access token by navigating to Setting>Developer Options>Personal Access Tokens.

(back to top)

Usage

  1. Create a CSV file by a custom name <data_file_name> containing two columns namely, the repository name and the repository link. image

  2. Open terminal/cmd on your desktop and navigate to the directory of the cloned project. image

  3. Type the following command if you just want an intimation as to which repositories do not match the requirement of the stated version of a dependency

    python ./index.py <data_file_name>.csv <dependency_name>@<required_version> --no-update

    Or if you have downloaded the index.exe file you may use the command

    index <data_file_name>.csv <dependency_name>@<required_version> --no-update

    image image

    If you want to further create a pull request for updation proceed to further steps.

  4. Type the following command if you want to create a pull request of the updation changes of the stated dependency to required version

    index <data_file_name>.csv <dependency_name>@<required_version> --update

    Or if you have downloaded the index.exe file you may use the command

    index <data_file_name>.csv <dependency_name>@<required_version> --update

    image image

  5. Go to the repositories that you created to check whether a new branch by the name 'updated-branch' has been created in case of inadequate dependency versions to mark the success of required changes.

    image

  6. Go to the pull requests section in the repository. A newly formed pull request denotes success of the procedure and can be merged as and when required! image

    image

(back to top)

Roadmap

  • Crawl through repositories to detect specified dependency versions
  • Write the validity of the dependency versions with respect to the required specified versions to an output file
  • Update the version of the required dependecies in the desired repository clones
  • Create a pull request on a public as well as private repository belonging to the user

(back to top)

Contact

Anirudh Mishra - Anirudh30502 - [email protected]

Project Link: https://github.com/Anirudh-Mishra/dyte-vit-2022-Anirudh-Mishra

(back to top)

About

dyte-vit-2022-Anirudh-Mishra created by GitHub Classroom

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages