Package: devpair
Dev PairIt's a tool to facilitate the remote pair programming session. Instead of make a lot ofgit add, git commit, git push, git pull, you can make it more quickly only runningdevpair start <timer optional>to start coding anddevpair nextto send the code to another person.Very useful for teams that like to make pair sessions often. If you never was a driver or a navigator feel free to readhereto have a context.Installpip install devpairCommandsdevpair start <time in minutes optional>Start a new session inside the current branch.devpair nextSave everything and send to the next person.devpair doneFinish and put all the work in the original branch.devpair summaryShow a simple resume of commit counts and last developer.devpair cowIt's a cow.devpair timer <time in minutes>Create a simple timer for any purposal.devpair --helpI like to have a help some times.We recommend to create some alias if you want, like:dvsto rundevpair start,dvnto rundevpair nextanddvdto rundevpair done.Example of use# Dev Amain$devpairstart10# Will start the new branch with a 10 minutes timerpair/main$echo"hello">welcome.txt
pair/main$devpairnext# Dev Bmain$devpairstart
pair/main$catwelcome.txt# shows "hello"pair/main$echo" world">>welcome.txt
pair/main$devpairnext# Dev Apair/main$devpairstart
pair/main$catwelcome.txt# shows "hello world"pair/main$echo"!">>welcome.txt
pair/main$devpairdonemain$gitcommit-m"feat: created hello world feature"main$gitpush# Dev Bpair/main$devpairdone# just to come back to the original branchmainHow it works internally?You will work inside a temporary pair branch that in the end all the commits will be squashed to be added to the feature branch.More details!Ok ok! Under the hood thedevpair startwill take your current branch and create a copy with the same name but with the prefixpairAfter make your code changes thedevpair nextwill add, commit and push your code using an internal commit message. This step will be more easier to understand checking theexample step by stepIn the end, we have thedevpair donethat will add, commit, push and delete the branch. Don't worry we will make a squash commit of everything that you did for the current branch.RecommendationsBefore the pair programmingDefine the end of the session. How many time do you want pair?Define the break time.Use atimer, maybedevpairtimer or any other one, the important thing is to keep the pair rotation:devpair start <time in minutes>https://cuckoo.team/https://double-trouble.wielo.co/http://mobtimer.zoeetrope.com/ANY other mobile app, web tool, smartwatch app, pomodoro timer and so on.Thedriverneed to share the screen avoiding to use tools likevscode live share, even they are good it can create some hard moments that you want to show the browser or create a quickly diagram. The preference is that thedriverever need to share the screen.Antipatterns:https://tuple.app/pair-programming-guide/antipatternsContributingFork, create a branch frommainwith the patternfeat/my-featureand make a pull request with your proposal.Local envWe are usingpoetryandpyenvto manage all the python versions and dependencies.# Install all the dependenciesmakesetup# Run all the testsmakeunit# Testing the devpair locallymakelocalPublishingsh./scripts/tag-new-version.bashv0.0.0Illustration by:popsy