question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add pipx install github pull request support

See original GitHub issue

How would this feature be useful?

pipx is for end users. end users typically don’t understand how to figure out repo and branch of a pull request

Describe the solution you’d like

pipx install https://github.com/pypa/pipx/pull/794

Describe alternatives you’ve considered

The alternative, the current is to:

  1. open pr
  2. figure out source repo
  3. figure out branch name
  4. build git+https url
  5. pipx install that url

and even advanced users have trouble doing that:

pipx install git+https://github.com/meowmeowmeowcat/pipx@fix-#781

oh, glad I picked that example. some shells may need to deal with escapes, like # for UNIX, ^ for windows

also, once the PR is merged, and the branch deleted the branch name option won’t work, would need to use git hash of the last commit or merge commit.

for initial implementation having support for open PR’s would be already big step forward.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
tonycommented, Mar 14, 2022

Why would an end user want to install from a pull request? This seems like an exceedingly rare use case.

@cs01 This would be incredibly helpful. Here’s an example:

https://github.com/python-poetry/poetry/pull/4852#issue-1066910051

Install with pipx:

pip install pipx
pipx install --suffix=@pyenv 'poetry @ git+https://github.com/finswimmer/poetry.git@proof-of-concept-pyenv'
poetry@pyenv --version

When there’s an bug or improvement, this can be used to get the users in the issue to test the pull request easily.

This saves a ton of effort. gh pr checkout has a similar utility.

I’m stunned this doesn’t already exist. 🤷 I’m fine with doing it manually in the mean time by hand, but when reviewing lots of PRs this would save time.

Edit: NPM / yarn has a convention for this at https://stackoverflow.com/a/36743127/1396928

1reaction
glensccommented, Mar 14, 2022

Update: This usage works:

➜ pipx install --suffix=@pr 'git+https://github.com/Taxel/PlexTraktSync@refs/pull/838/head'
  installed package PlexTraktSync 0.18.0.dev0 (PlexTraktSync@pr), installed using Python 3.10.2
  These apps are now globally available
    - plextraktsync@pr
done! ✨ 🌟 ✨

But projects need to be installable from git branch:

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip: how to install a git pull request - Stack Overflow
1) for this. The following command will install the merged version of pull request 123 for user/repo : pip install git+https://github.
Read more >
Contributing — KOAPY 0.9.0 documentation
If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add...
Read more >
Contributing to Poetry | 1.1 | Documentation
The following is a set of guidelines for contributing to Poetry on GitHub. ... and feel free to propose changes to this document...
Read more >
Chad Smith (@cs01_software) / Twitter
Software engineer at Meta Reality Labs | Creator of pipx, gdbgui, ... I added some unit/e2e tests, and set up a GitHub action...
Read more >
Contributing - PyScaffold 4.3.1 documentation
PyScaffold uses GitHub's fork and pull request workflow for code contributions, ... (after having installed tox with pip install tox or pipx )....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found