Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#9): use latest mdit-py-plugins #13

Merged
merged 5 commits into from
Jun 6, 2023
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
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.7, '3.10']
python-version: [3.8, '3.10']
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python 3.7.12 3.10.9
python 3.8.12 3.10.9
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ tox
and with test coverage:

```bash
tox -e py37-cov
tox -e py38-cov
```

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

To run the code formatting and style checks:

```bash
tox -e py37-pre-commit
tox -e py38-pre-commit
```

or directly
Expand All @@ -38,7 +38,7 @@ pre-commit run --all
To run the pre-commit hook test:

```bash
tox -e py37-hook
tox -e py38-hook
```

## Publish to PyPi
Expand Down
2 changes: 1 addition & 1 deletion mdformat_admon/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""An mdformat plugin for admonitions."""

__version__ = "1.0.1"
__version__ = "1.0.2"

from .plugin import RENDERERS, update_mdit # noqa: F401
178 changes: 0 additions & 178 deletions mdformat_admon/index_pr58.py

This file was deleted.

6 changes: 1 addition & 5 deletions mdformat_admon/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
from markdown_it import MarkdownIt
from mdformat.renderer import RenderContext, RenderTreeNode
from mdformat.renderer.typing import Render

from .index_pr58 import admon_plugin

# FIXME: Use latest mdit_py_pluign once my PR is merged
# https://github.com/executablebooks/mdit-py-plugins/pull/58/files
from mdit_py_plugins.admon import admon_plugin


def update_mdit(mdit: MarkdownIt) -> None:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
]
keywords = ["mdformat", "markdown", "markdown-it"]
requires-python = ">=3.7.2"
requires-python = ">=3.8.0"
dependencies = [
"mdformat >= 0.7.16",
"mdit-py-plugins >= 0.3.2",
"mdit-py-plugins >= 0.4.0",
]
dynamic = ["version", "description"]

Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tox]
envlist =
py{37,310}-cov
py{38,310}-cov
py{310}-pre-commit
py{37,310}-hook
py{38,310}-hook
isolated_build = True
skip_missing_interpreters = False

[testenv:py{37,310}]
[testenv:py{38,310}]
extras = test
commands = pytest {posargs} --ff -vv

Expand All @@ -18,7 +18,7 @@ commands = pytest --cov={envsitepackagesdir}/mdformat_admon {posargs}
extras = dev
commands = pre-commit run {posargs:--all-files}

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

Expand Down