Skip to content

Commit 9aba816

Browse files
authored
Merge branch 'master' into master
2 parents 838f199 + 39c681f commit 9aba816

Some content is hidden

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

79 files changed

+3490
-690
lines changed

.coveragerc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[report]
2+
exclude_lines =
3+
pragma: no cover
4+
if TYPE_CHECKING:

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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: github-actions
9+
directory: /
10+
commit-message:
11+
prefix: ⬆️
12+
schedule:
13+
interval: weekly
14+
- package-ecosystem: pip
15+
directory: /
16+
commit-message:
17+
prefix: ⬆️
18+
schedule:
19+
interval: weekly
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Copilot Setup Steps
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16+
copilot-setup-steps:
17+
runs-on: ubuntu-latest
18+
19+
# Set the permissions to the lowest permissions possible needed for your steps.
20+
# Copilot will be given its own token for its operations.
21+
permissions:
22+
contents: read
23+
24+
# You can define any steps you want, and they will run before the agent starts.
25+
# If you do not check out your code, Copilot will do this for you.
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: "3.11"
34+
cache: pip
35+
36+
- name: Install uv
37+
run: pip install uv
38+
39+
- name: Install pre-commit and pre-commit-uv
40+
run: pip install pre-commit pre-commit-uv
41+
42+
- name: Install tox and tox-uv
43+
run: pip install tox tox-uv

.github/workflows/tests.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: actions/checkout@v2
21-
- name: Set up Python 3.8
22-
uses: actions/setup-python@v2
20+
- uses: actions/checkout@v4
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
2323
with:
24-
python-version: 3.8
25-
- uses: pre-commit/action@v2.0.0
24+
python-version: "3.10"
25+
- uses: pre-commit/action@v3.0.1
2626

2727
tests:
2828

2929
runs-on: ubuntu-latest
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
python-version: ['pypy-3.7', '3.7', '3.8', '3.9', '3.10']
33+
python-version: ['pypy-3.10', '3.10', '3.11', '3.12', '3.13']
3434

3535
steps:
36-
- uses: actions/checkout@v2
36+
- uses: actions/checkout@v4
3737
- name: Set up Python ${{ matrix.python-version }}
38-
uses: actions/setup-python@v2
38+
uses: actions/setup-python@v5
3939
with:
4040
python-version: ${{ matrix.python-version }}
4141
- name: Install dependencies
@@ -46,13 +46,23 @@ jobs:
4646
run: |
4747
pytest --cov=mdit_py_plugins --cov-report=xml --cov-report=term-missing
4848
- name: Upload to Codecov
49-
uses: codecov/codecov-action@v1
49+
uses: codecov/codecov-action@v5
50+
if: github.event.pull_request.head.repo.full_name == github.repository
5051
with:
52+
token: ${{ secrets.CODECOV_TOKEN }}
5153
name: mdit-py-plugins-pytests
5254
flags: pytests
53-
file: ./coverage.xml
55+
files: ./coverage.xml
5456
fail_ci_if_error: true
5557

58+
allgood:
59+
runs-on: ubuntu-latest
60+
needs:
61+
- pre-commit
62+
- tests
63+
steps:
64+
- run: echo "Great success!"
65+
5666
publish:
5767

5868
name: Publish to PyPi
@@ -61,11 +71,11 @@ jobs:
6171
runs-on: ubuntu-latest
6272
steps:
6373
- name: Checkout source
64-
uses: actions/checkout@v2
74+
uses: actions/checkout@v4
6575
- name: Set up Python
66-
uses: actions/setup-python@v2
76+
uses: actions/setup-python@v5
6777
with:
68-
python-version: "3.8"
78+
python-version: "3.10"
6979
- name: install flit
7080
run: |
7181
pip install flit~=3.4

.pre-commit-config.yaml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,23 @@ exclude: >
1212
repos:
1313

1414
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: v4.3.0
15+
rev: v6.0.0
1616
hooks:
1717
- id: check-json
1818
- id: check-yaml
1919
- id: end-of-file-fixer
2020
- id: trailing-whitespace
2121

22-
- repo: https://github.com/timothycrosley/isort
23-
rev: 5.11.5
22+
- repo: https://github.com/astral-sh/ruff-pre-commit
23+
rev: v0.12.8
2424
hooks:
25-
- id: isort
26-
27-
- repo: https://github.com/psf/black
28-
rev: 22.8.0
29-
hooks:
30-
- id: black
31-
32-
- repo: https://github.com/pycqa/flake8
33-
rev: 3.9.2
34-
hooks:
35-
- id: flake8
36-
additional_dependencies: [flake8-bugbear==21.3.1]
25+
- id: ruff
26+
args: [--fix]
27+
- id: ruff-format
3728

3829
- repo: https://github.com/pre-commit/mirrors-mypy
39-
rev: v0.971
30+
rev: v1.17.1
4031
hooks:
4132
- id: mypy
42-
additional_dependencies: [markdown-it-py~=2.0]
33+
additional_dependencies: [markdown-it-py~=3.0]
34+
exclude: ^tests/

.readthedocs.yml

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

3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.10"
7+
38
python:
4-
version: 3
59
install:
610
- method: pip
711
path: .
812
extra_requirements: [rtd]
913

1014
sphinx:
15+
configuration: docs/conf.py
1116
builder: html
1217
fail_on_warning: true

0 commit comments

Comments
 (0)