Skip to content

Commit 3d62e5b

Browse files
authored
Merge branch 'master' into test-code-figures
2 parents 48e188d + c4acf78 commit 3d62e5b

File tree

137 files changed

+2457
-957
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+2457
-957
lines changed

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip"
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"
12+
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "monthly"
17+
groups:
18+
actions:
19+
patterns:
20+
- "*"
21+
labels:
22+
- "github_actions"

.github/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot
5+
- pre-commit-ci

.github/workflows/tests.yml

Lines changed: 71 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,92 @@ on:
66
tags:
77
- 'v*'
88
pull_request:
9+
schedule:
10+
# run every Monday at 5am UTC
11+
- cron: '0 5 * * 1'
12+
workflow_dispatch:
913

1014
jobs:
11-
pre-commit:
12-
13-
runs-on: ubuntu-latest
14-
15-
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up Python 3.8
18-
uses: actions/setup-python@v1
19-
with:
20-
python-version: 3.9
21-
- uses: pre-commit/[email protected]
2215

2316
tests:
2417

2518
strategy:
2619
fail-fast: false
2720
matrix:
2821
os: [ubuntu-latest]
29-
python-version: ["3.7", "3.8", "3.9", "3.10"]
30-
sphinx: [">=5,<6"]
22+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
23+
sphinx: [""] # Newest Sphinx (any)
24+
myst-parser: [""] # Newest MyST Parser (any)
3125
include:
32-
- os: ubuntu-latest
33-
python-version: 3.7
34-
sphinx: ">=4,<5"
26+
# Just check the other platforms once
3527
- os: windows-latest
36-
python-version: 3.8
37-
sphinx: ">=5,<6"
28+
python-version: "3.12"
29+
sphinx: "~=8.0"
30+
myst-parser: "~=4.0"
31+
pillow: "==11.0.0"
3832
- os: macos-latest
39-
python-version: 3.8
40-
sphinx: ">=5,<6"
33+
python-version: "3.12"
34+
sphinx: "~=8.0"
35+
myst-parser: "~=4.0"
36+
pillow: "==11.0.0"
37+
- os: ubuntu-latest
38+
python-version: "3.12"
39+
sphinx: "~=8.0"
40+
myst-parser: "~=4.0"
41+
pillow: "==11.0.0"
42+
# Oldest known-compatible dependencies
43+
- os: ubuntu-latest
44+
python-version: "3.9"
45+
sphinx: "==5.0.0"
46+
myst-parser: "==1.0.0"
47+
pillow: "==11.0.0"
48+
# Mid-range dependencies
49+
- os: ubuntu-latest
50+
python-version: "3.11"
51+
sphinx: "==7.0.0"
52+
myst-parser: "==3.0.0"
53+
pillow: "==11.0.0"
54+
# Newest known-compatible dependencies
55+
- os: ubuntu-latest
56+
python-version: "3.12"
57+
sphinx: "==8.0.2"
58+
myst-parser: "==4.0.0"
59+
pillow: "==11.0.0"
4160

4261
runs-on: ${{ matrix.os }}
4362

4463
steps:
45-
- uses: actions/checkout@v2
64+
- uses: actions/checkout@v4
4665
- name: Set up Python ${{ matrix.python-version }}
47-
uses: actions/setup-python@v1
66+
uses: actions/setup-python@v5
4867
with:
4968
python-version: ${{ matrix.python-version }}
69+
allow-prereleases: true
70+
cache: pip
71+
- name: Install myst-nb with Sphinx ${{ matrix.sphinx }}
72+
shell: bash
73+
run: |
74+
pip install --upgrade "Sphinx${{ matrix.sphinx }}" "myst-parser${{ matrix.myst-parser }}" "pillow${{ matrix.pillow }}" -e .[testing]
75+
pip freeze
76+
77+
- name: Run pytest
78+
run: pytest --durations=10
79+
80+
coverage:
81+
needs: [tests]
82+
runs-on: ubuntu-latest
83+
84+
steps:
85+
- uses: actions/checkout@v4
86+
- name: Set up Python ${{ matrix.python-version }}
87+
uses: actions/setup-python@v5
88+
with:
89+
python-version: "3.11"
90+
cache: pip
5091
- name: Install dependencies
5192
run: |
52-
python -m pip install --upgrade pip
53-
pip install "sphinx${{ matrix.sphinx }}"
5493
pip install -e .[testing]
94+
pip freeze
5595
5696
- name: Run pytest
5797
run: pytest --durations=10 --cov=myst_nb --cov-report=xml --cov-report=term-missing
@@ -61,28 +101,28 @@ jobs:
61101
# for some reason the tests/conftest.py::check_nbs fixture breaks pytest-cov's cov-report outputting
62102
# this is why we run `coverage xml` afterwards (required by codecov)
63103

104+
# TEMPORARY FIX: Disable codecov until we can get it working again
64105
- name: Upload to Codecov
65-
if: github.repository == 'executablebooks/MyST-NB' && matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
66-
uses: codecov/codecov-action@v3
106+
uses: codecov/codecov-action@v4
107+
if: false
67108
with:
68109
name: myst-nb-pytests
69110
flags: pytests
70111
files: ./coverage.xml
71-
fail_ci_if_error: true
72112

73113
publish:
74114

75115
name: Publish to PyPi
76-
needs: [pre-commit, tests]
116+
needs: [tests]
77117
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
78118
runs-on: ubuntu-latest
79119
steps:
80120
- name: Checkout source
81-
uses: actions/checkout@v2
121+
uses: actions/checkout@v4
82122
- name: Set up Python
83-
uses: actions/setup-python@v1
123+
uses: actions/setup-python@v5
84124
with:
85-
python-version: 3.8
125+
python-version: "3.10"
86126
- name: install flit
87127
run: |
88128
pip install flit~=3.4

.github/workflows/tests_devdeps.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: continuous-integration-devdeps
2+
3+
on:
4+
push:
5+
branches: [master]
6+
schedule:
7+
# run every Monday at 5am UTC
8+
- cron: '0 5 * * 1'
9+
workflow_dispatch:
10+
11+
jobs:
12+
13+
tests:
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
sphinx: [""] # Newest Sphinx (any)
19+
myst-parser: [""] # Newest MyST Parser (any)
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up Python 3.12
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.12"
29+
cache: pip
30+
- name: Install myst-nb with development Sphinx and myst-parser versions
31+
run: |
32+
pip install --upgrade pip
33+
pip install --upgrade git+https://github.com/executablebooks/MyST-Parser.git#egg=myst-parser git+https://github.com/sphinx-doc/sphinx.git#egg=sphinx -e .[testing]
34+
35+
- name: Run pytest
36+
run: pytest --durations=10

.pre-commit-config.yaml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,49 @@ exclude: >
99
tests/.*\.txt
1010
)$
1111
12+
ci:
13+
autoupdate_schedule: 'monthly'
14+
1215
repos:
1316

1417
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: v4.4.0
18+
rev: v5.0.0
1619
hooks:
1720
- id: check-json
1821
- id: check-yaml
1922
- id: end-of-file-fixer
2023
- id: trailing-whitespace
24+
- id: check-added-large-files
25+
- id: check-case-conflict
26+
- id: check-merge-conflict
27+
- id: mixed-line-ending
28+
- id: trailing-whitespace
2129

22-
- repo: https://github.com/asottile/pyupgrade
23-
rev: v3.3.1
24-
hooks:
25-
- id: pyupgrade
26-
args: [--py37-plus]
27-
28-
- repo: https://github.com/PyCQA/isort
29-
rev: 5.12.0
30-
hooks:
31-
- id: isort
32-
33-
- repo: https://github.com/psf/black
34-
rev: 23.3.0
35-
hooks:
36-
- id: black
37-
38-
- repo: https://github.com/PyCQA/flake8
39-
rev: 6.0.0
30+
- repo: https://github.com/astral-sh/ruff-pre-commit
31+
rev: v0.11.4
4032
hooks:
41-
- id: flake8
42-
additional_dependencies: [flake8-bugbear]
33+
- id: ruff
34+
args: ["--fix", "--show-fixes"]
35+
- id: ruff-format
4336

4437
- repo: https://github.com/pre-commit/mirrors-mypy
45-
rev: v1.2.0
38+
rev: v1.15.0
4639
hooks:
4740
- id: mypy
4841
args: [--config-file=pyproject.toml]
4942
additional_dependencies:
5043
- importlib_metadata
51-
- myst-parser~=0.18.0
52-
- "sphinx~=5.0"
44+
- myst-parser~=2.0.0
45+
- "sphinx~=7.3.7"
5346
- nbclient
5447
- types-PyYAML
5548
files: >
5649
(?x)^(
5750
myst_nb/.+\.py|
5851
)$
52+
53+
- repo: https://github.com/codespell-project/codespell
54+
rev: v2.4.1
55+
hooks:
56+
- id: codespell
57+
args: ["-S", "*.ipynb"]

.readthedocs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
version: 2
22

3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.11"
7+
38
python:
4-
version: "3.8"
59
install:
610
- method: pip
711
path: .
@@ -10,5 +14,6 @@ python:
1014
- requirements: docs/requirements.txt
1115

1216
sphinx:
17+
configuration: docs/conf.py
1318
builder: html
1419
fail_on_warning: true

0 commit comments

Comments
 (0)