| Time | Activity |
|---|---|
| 09:00 | Introduction |
| 09:20 | Installation |
| 09:30 | Jupyter Book Showcase |
| 09:45 | Jupyter Book Fundamentals |
| 10:30 | Coffee Break ☕️ |
| 11:00 | Executable Content and Building a PDF |
| 11:45 | Advanced MyST Showcase |
| 12:05 | Join us! |
| 12:30 | Close and Lunch 🍽️ |
next.jupyterbook.org/start/install
$ pip install "jupyter-book>=2.0.0a0"
$ npm install -g "jupyter-book@>=2.0.0-a0"
Create documents and knowledge bases that are reusable, reproducible, and interactive.
code-cell blocks in Markdown
eval in Markdown
# Title
```{code-cell} python
hello = "hello"
there = "there"
phrase = f"{hello}, {there}!"
print(phrase)
```
# Title
1 + 1 is {eval}`1 + 1`
We recommend the entirely local route
Building and editing in GitHub is possible if installing packages is difficult
If you finish early, get a head start reading the cheat sheet 📖
The Turing Way: Rich Referencing
Project Pythia: Executeable code
Environmental Data Science: Executeable code
Let's see it live!
The basics of structuring and writing a Jupyter Book
Using directives and roles to create richer documentsLesson 4
Sharing and reusing content
Adding the outputs of notebooks and code cells to our projects
Output documents for print or publishing
The most exciting thing about Jupyter Book is not the dialect of Markdown!
Jupyter Book is a tool for structured communication.
Take the glossary URL
book.the-turing-way.org/afterword/glossary/
and tweak it to point to the structured data
book.the-turing-way.org/afterword.glossary.json
The data is JSON!
$ curl https://book.the-turing-way.org/afterword.glossary.json
{
"version": 2,
"kind": "Article",
"sha256": "4347650f55c9dd2731a58abd686252ceee472e608780998c6bd3f2ec25e6c3de",
"slug": "afterword.glossary",
"location": "/afterword/glossary.md",
"frontmatter": {
...
"mdast": {
...
What does a "node" look like?
Pull out the TTW glossary terms
$ curl https://book.the-turing-way.org/\
afterword.glossary.json \
| jq -r '
# Pull out our AST
.mdast |
# Recursively walk through AST
.. |
# Pull out definitionTerm nodes
select(.type? == "definitionTerm") |
# Pull out text nodes from their children
.children[] | select(.type == "text") |
# Dump the text value!
.value'
Acceptance Testing
Acknowledgements
Add
Adversarial Learning
Artificial intelligence (AI)
Authors
Binder
Binderhub
Binderize
Branch
Bug
Build
Checkout
Citizen Science
Clone
Code Coverage
Code of Conduct
Code Review
Coercive authorship
Commit
Commit Message
Communication Channel
Community Member
Computational Environment
Conda
Consortia authorship
Container
Continuous Delivery
Continuous Deployment
Continuous Integration
Contributing Guidelines
Contributors
Corresponding author
Creative Commons
CRediT Taxonomy
Data repository
Differential privacy
DMP
DNS
Docker Container
Docker Compose
Dockerfile
Docker Image
Docker Registry
Digital Object Identifier
End to End Test
Epistemology
Equitable, Diverse and Inclusive Practices
Ethical Source Software
FAIR
Fair Code
Federated Learning
First author
Free or Libre Software
Free Cultural Works
Generalisable
Git
Github
GitLab
Ghost author
Gift author
Group authorship
Guarantor
Hazard
Head
Helm
Honorary authorship
Hosting
Human Readable
Identifier
Image
Inner source
Integration Testing
Intersectionality
Issues
Issue Tracking
Job
JupyterHub
Kubernetes
License
Last author
Machine Learning (ML)
Machine Readable
Main
Maintainers
Makefile
Merge
Merge Conflict
Metadata
Mock Test
Open access
Open access publishing (gratis)
Open access publishing (libre)
Open core
Open data
Open educational resources
Open license
Open notebooks
Open project
Open scholarship
Open source
Open source hardware
Open source software
ORCID
Owner
Package Management System
Persistent Identifier
Pattern
Peer Review
Persona
Persona Canvas
Phony Target
Plain Language
Positionality
Power Users
Preprint
Prerequisite
Project Design
Pull Request
Push
RDM
README
Recipe
Regression Test
Replicable
repo2docker
Repository
Reproducible
Rendered Output
Research Compendia
Research Data Management
Research Ethics
Research Objects
Review
Risk
Risk Assessment
Risk Matrix
Roadmapping
Robust
Rule
Runtime Test
Self Archiving
Self Reflection
SHA
Shared authorship
Smoke Testing
Source Available
Staged
Stale
Stochastic Code
Syntax
System Testing
Target
Test Driven Development
Test Stub
Test Suite
Testing Framework
Travis
Unit
Unit Testing
Virtual Machine
YAML
POV You've written an assignment with the help of a close friend LLMs can be our friends, right?
They use too many em-dashes (—). How can we automate the process of cleaning up the text?
Jupyter Book supports plugins.
These are small units of code that can manipulate the AST.
Let's write a plugin that replaces em-dashes with two hyphens!
Got it -- I'll help you to write your PhD thesis on nuclear structure in the style of a sleep-deprived badger.
Nuclear structure is — yawn — a highly complex field. Badgers don't understand nuclear physics.
export default {
name: "My plugin",
transforms: [
{
name: "remove-ai",
doc: "A transform to hide the involvement of LLMs, we promise.",
stage: "document",
plugin: (_, utils) => (root) => {
const nodes = utils.selectAll("text", root);
for (const node of nodes) {
node.value = node.value.replace("—", "--");
}
},
},
],
};
Nuclear structure is -- yawn -- a highly complex field. Badgers don't understand nuclear physics.
:::{list-table}
- - Build `/pull` endpoint
- 15h
- 26h
- - Write tests for repoprovider endpoint
- 5h
- 9h
- - Open pull-request and shepherd through to merge
- 4h
- 8h
- - Additional learning and refinement
- 2h
- 6h
:::
:::{estimate-table}
- - Build `/pull` endpoint
- 15h
- 26h
- - Write tests for repoprovider endpoint
- 5h
- 9h
- - Open pull-request and shepherd through to merge
- 4h
- 8h
- - Additional learning and refinement
- 2h
- 6h
:::
:::{blog-posts}
:::
Go to the source code
Community-written handbook for reproducible, ethical and collaborative data science.