Skip to content

Added Jupyter Chapter 1.0 (Setup Guide). - #5

Closed
jachiang wants to merge 1 commit into
bitcoinops:masterfrom
jachiang:master2
Closed

jachiang wants to merge 1 commit into
bitcoinops:masterfrom
jachiang:master2

Conversation

@jachiang

Copy link
Copy Markdown
Contributor

Has some overlap with readme.

@jnewbery jnewbery left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This overlaps a lot with #4. You should take whatever you want from that PR and close it.

Comment thread 1.0-Workshop-Setup.ipynb
"\n",
"* [Bitcoin Core build notes](https://github.com/bitcoin/bitcoin/tree/master/doc#building)"
]
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Everything above here should be in README.md (no point in telling people how to install python/jupyter and run a notebook when they're already running a notebook).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was assuming a starting point with github preview, which renders the notebook as run with a notebook server. Agree to move it to readme.

@jachiang jachiang Aug 30, 2019

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Overlapping instructions between this, testnotebook and README.md are being consolidated and streamlined by Schmidty here.

Comment thread 1.0-Workshop-Setup.ipynb
"\n",
"**Overview of required repositories**\n",
"\n",
"![test](images/setup0.jpg)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • I think the 'imports' arrow is going the wrong way. Either change the text to 'imported by' or reverse the arrow.
  • s/1.0-Workshop-Setup.iypnb/1.0-Workshop-Setup.ipynb/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Corrected. @bitschmidty, do you want to use this for the consolidated setup guide?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It doesn't look like this has been committed to the branch

Comment thread 1.0-Workshop-Setup.ipynb
"\n",
"It should look something like this:\n",
"\n",
"* `/.../bitcoin/test/functional`"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What does /... do? I think it'd be better to make this a full absolute path eg /home/optech/bitcoin or whatever.

@jachiang jachiang Aug 30, 2019

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is no longer necessary with setup.py

Comment thread 1.0-Workshop-Setup.ipynb
"import sys\n",
"\n",
"# Make sure your insert your full path.\n",
"sys.path.insert(0, '/.../bitcoinops/bitcoin/test/functional') \n"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

take a look at the setup.py file I added in #4. I think that's the way to go since users can add the path once and it'll work for all notebooks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This has now been incorporated in 0.1 setup chapter and 1.1 Schnorr-Intro.

Comment thread 1.0-Workshop-Setup.ipynb
"\n",
"**Things to keep in mind:**\n",
"* Separate test wrapper setup, shutdown and your code into different cells. This ensures that an error in your code does not affect the test wrapper object and prevents orphaned subprocesses.\n",
"* Only run one test wrapper object at a time.\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should use a singleton pattern on the TestWrapper to ensure that only one can be instantiated. We should also check whether there are already bitcoind processes running in the setup method (see https://github.com/bitcoinops/bitcoin/blob/19c8b5671d1f654109ac7c1baea8cb9555dae0e2/test/functional/test_runner.py#L330)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is being addressed in TestWrapper here, which I propose to combine with setup.py into a util.py file.

Comment thread 1.0-Workshop-Setup.ipynb
"**Things to keep in mind:**\n",
"* Separate test wrapper setup, shutdown and your code into different cells. This ensures that an error in your code does not affect the test wrapper object and prevents orphaned subprocesses.\n",
"* Only run one test wrapper object at a time.\n",
"* If the subprocesses do become orphaned somehow, you can run the following:\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These instructions should work for linux/mac. Do we also need instructions for windows?

@jachiang jachiang Aug 28, 2019

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think that would be good. I have very little experience with Windows however. @bitschmidty, do you have some bitcoin/python setup experience with windows machines?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jachiang Nope, but I can fire up a VM and test!

I prefer to do that a bit later when the ground isnt shifting below.

@bitschmidty bitschmidty mentioned this pull request Aug 29, 2019
1 task
@jnewbery

jnewbery commented Sep 2, 2019

Copy link
Copy Markdown
Contributor

Superseded by #8

@jnewbery jnewbery closed this Sep 2, 2019
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.

3 participants