Skip to content

Commit de70c47

Browse files
committed
⬆️UPGRADE: Support mdformat v1 and Python >=3.10
1 parent 80852fc commit de70c47

File tree

7 files changed

+46
-47
lines changed

7 files changed

+46
-47
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ updates:
88
- package-ecosystem: "pip" # See documentation for possible values
99
directory: "/" # Location of package manifests
1010
schedule:
11-
interval: "daily"
11+
interval: "monthly"

.github/workflows/tests.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,44 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Set up Python
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v5
1919
with:
20-
python-version: 3.7
21-
- uses: pre-commit/action@v2.0.0
20+
python-version: '3.10'
21+
- uses: pre-commit/action@v3.0.0
2222

2323
tests:
2424
runs-on: ${{ matrix.os }}
2525
strategy:
2626
matrix:
27-
python-version: [3.7, 3.8, 3.9, '3.10']
27+
python-version: ['3.10', '3.13']
2828
os: [ubuntu-latest, windows-latest]
2929

3030
steps:
31-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v4
3232

3333
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v2
34+
uses: actions/setup-python@v5
3535
with:
3636
python-version: ${{ matrix.python-version }}
3737

3838
- name: Installation (deps and package)
3939
# we install with flit --pth-file,
4040
# so that coverage will be recorded for the module
4141
run: |
42-
pip install flit
42+
pip install flit>=3.12.0
4343
flit install --deps=production --extras=test --pth-file
4444
4545
- name: Run pytest
4646
run: |
4747
pytest --cov=mdformat_footnote --cov-report=xml --cov-report=term-missing
4848
4949
# - name: Upload to Codecov
50-
# if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.7
50+
# if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.10
5151
# uses: codecov/codecov-action@v1
5252
# with:
53-
# name: pytests-py3.7
53+
# name: pytests-py3.10
5454
# flags: pytests
5555
# file: ./coverage.xml
5656
# fail_ci_if_error: true
@@ -59,11 +59,11 @@ jobs:
5959
runs-on: ubuntu-latest
6060

6161
steps:
62-
- uses: actions/checkout@v2
62+
- uses: actions/checkout@v4
6363
- name: Set up Python
64-
uses: actions/setup-python@v2
64+
uses: actions/setup-python@v5
6565
with:
66-
python-version: 3.7
66+
python-version: '3.10'
6767

6868
- name: Installation (deps and package)
6969
run: |
@@ -81,14 +81,14 @@ jobs:
8181
runs-on: ubuntu-latest
8282
steps:
8383
- name: Checkout source
84-
uses: actions/checkout@v2
85-
- name: Set up Python 3.7
86-
uses: actions/setup-python@v1
84+
uses: actions/checkout@v4
85+
- name: Set up Python 3
86+
uses: actions/setup-python@v5
8787
with:
88-
python-version: 3.7
88+
python-version: '3.x'
8989
- name: install flit
9090
run: |
91-
pip install flit~=3.0
91+
pip install flit>=3.12.0
9292
- name: Build and publish
9393
run: |
9494
flit publish

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v3.4.0
3+
rev: v6.0.0
44
hooks:
55
- id: end-of-file-fixer
66
- id: mixed-line-ending
77
- id: check-yaml
88
- id: check-toml
99
- repo: https://github.com/pre-commit/pygrep-hooks
10-
rev: v1.8.0
10+
rev: v1.10.0
1111
hooks:
1212
- id: python-check-blanket-noqa
1313
- repo: https://github.com/timothycrosley/isort
14-
rev: 5.8.0
14+
rev: 7.0.0
1515
hooks:
1616
- id: isort
1717
- repo: https://github.com/psf/black
18-
rev: 20.8b1
18+
rev: 25.9.0
1919
hooks:
2020
- id: black
21-
- repo: https://gitlab.com/pycqa/flake8
22-
rev: 3.9.0
21+
- repo: https://github.com/pycqa/flake8
22+
rev: 7.3.0
2323
hooks:
2424
- id: flake8
2525
additional_dependencies:
26-
- flake8-bugbear==21.4.3
27-
- flake8-builtins==1.5.3
28-
- flake8-comprehensions==3.4.0
26+
- flake8-bugbear>=24.12.12
27+
- flake8-builtins>=3.0.0
28+
- flake8-comprehensions>=3.17.0

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ tox
2525
and with test coverage:
2626

2727
```bash
28-
tox -e py39-cov
28+
tox -e py310-cov
2929
```
3030

3131
The easiest way to write tests, is to edit tests/fixtures.md
3232

3333
To run the code formatting and style checks:
3434

3535
```bash
36-
tox -e py39-pre-commit
36+
tox -e py310-pre-commit
3737
```
3838

3939
or directly
@@ -46,7 +46,7 @@ pre-commit run --all
4646
To run the pre-commit hook test:
4747

4848
```bash
49-
tox -e py39-hook
49+
tox -e py310-hook
5050
```
5151

5252
## Publish to PyPi

pyproject.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@ classifiers = [
1818
]
1919
keywords = "mdformat,markdown,markdown-it"
2020

21-
requires-python=">=3.7"
22-
requires=["mdformat >=0.7.8,<0.8.0",
23-
"mdit-py-plugins",
21+
requires-python=">=3.10"
22+
requires=["mdformat >=0.7.0",
23+
"mdit-py-plugins >=0.4.0",
2424
]
2525

2626
[tool.flit.metadata.requires-extra]
2727
test = [
28-
"pytest~=6.0",
29-
"coverage",
30-
"pytest-cov",
28+
"pytest>=8.0.0",
29+
"pytest-cov>=7.0.0",
3130
]
3231
dev = ["pre-commit"]
3332

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
flit
2-
tox
3-
pytest
4-
mdformat >=0.7.0,<0.8.0
5-
mdit_py_plugins
1+
flit>=3.12.0
2+
tox>=4.31.0
3+
pytest>=8.0.0
4+
mdformat >=0.7.0
5+
mdit_py_plugins >=0.4.0

tox.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
[tox]
2-
envlist = py{37,38,39,310}
2+
envlist = py{310,313}
33
isolated_build = True
44

5-
[testenv:py{37,38,39,310}]
5+
[testenv:py{310,313}]
66
extras = test
77
commands = pytest {posargs}
88

9-
[testenv:py{37,38,39,310}-cov]
9+
[testenv:py{310,313}-cov]
1010
extras = test
1111
commands = pytest --cov={envsitepackagesdir}/mdformat_footnote {posargs}
1212

13-
[testenv:py{37,38,39,310}-pre-commit]
13+
[testenv:py{310,313}-pre-commit]
1414
extras = dev
1515
commands = pre-commit run {posargs}
1616

17-
[testenv:py{37,38,39,310}-hook]
17+
[testenv:py{310,313}-hook]
1818
extras = dev
1919
commands = pre-commit run --config .pre-commit-test.yaml {posargs:--all-files --verbose --show-diff-on-failure}
2020

0 commit comments

Comments
 (0)