Skip to content

Commit

Permalink
Merge branch 'release/1.3.4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
chdemko committed Oct 22, 2024
2 parents 948a9e0 + d836143 commit c51fc9f
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 38 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
pandoc-version: ['3.4']
python-version: ['3.10', '3.11', '3.12', '3.13']
pandoc-version: ['3.5']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -37,8 +37,7 @@ jobs:
strategy:
matrix:
python-version: ['3.12']
poetry-version: [1.8.3]
pandoc-version: [3.0.1, 3.1.13, 3.2.1, '3.3', '3.4']
pandoc-version: [3.0.1, 3.1.13, 3.2.1, '3.3', '3.4', '3.5']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -60,7 +59,7 @@ jobs:
strategy:
matrix:
python-version: ['3.12']
pandoc-version: ['3.4']
pandoc-version: ['3.5']
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -78,14 +77,14 @@ jobs:
hatch fmt --check
- name: Dynamic check
run: |
hatch run dynamic-lint:check
hatch run lint:check
cov:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
pandoc-version: ['3.4']
pandoc-version: ['3.5']
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand Down
16 changes: 10 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
Expand All @@ -14,7 +14,7 @@ repos:
args: [--autofix]

- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
rev: v3.18.0
hooks:
- id: pyupgrade
args: [--py310-plus]
Expand All @@ -26,14 +26,18 @@ repos:
entry: hatch fmt --check
language: system
pass_filenames: false
- id: dynamic-lint
name: dynamic-lint
entry: hatch run dynamic-lint:check
- id: lint
name: lint
entry: hatch run lint:check
language: system
pass_filenames: false
- id: test
name: test
entry: hatch test
language: system
pass_filenames: false

- id: lock
name: lock
entry: uv lock --upgrade
language: system
pass_filenames: false
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Installation
[![Downloads](https://img.shields.io/pypi/dm/pandoc-latex-admonition?logo=pypi&logoColor=white)](https://pepy.tech/project/pandoc-latex-admonition)
[![Development Status](https://img.shields.io/pypi/status/pandoc-latex-admonition.svg?llogo=pypi&logoColor=white)](https://pypi.org/project/pandoc-latex-admonition/)
[![Python version](https://img.shields.io/pypi/pyversions/pandoc-latex-admonition.svg?logo=Python&logoColor=white)](https://pypi.org/project/pandoc-latex-admonition/)
[![Pandoc version](https://img.shields.io/badge/pandoc-3.0%20|%203.1%20|%203.2%20|%203.3%20|%203.4-blue.svg?logo=markdown)](https://pandoc.org/)
[![Pandoc version](https://img.shields.io/badge/pandoc-3.0%20|%203.1%20|%203.2%20|%203.3%20|%203.4%20|%203.5-blue.svg?logo=markdown)](https://pandoc.org/)
[![Latest release](https://img.shields.io/github/release-date/chdemko/pandoc-latex-admonition.svg?logo=github)](https://github.com/chdemko/pandoc-latex-admonition/releases)
[![Last commit](https://img.shields.io/github/last-commit/chdemko/pandoc-latex-admonition/develop?logo=github)](https://github.com/chdemko/pandoc-latex-admonition/commit/develop/)
[![Repo Size](https://img.shields.io/github/repo-size/chdemko/pandoc-latex-admonition.svg?logo=github)](http://pandoc-latex-admonition.readthedocs.io/en/latest/)
Expand Down Expand Up @@ -82,3 +82,34 @@ welcome to [file an issue] on github so that we can help.

[file an issue]: https://github.com/chdemko/pandoc-latex-admonition/issues

Contribute
==========

Instructions
------------

Install `hatch`, then run

~~~shell-session
$ hatch run pip install pre-commit
$ hatch run pre-commit install
~~~

to install `pre-commit` before working on your changes.

Tests
-----

When your changes are ready, run

~~~shell-session
$ hatch test
$ hatch fmt --check
$ hatch run lint:check
$ hatch run docs:build
$ hatch build -t wheel
~~~

for running the tests, checking the style, building the documentation
and building the wheel.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = "6.0"
needs_sphinx = "8.1"

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down
53 changes: 30 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dynamic = ["version"]
name = "pandoc-latex-admonition"
description = "A pandoc filter for adding admonition in LaTeX"
readme = "README.md"
requires-python = ">=3.10,<3.13"
requires-python = ">=3.10,<3.14"
license = {text = "BSD-3-Clause"}
license-files = {paths = ["LICENSE"]}
authors = [{name = "Christophe Demko", email = "chdemko@gmail.com"}]
Expand All @@ -34,6 +34,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.14",
# Natural language used
"Natural Language :: English"
]
Expand All @@ -58,20 +59,20 @@ version_scheme = "no-guess-dev"
local_scheme = "node-and-date"

[tool.hatch.build.targets.wheel]
packages = ["pandoc_latex_admonition"]
packages = ["src/pandoc_latex_admonition"]

[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.10", "3.11", "3.12"]
python = ["3.10", "3.11", "3.12", "3.13"]

[tool.hatch.envs.hatch-static-analysis]
dependencies = [
# Types
"types-PyYAML~=6.0",
# Formatter
"black[jupyter]~=24.8",
"black[jupyter]~=24.10",
# Style checkers
"doc8~=1.1",
"mypy~=1.11",
"mypy~=1.12",
"flake8~=7.1",
"flake8-pyproject~=1.2",
"flake8-annotations-complexity~=0.0",
Expand All @@ -87,65 +88,70 @@ dependencies = [
"flake8-functions~=0.0",
"flake8-import-order~=0.18",
"flake8-mypy~=17.8",
"flake8-pyi~=24.6",
"flake8-pyi~=24.9",
"flake8-pydocstyle~=0.2",
"flake8-return~=1.2",
"flake8-simplify~=0.21",
"flake8-spellcheck~=0.28",
"flake8-use-fstring~=1.4",
"flake8-variables-names~=0.0",
"pep8-naming~=0.13",
"pep8-naming~=0.14",
"darglint~=1.8.1",
"pydoclint[flake8]~=0.5",
"teyit~=0.4",
"refurb~=2.0",
"ruff~=0.6"
"ruff~=0.7"
]

[tool.hatch.envs.hatch-static-analysis.scripts]
format-check = [
"black --check --diff {args:pandoc_latex_admonition docs}",
"black --check --diff {args:src docs}",
"doc8 -q {args:docs README.md} -e .rst -e .md"
]
format-fix = [
"black {args:pandoc_latex_admonition docs}"
"black {args:src docs}"
]
lint-check = [
"refurb {args:pandoc_latex_admonition docs}",
"ruff check {args:pandoc_latex_admonition docs}",
"refurb {args:src docs}",
"ruff check {args:src docs}",
"teyit --show-stats --fail-on-change {args:tests}",
"flake8 {args:pandoc_latex_admonition docs}"
"flake8 {args:src docs}"
]
lint-fix = [
"ruff check --fix {args:pandoc_latex_admonition docs}"
"ruff check --fix {args:src docs}"
]

[tool.hatch.envs.dynamic-lint]
[tool.hatch.envs.lint]
dependencies = [
"slotscheck~=0.19",
"pylint~=3.2"
"pylint~=3.3"
]

[tool.hatch.envs.dynamic-lint.scripts]
[tool.hatch.envs.lint.scripts]
check = [
"slotscheck {args:pandoc_latex_admonition}",
"pylint {args:pandoc_latex_admonition}"
"slotscheck {args:src}",
"pylint {args:src}"
]

[tool.hatch.envs.docs]
dependencies = [
"myst-parser~=2.0",
"Sphinx~=7.2",
"sphinx-rtd-theme~=2.0",
"myst-parser~=4.0",
"Sphinx~=8.1",
"sphinx-rtd-theme~=3.0",
"sphinx-copybutton~=0.5"
]

[tool.hatch.envs.docs.scripts]
build = "sphinx-build docs {args:build/sphinx/html}"

[tool.pytest.ini_options]
consider_namespace_packages = true
pythonpath = ["src"]

[tool.ruff]
# Allow lines to be as long as 88.
line-length = 88
target-version = "py310"

[tool.flake8]
# flake8-docstrings
Expand Down Expand Up @@ -221,6 +227,7 @@ warn_return_any = true
# equivalent to --strict option
warn_unused_configs = true
warn_unused_ignores = true
mypy_path = "src"

[[tool.mypy.overrides]]
ignore_missing_imports = true
Expand All @@ -230,4 +237,4 @@ module = "panflute.*"
convention = "numpy"

[tool.coverage.run]
source = ["pandoc_latex_admonition"]
source = ["src"]
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit c51fc9f

Please sign in to comment.