Skip to content

Commit 78f6ad8

Browse files
committed
Add my_book folder and all contents
1 parent abd05c5 commit 78f6ad8

29 files changed

Lines changed: 1061 additions & 0 deletions

my_book/CONDUCT.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
# Code of Conduct
3+
4+
## Our Pledge
5+
6+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
7+
8+
## Our Standards
9+
10+
Examples of behavior that contributes to creating a positive environment include:
11+
12+
* Using welcoming and inclusive language
13+
* Being respectful of differing viewpoints and experiences
14+
* Gracefully accepting constructive criticism
15+
* Focusing on what is best for the community
16+
* Showing empathy towards other community members
17+
18+
Examples of unacceptable behavior by participants include:
19+
20+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
21+
* Trolling, insulting/derogatory comments, and personal or political attacks
22+
* Public or private harassment
23+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
24+
* Other conduct which could reasonably be considered inappropriate in a professional setting
25+
26+
## Our Responsibilities
27+
28+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
29+
30+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
31+
32+
## Scope
33+
34+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
35+
36+
## Enforcement
37+
38+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
39+
40+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
41+
42+
## Attribution
43+
44+
This Code of Conduct is adapted from the [Contributor Covenant, version 1.4](http://contributor-covenant.org/version/1/4).

my_book/CONTRIBUTING.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Contributing
2+
3+
Contributions are welcome, and they are greatly appreciated! Every little bit
4+
helps, and credit will always be given. You can contribute in the ways listed below.
5+
6+
## Report Bugs
7+
8+
Report bugs using GitHub issues.
9+
10+
If you are reporting a bug, please include:
11+
12+
* Your operating system name and version.
13+
* Any details about your local setup that might be helpful in troubleshooting.
14+
* Detailed steps to reproduce the bug.
15+
16+
## Fix Bugs
17+
18+
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
19+
wanted" is open to whoever wants to implement it.
20+
21+
## Implement Features
22+
23+
Look through the GitHub issues for features. Anything tagged with "enhancement"
24+
and "help wanted" is open to whoever wants to implement it.
25+
26+
## Write Documentation
27+
28+
My Book could always use more documentation, whether as part of the
29+
official My Book docs, in docstrings, or even on the web in blog posts,
30+
articles, and such.
31+
32+
## Submit Feedback
33+
34+
The best way to send feedback is to file an issue on GitHub.
35+
36+
If you are proposing a feature:
37+
38+
* Explain in detail how it would work.
39+
* Keep the scope as narrow as possible, to make it easier to implement.
40+
* Remember that this is a volunteer-driven project, and that contributions
41+
are welcome :)
42+
43+
## Get Started
44+
45+
Ready to contribute? Here's how to set up `My Book` for local development.
46+
47+
1. Fork the repo on GitHub.
48+
2. Clone your fork locally.
49+
3. Install your local copy into a virtualenv, e.g., using `conda`.
50+
4. Create a branch for local development and make changes locally.
51+
5. Commit your changes and push your branch to GitHub.
52+
6. Submit a pull request through the GitHub website.
53+
54+
## Code of Conduct
55+
56+
Please note that the My Book project is released with a [Contributor Code of Conduct](CONDUCT.md). By contributing to this project you agree to abide by its terms.

my_book/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025, Captain Jupyter
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

my_book/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# My Book
2+
3+
This cookiecutter creates a simple boilerplate for a Jupyter Book.
4+
5+
## Usage
6+
7+
### Building the book
8+
9+
If you'd like to develop and/or build the My Book book, you should:
10+
11+
1. Clone this repository
12+
2. Run `pip install -r requirements.txt` (it is recommended you do this within a virtual environment)
13+
3. (Optional) Edit the books source files located in the `my_book/` directory
14+
4. Run `jupyter-book clean my_book/` to remove any existing builds
15+
5. Run `jupyter-book build my_book/`
16+
17+
A fully-rendered HTML version of the book will be built in `my_book/_build/html/`.
18+
19+
### Hosting the book
20+
21+
Please see the [Jupyter Book documentation](https://jupyterbook.org/publish/web.html) to discover options for deploying a book online using services such as GitHub, GitLab, or Netlify.
22+
23+
For GitHub and GitLab deployment specifically, the [cookiecutter-jupyter-book](https://github.com/executablebooks/cookiecutter-jupyter-book) includes templates for, and information about, optional continuous integration (CI) workflow files to help easily and automatically deploy books online with GitHub or GitLab. For example, if you chose `github` for the `include_ci` cookiecutter option, your book template was created with a GitHub actions workflow file that, once pushed to GitHub, automatically renders and pushes your book to the `gh-pages` branch of your repo and hosts it on GitHub Pages when a push or pull request is made to the main branch.
24+
25+
## Contributors
26+
27+
We welcome and recognize all contributions. You can see a list of current contributors in the [contributors tab](https://github.com/tomasbeuzen/my_book/graphs/contributors).
28+
29+
## Credits
30+
31+
This project is created using the excellent open source [Jupyter Book project](https://jupyterbook.org/) and the [executablebooks/cookiecutter-jupyter-book template](https://github.com/executablebooks/cookiecutter-jupyter-book).
32+
33+

my_book/my_book/_config.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#######################################################################################
2+
# A default configuration that will be loaded for all jupyter books
3+
# See the documentation for help and more options:
4+
# https://jupyterbook.org/customize/config.html
5+
6+
#######################################################################################
7+
# Book settings
8+
title : My Book # The title of the book. Will be placed in the left navbar.
9+
author : Captain Jupyter # The author of the book
10+
copyright : "2025" # Copyright year to be placed in the footer
11+
logo : logo.png # A path to the book logo
12+
13+
# Force re-execution of notebooks on each build.
14+
# See https://jupyterbook.org/content/execute.html
15+
execute:
16+
execute_notebooks: force
17+
18+
# Define the name of the latex output file for PDF builds
19+
latex:
20+
latex_documents:
21+
targetname: book.tex
22+
23+
# Add a bibtex file so that we can create citations
24+
bibtex_bibfiles:
25+
- references.bib
26+
27+
# Information about where the book exists on the web
28+
repository:
29+
url: https://github.com/tomasbeuzen/My Book # Online location of your book
30+
path_to_book: docs # Optional path to your book, relative to the repository root
31+
branch: main # Which branch of the repository should be used when creating links (optional)
32+
33+
# Add GitHub buttons to your book
34+
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
35+
html:
36+
use_issues_button: true
37+
use_repository_button: true

my_book/my_book/_toc.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Table of contents
2+
# Learn more at https://jupyterbook.org/customize/toc.html
3+
4+
format: jb-book
5+
root: intro
6+
chapters:
7+
- file: markdown
8+
- file: notebooks
9+
- file: markdown-notebooks

my_book/my_book/content.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Content in Jupyter Book
2+
=======================
3+
4+
There are many ways to write content in Jupyter Book. This short section
5+
covers a few tips for how to do so.

my_book/my_book/intro.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Welcome to your Jupyter Book
2+
3+
This is a small sample book to give you a feel for how book content is
4+
structured.
5+
It shows off a few of the major file types, as well as some sample content.
6+
It does not go in-depth into any particular topic - check out [the Jupyter Book documentation](https://jupyterbook.org) for more information.
7+
8+
Check out the content pages bundled with this sample book to see more.
9+
10+
```{tableofcontents}
11+
```

my_book/my_book/logo.png

9.62 KB
Loading
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
jupytext:
3+
cell_metadata_filter: -all
4+
formats: md:myst
5+
text_representation:
6+
extension: .md
7+
format_name: myst
8+
format_version: 0.13
9+
jupytext_version: 1.11.5
10+
kernelspec:
11+
display_name: Python 3
12+
language: python
13+
name: python3
14+
---
15+
16+
# Notebooks with MyST Markdown
17+
18+
Jupyter Book also lets you write text-based notebooks using MyST Markdown.
19+
See [the Notebooks with MyST Markdown documentation](https://jupyterbook.org/file-types/myst-notebooks.html) for more detailed instructions.
20+
This page shows off a notebook written in MyST Markdown.
21+
22+
## An example cell
23+
24+
With MyST Markdown, you can define code cells with a directive like so:
25+
26+
```{code-cell}
27+
print(2 + 2)
28+
```
29+
30+
When your book is built, the contents of any `{code-cell}` blocks will be
31+
executed with your default Jupyter kernel, and their outputs will be displayed
32+
in-line with the rest of your content.
33+
34+
```{seealso}
35+
Jupyter Book uses [Jupytext](https://jupytext.readthedocs.io/en/latest/) to convert text-based files to notebooks, and can support [many other text-based notebook files](https://jupyterbook.org/file-types/jupytext.html).
36+
```
37+
38+
## Create a notebook with MyST Markdown
39+
40+
MyST Markdown notebooks are defined by two things:
41+
42+
1. YAML metadata that is needed to understand if / how it should convert text files to notebooks (including information about the kernel needed).
43+
See the YAML at the top of this page for example.
44+
2. The presence of `{code-cell}` directives, which will be executed with your book.
45+
46+
That's all that is needed to get started!
47+
48+
## Quickly add YAML metadata for MyST Notebooks
49+
50+
If you have a markdown file and you'd like to quickly add YAML metadata to it, so that Jupyter Book will treat it as a MyST Markdown Notebook, run the following command:
51+
52+
```
53+
jupyter-book myst init path/to/markdownfile.md
54+
```

0 commit comments

Comments
 (0)