Skip to content

Commit 40e2850

Browse files
authored
Merge pull request #274 from bsipocz/ENH_switch_to_JB2
2 parents abdb82d + bc4cb6d commit 40e2850

File tree

13 files changed

+93
-170
lines changed

13 files changed

+93
-170
lines changed

.github/workflows/ci_publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and Publish HTML and deployed_notebooks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: '0 5 * * 1'
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
env:
16+
# `BASE_URL` determines, relative to the root of the domain, the URL that your site is served from.
17+
# E.g., if your site lives at `https://mydomain.org/myproject`, set `BASE_URL=/myproject`.
18+
# If, instead, your site lives at the root of the domain, at `https://mydomain.org`, set `BASE_URL=''`.
19+
BASE_URL: /${{ github.event.repository.name }}
20+
21+
jobs:
22+
23+
publish_html:
24+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
25+
name: Publish HTML
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v5
29+
30+
- name: Setup Python
31+
uses: actions/setup-python@v6
32+
with:
33+
python-version: '3.12'
34+
35+
- name: Install dependencies
36+
run: python -m pip install --upgrade tox
37+
38+
- name: Execute notebooks while building HTMLs
39+
run: tox -e py312-buildhtml
40+
41+
- name: Publish
42+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
43+
with:
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: ./_build/html/
46+
commit_message: ${{ github.event.head_commit.message }}

.github/workflows/conda.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pmip
2323
tags
2424
cscope.out
2525
.ipynb_checkpoints
26+
.tox
2627

2728
# Compiled source #
2829
###################

environment.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ dependencies:
1010
- pandas
1111
- imageio
1212
# For building the site
13-
- sphinx
14-
- myst-nb
15-
- sphinx-book-theme
16-
- sphinx-copybutton
17-
# to load the md files in binder
13+
- tox
1814
- jupytext
15+
- pip
16+
- pip:
17+
- jupyter-book>=2
18+
- jupyterlab_myst

myst.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: 1
2+
project:
3+
title: Numpy Tutorials
4+
# description:
5+
# keywords: []
6+
authors: Numpy Community
7+
github: https://github.com/numpy/numpy-tutorials
8+
toc:
9+
- file: site/index.md
10+
11+
- title: Applications
12+
children:
13+
- file: content/mooreslaw-tutorial.md
14+
- file: content/tutorial-deep-learning-on-mnist.md
15+
- file: content/tutorial-x-ray-image-processing.md
16+
- file: content/tutorial-static_equilibrium.md
17+
- file: content/tutorial-plotting-fractals.md
18+
- file: content/tutorial-air-quality-analysis.md
19+
20+
- title: Features
21+
children:
22+
- file: content/tutorial-svd.md
23+
- file: content/save-load-arrays.md
24+
- file: content/tutorial-ma.md
25+
- title: Contributing
26+
file: site/contributing.md
27+
children:
28+
- file: content/tutorial-style-guide.md
29+
30+
31+
site:
32+
template: book-theme
33+
options:
34+
favicon: site/_static/favicon.png
35+
logo: site/_static/numpylogo.svg

site/Makefile

Lines changed: 0 additions & 29 deletions
This file was deleted.

site/applications.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

site/articles.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

site/contributing.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ accept both Jupyter notebooks (`.ipynb`) and MyST-NB notebooks (`.md`).
4444
If you want to sync your `.ipynb` to your `.md` file follow the [pairing
4545
tutorial](content/pairing).
4646

47-
```{toctree}
48-
:hidden:
49-
50-
content/pairing
51-
```
52-
5347
## Adding your own tutorials
5448

5549
If you have your own tutorial in the form of a Jupyter notebook (an `.ipynb`
@@ -66,14 +60,7 @@ We will try to respond as quickly as possible with comments, if applicable.
6660
### Check out our suggested template
6761

6862
You can use this template to make your content consistent with our existing
69-
tutorials:
70-
71-
```{toctree}
72-
---
73-
maxdepth: 1
74-
---
75-
content/tutorial-style-guide
76-
```
63+
tutorials.
7764

7865
### Upload your content
7966

site/features.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)