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

# 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-0.0.7.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-0.0.7-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: devpair-0.0.7.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-0.0.7.tar.gz
Algorithm Hash digest
SHA256 c75b18aad27a57364e68e6ddd1e5e6d9fd1be490fd13848489b319633ae4a17b
MD5 bcf41968fffdc062e796ba89df674c92
BLAKE2b-256 6f956b5e71da1c75110177401ce8fb7df9e883713e42b0361804aee22909a153

See more details on using hashes here.

File details

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

File metadata

  • Download URL: devpair-0.0.7-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-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9bf750250c3eb6b739bb1457e4e63e550501008f07d4944b12d3bbd634f0a9e1
MD5 a5cb85965dfd0aab44a201e5b4dd57e8
BLAKE2b-256 adf3a32b8b3d68c92aa0dd096961f3425816bbc4aba086e80040319ed4475f2e

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