Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/markdown-code-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,26 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install markdown-code-runner
run: |
python -m pip install --upgrade pip
pip install .
uv venv
uv pip install .

# Install dependencies you're using in your README.md
- name: Install other Python dependencies
run: |
pip install pandas tabulate pytest matplotlib requests
uv pip install pandas tabulate pytest matplotlib requests

# Rust is only needed for an example in our README.md
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Run update-readme.py
run: markdown-code-runner --verbose README.md
run: uv run markdown-code-runner --verbose README.md

- name: Commit updated README.md
id: commit
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@ jobs:

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
pip install pytest
run: uv sync --all-extras
- name: Run pytest
run: pytest
run: uv run pytest
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,27 +266,26 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install markdown-code-runner
run: |
python -m pip install --upgrade pip
pip install markdown-code-runner
uv venv
uv pip install markdown-code-runner

# Install dependencies you're using in your README.md
- name: Install other Python dependencies
run: |
pip install pandas tabulate pytest matplotlib requests
uv pip install pandas tabulate pytest matplotlib requests

# Rust is only needed for an example in our README.md
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Run update-readme.py
run: markdown-code-runner --verbose README.md
run: uv run markdown-code-runner --verbose README.md

- name: Commit updated README.md
id: commit
Expand Down Expand Up @@ -339,15 +338,14 @@ usage: markdown-code-runner [-h] [-o OUTPUT] [-d] [-v] input
Automatically update Markdown files with code block output.

positional arguments:
input Path to the input Markdown file.
input Path to the input Markdown file.

options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
Path to the output Markdown file. (default: overwrite
input file)
-d, --verbose Enable debugging mode (default: False)
-v, --version show program's version number and exit
-h, --help show this help message and exit
-o, --output OUTPUT Path to the output Markdown file. (default: overwrite
input file)
-d, --verbose Enable debugging mode (default: False)
-v, --version show program's version number and exit
```

<!-- OUTPUT:END -->
Expand Down
Loading