Skip to main content

Pair script that manage a pair programming session using git.

Project description

Dev Pair

Python Test PyPI Version Python Version

It's a tool to facilitate the remote 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 to start coding and devpair next to 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 read here to have a context.

Install

pip install devpair

Example of use

This example only show you the commands, feel free to try with your pair :smile:

asciicast

# 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

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.

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 manage all the python versions and dependencies.

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

Publishing

sh ./scripts/tag-new-version.bash v0.0.0

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.8.tar.gz (6.4 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.8-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: devpair-1.1.8.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for devpair-1.1.8.tar.gz
Algorithm Hash digest
SHA256 80bcd7f1776a24f679a257a4df3a3b13d7ff3faefd7313ffbc49993222a48884
MD5 d415ed0499e4ccc4ff1c2eb17fc1e9c5
BLAKE2b-256 ddfdf9659bf0c18980d2de775de4f6c9dc25bfa809ef158c94d0d7bcb3a825a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: devpair-1.1.8-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for devpair-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ce9f8e712e13bf6ceba8e17b6473c2e21ad788c22b725d99bfcfccbe8d48c6cd
MD5 ee96cffe88c1e0171478ae73768c94f8
BLAKE2b-256 51a351243d72ae87352ad2b5ee787780808480013d4f1b264614dc70ed55471a

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