Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated %quickref to show short-hand for %sc and %sx #1215

Closed
wants to merge 1 commit into from
Closed

updated %quickref to show short-hand for %sc and %sx #1215

wants to merge 1 commit into from

Conversation

aculich
Copy link
Contributor

@aculich aculich commented Dec 30, 2011

I updated the %quickref to show the ! and !! short-hand for %sc and %sx to make it more obvious, otherwise people may not realize there is a short-hand unless they look deeper into the documentation.

Also, I edited the original one-line description to be shorter (but hopefully still grammatically correct) so that it will fit properly within 80-column output.

@minrk
Copy link
Member

minrk commented Dec 31, 2011

This appears to only do one of the two things you mention. Missing commit?

@aculich
Copy link
Contributor Author

aculich commented Dec 31, 2011

I looked at the patch and I see the two lines I modified for %sx and
%sc. Which missing thing do you mean?

On Sat, Dec 31, 2011 at 12:23 PM, Min RK
reply@reply.github.com
wrote:

This appears to only do one of the two things you mention.  Missing commit?


Reply to this email directly or view it on GitHub:
#1215 (comment)

@minrk
Copy link
Member

minrk commented Dec 31, 2011

Sorry, I misunderstood the 'Also' part. I should note that since docstrings in quickref are indented eight spaces (not sure why so much), the new longer lines do not actually fit in 80 characters as drawn by %quickref. It's also true (according to the docstring) that %sc has been deprecated, so maybe that should be reflected in the one-line summary, as ! is not shorthand for %sc anymore, rather Shell.system.

@aculich
Copy link
Contributor Author

aculich commented Dec 31, 2011

Yeah, I forgot about the amount of indentation. In any case it sounds like the docs for these commands need to be edited one way or another.

@fperez
Copy link
Member

fperez commented Jan 29, 2012

@minrk, the output isn't manually indented 8 spaces, it's just that %quickref calls %magic -brief, which puts a hard \t before every docstring's first line. We could change that to be just 4 manual spaces instead, that would be easy enough to do (and a good idea).

@aculich, do you think you'll have a chance to finish this one up? Feel free to also make that change in magic_magic from \t to in the output with the-brief flag, if you want. We can then finish review and merge this in.

@fperez
Copy link
Member

fperez commented Apr 16, 2012

@aculich, pinging you here; we're starting to organize the pipeline for the 0.13 release, so we'd like to clear the active PR list. Do you think you'll be able to finish up this particular PR? Just let us know, otherwise someone else on the team might be able to finish it up for you.

@aculich
Copy link
Contributor Author

aculich commented Apr 17, 2012

I'm slammed with work through this week, so I won't have a chance to look at this until next mid-week. If someone wants to look at it before then, that's fine with me. Otherwise I will jump on it then. Thanks for pinging me.

@fperez
Copy link
Member

fperez commented Apr 17, 2012

No worries, there's no rush and we'd rather let you finish the contribution you started; next week is just fine. Thanks again!

@takluyver
Copy link
Member

@aculich : Just checking in to see if you've got time to work on this. If not, let us know, and someone else can pick it up.

@fperez
Copy link
Member

fperez commented Jun 10, 2012

If anyone on the core team has a minute to rebase this and push it through, that would be awesome. It's going stale and eventually the rebase will be too painful to do, I'd rather not lose a good contribution if we can help it...

@minrk
Copy link
Member

minrk commented Jun 10, 2012

If we want %sx as a cell magic for [os|ip].system as discussed in #1855, then I am happy to fold this in there.

@fperez
Copy link
Member

fperez commented Jun 10, 2012

Awesome, Min, thanks!

@aculich
Copy link
Contributor Author

aculich commented Jun 10, 2012

Folding this into Min's pull request is fine with me. I haven't had time to do anything on this and my goal was just to get better documentation and clarity around sx/sc and the bang commands.

@fperez
Copy link
Member

fperez commented Jun 10, 2012

Thanks, @aculich: we just want to make sure your effort and contribution don't go unacknowledged and unused!

@minrk minrk closed this in 630e71d Jun 11, 2012
fperez added a commit that referenced this pull request Jun 13, 2012
Add git-mpr, to merge PR(s) from github just by number(s).

Inspired by git-mrb and test_pr, I thougth it would be usefull to be able to merge PR only by giving their number. Hence `git merge-pull-request`or `git-mpr`.

usage: 
```bash
$ git mpr -h                                                                          ~/ipython/tools
usage: git-mpr [-h] [-l | -a | -m [pr-number [pr-number ...]]]

Merge (one|many) github pull request by their number. If pull request can't be
merge as is, cancel merge, and continue to the next if any.

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            list PR, their number and their mergeability
  -a, --merge-all       try to merge as many PR as possible, one by one
  -m [pr-number [pr-number ...]], --merge [pr-number [pr-number ...]]
                        The pull request numbers
```

examples :
```bash
$ git mpr --list  
* #1758 [√]:  test_pr, fallback on http if git protocol fail, and SSL errors...
* #1755 [√]:  test for pygments before running qt tests
* #1715 [√]:  Fix for #1688, traceback-unicode issue
[...]
* #1493 [√]:  Selenium web tests proof-of-concept
* #1471 [ ]:  simplify IPython.parallel connections and enable Controller Resume
* #1343 [ ]:  Add prototype shutdown button to Notebook dashboard
* #1285 [√]:  Implementation of grepping the input history using several patterns
* #1215 [√]:  updated %quickref to show short-hand for %sc and %sx
```
PR number, mergeability and title
Quite slow, as it does 1 api call by PR, since api does not give mergeability anymore if you ask for the list of all PRs at once.

merge one or more PR (skip the ones with conflict and present a nice list to copy and past to do it by hand) 

```bash
$ git mpr --merge [pr-number [pr-number ...]]]
[...]
*************************************************************************************
the following branch have not been merged automatically, considere doing it by hand :
PR 1630: git pull https://github.com/minrk/ipython.git mergekernel
PR 1343: git pull https://github.com/takluyver/ipython.git notebook-shutdown
PR 1715: git pull https://github.com/jstenar/ipython.git ultratb-pycolorize-unicode
PR 1732: git pull https://github.com/fperez/ipython.git cellmagics
PR 1471: git pull https://github.com/minrk/ipython.git connection
PR 1674: git pull https://github.com/mdboom/ipython.git notebook-carriage-return
*************************************************************************************
```

And last, 
```
git mpr --merge-all
```

That is pretty self explainatory
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Add git-mpr, to merge PR(s) from github just by number(s).

Inspired by git-mrb and test_pr, I thougth it would be usefull to be able to merge PR only by giving their number. Hence `git merge-pull-request`or `git-mpr`.

usage: 
```bash
$ git mpr -h                                                                          ~/ipython/tools
usage: git-mpr [-h] [-l | -a | -m [pr-number [pr-number ...]]]

Merge (one|many) github pull request by their number. If pull request can't be
merge as is, cancel merge, and continue to the next if any.

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            list PR, their number and their mergeability
  -a, --merge-all       try to merge as many PR as possible, one by one
  -m [pr-number [pr-number ...]], --merge [pr-number [pr-number ...]]
                        The pull request numbers
```

examples :
```bash
$ git mpr --list  
* ipython#1758 [√]:  test_pr, fallback on http if git protocol fail, and SSL errors...
* ipython#1755 [√]:  test for pygments before running qt tests
* ipython#1715 [√]:  Fix for ipython#1688, traceback-unicode issue
[...]
* ipython#1493 [√]:  Selenium web tests proof-of-concept
* ipython#1471 [ ]:  simplify IPython.parallel connections and enable Controller Resume
* ipython#1343 [ ]:  Add prototype shutdown button to Notebook dashboard
* ipython#1285 [√]:  Implementation of grepping the input history using several patterns
* ipython#1215 [√]:  updated %quickref to show short-hand for %sc and %sx
```
PR number, mergeability and title
Quite slow, as it does 1 api call by PR, since api does not give mergeability anymore if you ask for the list of all PRs at once.

merge one or more PR (skip the ones with conflict and present a nice list to copy and past to do it by hand) 

```bash
$ git mpr --merge [pr-number [pr-number ...]]]
[...]
*************************************************************************************
the following branch have not been merged automatically, considere doing it by hand :
PR 1630: git pull https://github.com/minrk/ipython.git mergekernel
PR 1343: git pull https://github.com/takluyver/ipython.git notebook-shutdown
PR 1715: git pull https://github.com/jstenar/ipython.git ultratb-pycolorize-unicode
PR 1732: git pull https://github.com/fperez/ipython.git cellmagics
PR 1471: git pull https://github.com/minrk/ipython.git connection
PR 1674: git pull https://github.com/mdboom/ipython.git notebook-carriage-return
*************************************************************************************
```

And last, 
```
git mpr --merge-all
```

That is pretty self explainatory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants