diff --git a/.github/workflows/markdown-code-runner.yml b/.github/workflows/markdown-code-runner.yml index 24fd47a..1a09d18 100644 --- a/.github/workflows/markdown-code-runner.yml +++ b/.github/workflows/markdown-code-runner.yml @@ -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 diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 5ca3a2a..d368437 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -8,7 +8,7 @@ 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 @@ -16,10 +16,9 @@ jobs: 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 diff --git a/README.md b/README.md index 8a3b4eb..f044ad1 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 ```