Skip to main content

Pair script that manage a pair programming session using git.

Project description

Dev Pair

Python Test Python Version

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

We are using poetry and pyenv to manager all the python versions and dependencies.

# Install all the dependencies
poetry install
# Set the version of the `.python-version`
pyenv local
# Run all the tests
python -m pytest

Publishing

# Build the project
make build

# Publish the project
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.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devpair-1.1.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file devpair-1.1.2.tar.gz.

File metadata

  • Download URL: devpair-1.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.4 Darwin/21.6.0

File hashes

Hashes for devpair-1.1.2.tar.gz
Algorithm Hash digest
SHA256 2df4327c03e2a43b3c8b53c2172c142830b54e1fc0835001722ec19a64e5a6b9
MD5 257f2e6eb1115f1c25fffbbb8ca50c11
BLAKE2b-256 7cf9fffe504992dcd895a9f8aec6f7ae5dc2fecfe6902655976e6dbdc654613a

See more details on using hashes here.

File details

Details for the file devpair-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: devpair-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.4 Darwin/21.6.0

File hashes

Hashes for devpair-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5a07615b2b12d3d5d6dd2d53153183c6057bb1256b8da4019360d29cfab7577b
MD5 650f9e21c72a8b2cc50f46e0e6e38c45
BLAKE2b-256 739518ae0e820efb6af36bd3237be1437a40ac57525106d09baa23ba4b70c980

See more details on using hashes here.

Supported by

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