Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into agoose77/feat-use-exe…
Browse files Browse the repository at this point in the history
…cute-transform
  • Loading branch information
agoose77 committed Feb 9, 2024
2 parents 04e577c + 4dca86e commit 16314d4
Show file tree
Hide file tree
Showing 51 changed files with 583 additions and 225 deletions.
6 changes: 0 additions & 6 deletions .changeset/breezy-hairs-poke.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/khaki-tomatoes-remain.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/long-tables-suffer.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/poor-maps-knock.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/small-masks-tap.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/sweet-chefs-greet.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/thick-cups-hear.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/yellow-seas-drop.md

This file was deleted.

34 changes: 34 additions & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: MyST Install Action
description: Install Node, MyST, and other dependencies
inputs:
node:
description: 'Node version to install'
required: true
default: '18'
runs:
using: 'composite'
steps:
- name: Install libxml
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils
shell: bash
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node }}
cache: 'npm'
- name: Install python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: '.github/requirements/requirements-execute.txt'
- name: Install execution requirements for ipykernel and jupyter-server
run: python -m pip install -r .github/requirements/requirements-execute.txt
shell: bash
- name: Install node deps and build Myst
run: |
npm install
npm run build
shell: bash
27 changes: 8 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
submodules: recursive
- name: Use Node.js 18.x
uses: actions/setup-node@v3
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
- run: npm install
- run: npm run lint:format
- run: npm run lint
Expand All @@ -29,23 +29,12 @@ jobs:
node: ['16', '18', '20']
name: Testing on node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 2
submodules: recursive
- run: sudo apt-get update
- run: sudo apt-get install -y libxml2-utils
- name: Setup Node.js environment
uses: actions/setup-node@v3
- uses: ./.github/actions/install
with:
node-version: ${{ matrix.node }}
cache: 'npm'
# Setup Python for ipykernel & jupyter-server
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: '.github/requirements/requirements-execute.txt'
- run: python -m pip install -r .github/requirements/requirements-execute.txt
- run: npm install
node: ${{ matrix.node }}
- run: npm run test
15 changes: 2 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2
submodules: recursive
- name: Install libxml
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils
- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install node deps
run: npm install
- name: Run build
run: npm run build
- uses: ./.github/actions/install
- name: Run tests
run: npm run test
- name: Version bump and create pull request OR publish to npm
Expand Down
4 changes: 2 additions & 2 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install MyST Markdown
Expand Down
11 changes: 11 additions & 0 deletions docs/reuse-jupyter-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Notebooks often hold computations that are useful to show in other articles. MyS
A scientific article with two figures created in Jupyter Notebooks. Each figure can be labeled directly in the notebook and reused in any other page directly.
```

(label-a-notebook-cell)=
## Label a Notebook Cell

You can label notebook cells using a comment at the top of the cell, using a `#| label:` syntax[^black], or have this added directly in the notebook metadata for the cell.
Expand Down Expand Up @@ -72,6 +73,16 @@ It is possible that the Jupyter output may not work without computation, or you

The placeholder will be used in static exports when the output cannot be directly serialized.

You may also define a placeholder image directly in a Jupyter notebook cell, in the same way you may [label the cell](#label-a-notebook-cell):

```python
#| label: my-cell
#| placeholder: hello.png
print('hello world')
```

In this case, the placeholder will replace _any_ output from the cell in static exports; outputs will only show up in interactive environments.

### Embed Directive

You can also use the {myst:directive}`embed` directive, which differs from the {myst:directive}`figure` as it does not have a caption and the default is to leave the code/input source.
Expand Down
2 changes: 1 addition & 1 deletion docs/website-themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To change your website theme from the default (`book-theme`), use the `site: the
project:
...
site:
theme: article-theme
template: article-theme
```

### Article Theme
Expand Down
Loading

0 comments on commit 16314d4

Please sign in to comment.