Skip to content

Commit

Permalink
Merge branch 'release/1.3.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
chdemko committed Oct 5, 2024
2 parents e1b2451 + 0ffdc4c commit 388a4c1
Show file tree
Hide file tree
Showing 12 changed files with 279 additions and 2,581 deletions.
93 changes: 33 additions & 60 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,121 +15,94 @@ jobs:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
poetry-version: [1.8.3]
pandoc-version: ['3.3']
pandoc-version: ['3.4']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install Hatch
run: pipx install hatch
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
poetry install
- name: Test with tox
- name: Test
run: |
poetry run tox -e py
hatch test -py ${{ matrix.python-version }}
poetry:
pandoc:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
poetry-version: [1.2.2, 1.3.2, 1.4.2, 1.5.1, 1.6.1, 1.7.1, 1.8.3]
pandoc-version: ['3.3']
poetry-version: [1.8.3]
pandoc-version: [3.0.1, 3.1.13, 3.2.1, '3.3', '3.4']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install Hatch
run: pipx install hatch
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
poetry install
- name: Test with tox
- name: Test
run: |
poetry run tox -e py
hatch test
pandoc:
style:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
poetry-version: [1.8.3]
pandoc-version: [3.0.1, 3.1.13, 3.2.1, '3.3']
pandoc-version: ['3.4']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install Hatch
run: pipx install hatch
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
poetry install
- name: Test with tox
- name: Static check
run: |
poetry run tox -e py
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.8.3
- name: Install dependencies
run: |
poetry install
- name: Test with tox
hatch fmt --check
- name: Dynamic check
run: |
poetry run tox -e style
poetry run tox -e linter
hatch run dynamic-lint:check
cov:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
pandoc-version: ['3.4']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.8.3
python-version: ${{ matrix.python-version }}
- name: Install Hatch
run: pipx install hatch
- name: Install dependencies
run: |
wget https://github.com/jgm/pandoc/releases/download/3.3/pandoc-3.3-1-amd64.deb
sudo dpkg -i ./pandoc-3.3-1-amd64.deb
poetry install
wget https://github.com/jgm/pandoc/releases/download/${{ matrix.pandoc-version }}/pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
sudo dpkg -i ./pandoc-${{ matrix.pandoc-version }}-1-amd64.deb
- name: Test
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
poetry run tox -e coverage
poetry run pip install coveralls
poetry run coveralls
hatch test --cover
hatch run pip install coveralls
hatch run coveralls
27 changes: 11 additions & 16 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,24 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.8.3
- name: Set up poetry-dynamic-versioning
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
- name: Install dependencies
run: |
poetry install
poetry run pip install twine
python-version: ${{ matrix.python-version }}
- name: Install Hatch
run: pipx install hatch
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.ref_name }}
run: |
poetry build
poetry run twine upload dist/*
hatch build -t wheel
hatch publish dist/*.whl
85 changes: 17 additions & 68 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,86 +5,35 @@ repos:
- id: check-toml
- id: check-yaml

- repo: https://gitlab.com/smop/pre-commit-hooks
rev: v1.0.0
hooks:
- id: check-poetry

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
exclude: ^poetry.lock$
args: [--autofix, --no-sort]
- id: pretty-format-yaml
args: [--autofix]

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.3.1
hooks:
- id: tox-ini-fmt

- repo: https://github.com/ariebovenberg/slotscheck
rev: v0.19.0
hooks:
- id: slotscheck
language: system
exclude: ^(?!pandoc_latex_admonition/)

- repo: https://github.com/dosisod/refurb
rev: v2.0.0
hooks:
- id: refurb

- repo: https://github.com/isidentical/teyit
rev: 0.4.3
hooks:
- id: teyit

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
hooks:
- id: ruff
language: system
exclude: ^(?!pandoc_latex_admonition/)

- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black-jupyter
args: [--config=pyproject.toml, pandoc_latex_admonition/, tests]

- repo: https://github.com/PyCQA/doc8/
rev: v1.1.1
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: doc8
args: [docs]
- id: pyupgrade
args: [--py310-plus]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
- repo: local
hooks:
- id: mypy
- id: format
name: format
entry: hatch fmt --check
language: system
exclude: ^(?!pandoc_latex_admonition/)

- repo: https://github.com/pycqa/flake8
rev: 7.1.0
hooks:
- id: flake8
pass_filenames: false
- id: dynamic-lint
name: dynamic-lint
entry: hatch run dynamic-lint:check
language: system
exclude: ^(?!pandoc_latex_admonition/)

- repo: https://github.com/pre-commit/mirrors-pylint
rev: v3.0.0a5
hooks:
- id: pylint
pass_filenames: false
- id: test
name: test
entry: hatch test
language: system
exclude: ^(?!pandoc_latex_admonition/)

- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
language: system
args: [--py310-plus]
pass_filenames: false

22 changes: 4 additions & 18 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,10 @@ build:
os: ubuntu-22.04
tools:
python: '3.11'
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
- poetry self add "poetry-dynamic-versioning[plugin]"
# Tell poetry to not use a virtual environment
- poetry config virtualenvs.create false
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
# VIRTUAL_ENV needs to be set manually for now.
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
commands:
- git fetch --unshallow || true
- pip install hatch
- hatch run docs:build $READTHEDOCS_OUTPUT/html/

# Optionally build your docs in additional formats such as PDF and ePub
formats:
Expand Down
Loading

0 comments on commit 388a4c1

Please sign in to comment.