Skip to content

document change for ipython embedding global namespace - #10891

Merged
takluyver merged 6 commits into
ipython:masterfrom
oldclesleycode:master
Mar 29, 2018
Merged

takluyver merged 6 commits into
ipython:masterfrom
oldclesleycode:master

Conversation

@oldclesleycode

Copy link
Copy Markdown

No description provided.

@oldclesleycode

Copy link
Copy Markdown
Author

#5887

@jzf2101

jzf2101 commented Nov 10, 2017 •

Copy link
Copy Markdown
Contributor

This looks good to me. @Carreau @minrk could either of you review? I don't have ownership rights.

@Carreau Carreau changed the title document change for ipython membedding global namespace document change for ipython embedding global namespace Nov 10, 2017

@minrk minrk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Comment thread docs/source/interactive/reference.rst Outdated
operate with your variables, analyze them, etc. For example, if you run the
following code snippet:

``` python

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this syntax works in restructuredtext. To make a code block, use a double colon and indent it:

following code snippet::

     import IPython

     a = 42
     IPython.embed()

(If you've already tried building the docs and the markdown-style code blocks work, that's fine, of course)

@Carreau

Carreau commented Nov 11, 2017

Copy link
Copy Markdown
Member

Thanks for the PR @lesley2958, and you are right the documentation was inaccurate; we appreciate the time you took to write that up with example !

As @takluyver pointed out this document is not in markdown but RST. Markdown is great for small self contained document but RST give us way more flexibility, so you should use :: followed by 3 or 4 space indent for example.

I fixed that for you and pushed a new commit on your branch, and now that's look good. We'll let you some time to look at the changes we made to your branch, and if all is clear we can get that in to have this brand new documentation to our end users.

I also realize that the email you use for your git commit does not match the email you use with GitHub and might be an email autogenerated from your username/host name. This means that you may not get due credit in the GitHub UI for your contribution. Do you want guidance to fix this; or is it ok as is ?

@jzf2101

jzf2101 commented Nov 11, 2017 •

Copy link
Copy Markdown
Contributor

@Carreau @takluyver thanks for noticing the RST syntax issue, it slipped my notice

@Carreau

Carreau commented Nov 11, 2017

Copy link
Copy Markdown
Member

@Carreau @takluyver thanks for noticing the RST syntax issue, it slipped my notice

We should get travis to build the docs to check all is right.

@jzf2101

jzf2101 commented Nov 11, 2017

Copy link
Copy Markdown
Contributor

Great idea

Comment thread docs/source/interactive/reference.rst Outdated

Running a file with the above code can lead to the following session::

>>> IPython.embed()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this say do() rather than IPython.embed()?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! fixed, thanks!

Comment thread docs/source/interactive/reference.rst Outdated
print(a)

Now if call the function and complete the state changes as we did above, the
value `42` will be returned. Again, this is because it's not in the global

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: the value is printed - there's no return statement.

@takluyver

Copy link
Copy Markdown
Member

A couple more comments inline, but I think this mostly looks good.

@takluyver

Copy link
Copy Markdown
Member

Ping @lesley2958 there's a couple of comments remaining to be addressed, if you've got a moment to come back to this.

@oldclesleycode

Copy link
Copy Markdown
Author

@Carreau hmm, not sure what you mean about the email!

new pull request is submitted though -- sorry about the lateness, got caught up with midterms, projects, and finals

@Carreau

Carreau commented Jan 3, 2018

Copy link
Copy Markdown
Member

@Carreau hmm, not sure what you mean about the email!

No worries, sorry to be unclear, if you issue a git log you will see the following (redacted in case you decide later to make your email private):

commit 1688a5e57d01fc290615d32f24cba8c78dd5bf11 (HEAD, origin/pr/10891)
Author: Lesley Cordero <{username}@Lesleys-MacBook-Pro.local>
Date:   Sun Dec 24 13:28:37 2017 -0500

    changed return to print and fixed example code

...

As you can see your email is set to <{username}@Lesleys-MacBook-Pro.local> while your profile says {username}@columbia.edu

This also lead in the GitHub UI to "Anonymous" commits:
screen shot 2018-01-03 at 11 40 21

If you had setup git with your actual email you signed in with github it would show as follow:
screen shot 2018-01-03 at 11 41 22

Correctly crediting you as the author.

Usually on your Machine you want to follow these instructions to correctly attach your name and email to commits.

Once this is done we can show you how to "fix" your already existing commits so that they appear as yours.

This is not important for us, but if you want your open-source contributions to be more visible for your professional career, it may be something to consider setting.

new pull request is submitted though -- sorry about the lateness, got caught up with midterms, projects, and finals

No need to apologies for the delay, we're all busy and this is good work. As a small note, we tend to not merge master branch into feature branch to get a more linear history. So this PR may need a rebase. We can do it for you if you are still unfamiliar with advance git techniques, or can guide you through doing it.

@oldclesleycode

Copy link
Copy Markdown
Author

@Carreau thanks so much! I went through the instructions so I can go ahead and fix the already existing commits!

@Carreau

Carreau commented Jan 5, 2018 via email

Copy link
Copy Markdown
Member

@oldclesleycode

Copy link
Copy Markdown
Author

Hi @Carreau i'm struggling to get the rebase done. I've been following along here, but something is causing:

Lesleys-MacBook-Pro:ipython lesleycordero$ git rebase --continue
No rebase in progress?

@Carreau

Carreau commented Jan 6, 2018 •

Copy link
Copy Markdown
Member

rebase-requthor

Here is what I did

Optional to be sure you are at this PR head:

git reset --hard 1688a5e
git log --graph
# let's linearize that by removing the multiple merges:
git rebase origin/master
git log --graph
# good it's linear. Let's interactive rebase to set the author correctly
git rebase -i origin/master
git commit --amend --author="Author Name <[email protected]>" --no-edit
git rebase --continue
git commit --amend --author="Author Name <[email protected]>" --no-edit
git rebase --continue
git log --graph
# and now you push. 

The head of this branch is 1688a5e57d01fc290615d32f24cba8c78dd5bf11 if you need.

@oldclesleycode

Copy link
Copy Markdown
Author

@Carreau when I git log --graph , I'm unable to edit the parts you highlighted. Is there a command I should be using?

@Carreau

Carreau commented Jan 7, 2018 via email

Copy link
Copy Markdown
Member

@oldclesleycode

Copy link
Copy Markdown
Author

@Carreau i'm on EST! I retried the steps and got to git rebase --continue, where I got the following:

Lesleys-MacBook-Pro:ipython lesleycordero$ git rebase --continue
No rebase in progress?

@Carreau

Carreau commented Jan 8, 2018

Copy link
Copy Markdown
Member

You probably forgot the git rebase -i origin/master that I did in the Gif but not in the copy-pastable instructions.

We can try to see that on Gitter (I'm at European time right no so am 7h later than you).

@takluyver takluyver added this to the 6.3 milestone Mar 29, 2018
@takluyver
takluyver merged commit c6b52bf into ipython:master Mar 29, 2018
@takluyver

Copy link
Copy Markdown
Member

Thanks @lesley2958 ! And sorry it took so long to get this merged.

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.

5 participants