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

Issue 694 getting started notebooks #703

Merged
merged 7 commits into from
Nov 15, 2019

Conversation

Scottmar93
Copy link
Contributor

Description

Added a few simple "getting started" notebooks. We should probably iterate so that they are as clear and simple as possible and also decide what other ones should be added.

Fixes #694

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

Copy link
Member

@brosaplanella brosaplanella left a comment

Choose a reason for hiding this comment

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

Really nice notebooks!

Copy link
Contributor

@rtimms rtimms left a comment

Choose a reason for hiding this comment

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

these looks great, thanks @Scottmar93 !

@codecov
Copy link

codecov bot commented Nov 5, 2019

Codecov Report

Merging #703 into master will increase coverage by 0.02%.
The diff coverage is 55.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #703      +/-   ##
==========================================
+ Coverage   98.15%   98.18%   +0.02%     
==========================================
  Files         175      175              
  Lines        9264     9288      +24     
==========================================
+ Hits         9093     9119      +26     
+ Misses        171      169       -2
Impacted Files Coverage Δ
pybamm/models/base_model.py 97.84% <50%> (-0.53%) ⬇️
pybamm/simulation.py 84.55% <56%> (+5.61%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a36dde...9fbd08a. Read the comment docs.

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Cheers @Scottmar93 , this is super clear. A few comments for helping to point users in the right direction:

  • add links to previous and next tutorial within each tutorial
  • update examples/notebooks/readme to point to the right files
  • maybe add a link to this in the main readme

Also, coverage has gone down a lot in the last few PRs so it would be good to stay on top of that - this is definitely worth the upstream time investment

"cell_type": "markdown",
"metadata": {},
"source": [
"Welcome to PyBaMM! In this notebook, we will run your first PyBaMM model in just a few simple lines. We begin by importing the pybamm library into this notebook:"
Copy link
Member

Choose a reason for hiding this comment

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

Might also be a good idea to explain how jupyter notebooks work. e.g. refer to this cheat sheet https://www.cheatography.com/weidadeyue/cheat-sheets/jupyter-notebook/pdf_bw/ and say just do shift-enter to run cells

},
"nbformat": 4,
"nbformat_minor": 2
}
Copy link
Member

Choose a reason for hiding this comment

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

refer to readthedocs for more detail?

],
"source": [
"quick_plot_vars = [\"Terminal voltage [V]\"]\n",
"sim.plot(quick_plot_vars=quick_plot_vars)"
Copy link
Member

Choose a reason for hiding this comment

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

could do with more points here

},
"nbformat": 4,
"nbformat_minor": 2
}
Copy link
Member

Choose a reason for hiding this comment

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

I got an extra cell here "type markdown and latex"

t=widgets.FloatSlider(min=0, max=plot.max_t, step=0.05, value=0),
)
else:
plot.dynamic_plot()
Copy link
Member

Choose a reason for hiding this comment

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

nice! I wonder if you could do something similar within quickplot itself

@rtimms rtimms merged commit eff7d0a into master Nov 15, 2019
@rtimms rtimms deleted the issue-694-getting-started-notebooks branch November 15, 2019 16:41
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.

Create simpler "getting started" notebooks
4 participants