Skip to main content

Pair script that manage a pair programming session using git.

Project description

Dev Pair

Python Test

It's a tool to facilitate the pair programming session. Instead of make a lot of git add, git commit, git push, git pull, you can make it more quickly only running devpair start, devpair next.

Very useful for teams that like to make pair sessions often. If you neve was a driver or a navigator feel free to read here to have a context.

Install

pip install devpair

How it works?

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.

Under the hood

Under the hood the devpair start will take your current branch and create a copy with the same name but with the prefix pair

After make your code changes the devpair next will add, commit and push your code using an internal commit message. This step will be more easier to understand checking the example step by step

In the end, we have the devpair done that 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.

Example of use

# Dev A
main $ devpair start
pair/main $ echo "hello" > welcome.txt
pair/main $ devpair next

# Dev B
main $ devpair start
pair/main $ cat welcome.txt # shows "hello"
pair/main $ echo " world" >> welcome.txt
pair/main $ devpair next

# Dev A again
pair/main $ devpair start
pair/main $ cat welcome.txt # shows "hello world"
pair/main $ echo "!" >> welcome.txt
pair/main $ devpair done

main $ git commit -m "feat: created hello world feature"
main $ git push

# Dev B again
pair/main $ devpair done # just to clear the house. 


# Any Dev
pair/main $ devpair summary # print a summary

Last Dev: 
     dev-a@gmail.com  | 2022-11-16 00:40:00
First Dev: 
     dev-a@gmail.com  | 2022-11-15 17:55:19
Frequence: 
     dev-a@gmail.com         | ▇▇ 2
     dev-b@gmail.com         |  1

if you have any doubt

devpair --help

Recommendations

Contributing

Fork, create a branch from main with the pattern feat/my-feature and make a pull request with your proposal.

Local env

# Set the version
pyenv local 3.10.4
# Run all the tests
python -m pytest

# Set the develop
make local-env
# Run the devpair
python -m localdevpair ...

Publishing

# it's using twine $HOME/.pypirc [testpypi]
make publish-test

# it's using twine $HOME/.pypirc [pypi]
make publish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devpair-1.1.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

devpair-1.1.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page